界面已本地化;技能介绍与说明文档按所选语言由 AI 自动翻译,代码、命令、路径和专业术语保留原文,以原作者文档为准。
探索技能
效率与协作 · SKILL.md

serving

serving

【效率与协作】Operate Qwen-VL Gradio and OpenAI-compatible FastAPI services without auto-starting listeners.

独立 GitHub 快照 · 自动分类 · 以原作者文档为准

技能说明

GitHub

name: serving description: "Operate Qwen-VL Gradio and OpenAI-compatible FastAPI services without auto-starting listeners." metadata: disco-role: operating disable-model-invocation: true license: NOASSERTION

Qwen-VL Serving

Use this sub-skill when the user wants to launch, configure, wrap, or debug the Qwen-VL multimodal Gradio demo or the OpenAI-compatible FastAPI chat service. Do not start a long-running listener unless the user explicitly asks for it; prepare commands, inspect flags, and diagnose configuration first.

Read first

Choose this sub-skill for

  • Preparing a safe localhost or exposed-host launch command for the Gradio multimodal demo.
  • Preparing a FastAPI command that exposes /v1/models and /v1/chat/completions in an OpenAI-compatible shape.
  • Explaining --checkpoint-path, --cpu-only, --server-name, --server-port, --share, and --inbrowser behavior.
  • Diagnosing API errors such as unsupported streaming, malformed chat/function messages, dependency imports, port conflicts, or incomplete checkpoints.
  • Reading reference-only Docker build/run patterns for the web demo, the OpenAI-compatible API, or the Int4 OpenAI-compatible API image.

Route elsewhere

  • One-off direct model calls, prompt construction, grounding markup, and model selection semantics belong in inference.
  • Supervised finetuning, LoRA, Q-LoRA, and training data preparation belong in finetuning.
  • Official benchmark execution, scoring, and submission formats belong in evaluation.

Operating rules

  1. Treat both service scripts as long-running: use --help, dependency probes, and command construction unless the user asks to launch.
  2. Prefer --server-name 127.0.0.1 for local use. Use 0.0.0.0 only when the user intentionally exposes the service and has considered firewall, proxy, authentication, and the API server's permissive CORS policy.
  3. For Qwen-VL-Chat service behavior, pass an explicit chat checkpoint even when a script has a default. The OpenAI API script inherits a text-chat default from the source; the Gradio script defaults to Qwen-VL-Chat.
  4. Do not promise streaming from the bundled OpenAI-compatible service: the current handler returns HTTP 400 for stream: true.
我的收藏