AGENT SKILL

xinference

Use Xinference for local and distributed model serving, Python clients, OpenAI-compatible APIs, model backend selection, and production operations.

License 许可
Apache-2.0
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
xinference
license
Apache 2.0
metadata
{ "disco-role": "operating" }
description
Use Xinference for local and distributed model serving, Python clients, OpenAI-compatible APIs, model backend selection, and production operations.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

Xinference

Use this repo skill when a task involves self-hosting, operating, or integrating Xinference / Xorbits Inference as a model-serving package. It covers the public CLI, local and distributed service patterns, Python clients, OpenAI-compatible HTTP APIs, model family registration, optional runtime backends, and operator configuration.

First checks

  1. Confirm the installed package and console entry points:

    python scripts/check_xinference_install.py --run-cli-help
    
  2. Inspect public client signatures and entry points when a task depends on API arguments or when a checkout may have changed:

    python scripts/inspect_xinference_interfaces.py
    
  3. Read references/repo-provenance.md before deciding whether this skill is current for a different checkout or release.

Route by task

Task shape Read next
Start xinference-local, build xinference launch commands, stop/list/cache/register models, or plan supervisor/worker clusters sub-skills/serving-and-cli/SKILL.md
Use Client, AsyncClient, cURL, OpenAI SDK base URLs, streaming, embeddings, rerank, image/audio/video requests, or request-shape troubleshooting sub-skills/client-and-api/SKILL.md
Choose a model family/backend/extra, validate custom model JSON, reason about LoRA, virtual environments, model format, quantization, or memory estimates sub-skills/models-and-backends/SKILL.md
Configure auth, API keys, OIDC, audit, metrics, logging, persistence, frontend static serving, Docker/Kubernetes, IP restrictions, or deployment hardening sub-skills/operations-and-security/SKILL.md
Diagnose install/import failures, editable source builds, optional dependency conflicts, frontend build surprises, or cross-cutting package errors references/troubleshooting.md and references/installation-and-environment.md

Install and environment rules

  • Supported Python range is >=3.10; match the project’s current packaging constraints before selecting an interpreter.
  • Basic install uses pip install xinference. Select optional extras only for the model families/backends actually needed by the task; do not install all or every backend as a first response.
  • In editable source checkouts, set NO_WEB_UI=1 when you only need Python package inspection or backend-free tests and do not want the Web UI build.
  • Real model launch may download weights, create per-model virtual environments, need extra packages, and require CPU/GPU/MPS/vendor hardware. Treat install and import success as a package-surface check, not proof that every model backend runs.
  • Keep endpoint roles distinct: the Xinference service endpoint is usually the root URL, while OpenAI-compatible clients use the same service plus /v1.

Bundled root references

  • references/installation-and-environment.md explains install variants, optional extras, source-build behavior, and safe package checks.
  • references/troubleshooting.md covers cross-cutting package, dependency, cache, frontend, auth-header, and model-download symptoms.
  • references/repo-provenance.md records the source snapshot and refresh baseline.
  • references/repo-routing-metadata.json is structured metadata for managed repo-skills-router import; do not edit router Markdown by hand.

Bundled root scripts

  • scripts/check_xinference_install.py checks importability, distribution metadata, client aliases, and console entry point availability without starting services.
  • scripts/inspect_xinference_interfaces.py prints verified public signatures for clients, model handles, and selected API helpers.

Safety and non-goals

  • This skill is self-contained. Do not require future agents to open original repo docs, tests, examples, scripts, or checkout paths.
  • Do not claim that vLLM, SGLang, MLX, image, audio, video, or real model inference was verified unless a later verification run actually exercised that backend and model.
  • Do not print or store real API keys, JWT secrets, encryption keys, OIDC client secrets, or model-hub tokens in examples or generated commands.
  • Use placeholders for hosts, ports, model UIDs, model names, paths, API keys, and worker addresses until the user provides deployment-specific values.
  • For repository editing or CI development tasks, use the project’s maintainer guidance separately; this operating skill is for package/service use by a later Researcher.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351