models-and-backends
Select, validate, and troubleshoot Xinference model families, custom model specs, virtual environments, LoRA, and runtime backends without assuming downloads or accelerator execution.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- models-and-backends
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Select, validate, and troubleshoot Xinference model families, custom model specs, virtual environments, LoRA, and runtime backends without assuming downloads or accelerator execution.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/backend-compatibility.md4.1 KB
- 参考文档references/custom-models.md4.5 KB
- 参考文档references/model-overview.md2.3 KB
- 参考文档references/troubleshooting.md2.1 KB
- 参考文档references/virtual-envs-and-lora.md1.8 KB
- 脚本scripts/check_model_config.py23.2 KB
03 SKILL.md 正文
Models and Backends
Use this sub-skill when the task is about choosing a model family, checking a custom model JSON file, matching a backend to a model format or quantization, or diagnosing optional dependency and accelerator problems.
Use this for
- Built-in and custom model families for LLM, embedding, rerank, image, audio, video, and flexible models.
- Custom model JSON validation before CLI or client registration.
- Backend/engine fit for
transformers,llama_cpp,vllm,sglang,mlx, embedding/rerank/image/video/audio extras, telemetry, and vendor variants. - Model format, quantization, size,
model_path,model_uri,model_id, and local-vs-hub source decisions. - LoRA attachment, per-model virtual environments, dependency markers, and launch-time package overrides.
- Memory-estimation planning and backend caveats before expensive launches.
Route away when needed
- Starting local services, supervisor/worker processes, or model lifecycle CLI
commands:
serving-and-cli. - Python client calls, HTTP request bodies, OpenAI-compatible base URLs, or
streaming response handling:
client-and-api. - Auth, metrics, logging, persistent state, deployment hardening, and general
environment-variable policy:
operations-and-security.
Working pattern
- Identify the model type and model ability first.
- Decide whether the task uses a built-in family, a custom model JSON, or a flexible launcher.
- Validate custom JSON offline before trying to register or launch it.
- Match the desired model format and quantization to a compatible backend.
- Confirm platform gates and optional extras before claiming a backend is usable.
- Add LoRA, virtualenv, and memory planning only after the family/backend pair is valid.
- Route to service or client sub-skills for the actual launch or request.
Required cautions
- LLM launches require an explicit
model_engine; embedding, rerank, and image routes can have default engines when omitted. - A package import, CLI help check, or JSON validation is not proof that a real model download or GPU/MPS backend run succeeded.
- vLLM and SGLang are CUDA/Linux-oriented and model-family constrained.
- MLX is macOS arm64 / Apple-silicon-specific.
- SGLang is not included in the
allextra; install it deliberately. - Custom video registration is not supported by the bundled checker; treat video custom specs as unsupported unless future package evidence changes.
References
- Model overview for the family/type map and selection cues.
- Custom models for JSON shapes and registration boundaries.
- Backend compatibility for extras, platform gates, quantization, and memory planning.
- Virtual envs and LoRA for per-model dependency isolation and adapter attachment.
- Troubleshooting for validation failures, missing extras, and backend-gate errors.
Bundled checker
- check_model_config.py validates a custom
model JSON file offline and can print a safe
xinference registercommand template. It does not download models or start a service.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).