deployment
General↓ 0 installsUpdated 19d ago
Serve a quantized or unquantized LLM checkpoint as an OpenAI-compatible API endpoint using vLLM, SGLang, or TRT-LLM. Use when user says "deploy model", "serve model", "start vLLM server", "launch SGLang", "TRT-LLM deploy", "AutoDeploy", "benchmark throughput", "serve checkpoint", or needs an inference endpoint from a HuggingFace or ModelOpt-quantized checkpoint. Do NOT use for quantizing models (use ptq) or evaluating accuracy (use evaluation).
SKILL.md preview
--- name: deployment description: Serve a quantized or unquantized LLM checkpoint as an OpenAI-compatible API endpoint using vLLM, SGLang, or TRT-LLM. Use when user says "deploy model", "serve model", "start vLLM server", "launch SGLang", "TRT-LLM deploy", "AutoDeploy", "benchmark throughput", "serve checkpoint", or needs an inference endpoint from a HuggingFace or ModelOpt-quantized checkpoint. Do NOT use for quantizing models (use ptq) or evaluating accuracy (use evaluation). license: Apache-2.0 --- # Deployment Skill Serve a model checkpoint as an OpenAI-compatible inference endpoint. Supports vLLM, SGLang, and TRT-LLM (including AutoDeploy). ## Quick Start Prefer `scripts/deploy.sh` for standard local deployments — it handles quant detection, health checks, and server lifecycle. Use the raw framework commands in Step 4 when you need flags the script doesn't support, or for remote deployment. ```bash # Start vLLM server with a ModelOpt checkpoint scripts/deploy.sh start --model ./qwen3-0.6b-fp8 # Start with SGLang and tensor parallelism scripts/deploy.sh start --model ./llama-70b-nvfp4 --framework sglang --tp 4 # Start from HuggingFace hub scripts/deploy.sh start --model nvidia/Llama-3.1-8B-Instruct-FP8 # Test the API scripts/deploy.sh test # Check status scripts/deploy.sh status # Stop scripts/deploy.sh stop ``` The script handles: GPU detection, quantization flag auto-detection (FP8 vs FP4), server lifecycle (start/stop/restart/status), health check polling, and API testing. ## Decision Flow ### 0. Check workspace (multi-user / Slack bot) If `MODELOPT_WORKSPACE_ROOT` is set, read `skills/common/workspace-management.md`. Before creating a new workspace, check for existing ones — especially if deploying a checkpoint from a prior PTQ run: ```bash ls "$MODELOPT_WORKSPACE_ROOT/" 2>/dev/null ``` If the user says "deploy the model I just quantized" or references a previous PTQ, find the matching workspace and `cd` into it. The checkpoint should be in that workspace's output directory. ### 1. Identify the checkpoint Determine what the user wants to deploy: - **Local quantized checkpoint** (from ptq skill or manual export): look for `hf_quant_config.json` in the directory. If coming from a prior PTQ run in the same workspace, check common output locations: `output/`, `outputs/`, `exported_model/`, or the `--export_path` used in the PTQ command. - **HuggingFace model hub** (e.g., `nvidia/Llama-3.1-8B-Instruct-FP8`): use directly - **Unquantized model**: deploy as-is (BF16) or suggest quantizing first with the ptq skill > **Note:** This skill expects HF-format checkpoints (from PTQ with `--export_fmt hf`). TRT-LLM format checkpoints should be deployed directly with TRT-LLM — see `references/trtllm.md`. Check the quantization format if applicable: ```bash cat <checkpoint_path>/hf_quant_config.json 2>/dev/null || echo "No hf_quant_config.json" ``` If not found, also check `config.json` for a `quantization_config` section with `quant_method: "modelopt"`. If neither exists, the checkpoint is unquantized. ### 2. Choose the framework If the user hasn't specified a framework, recommend based on this priority: | Situation | Recommended | Why | |-----------|-------------|-----| | General use | **vLLM** | Widest ecosystem, easy setup, OpenAI-compatible | | Best SGLang model support | **SGLang** | Strong DeepSeek/Llama 4 support | | Maximum optimization | **TRT-LLM** | Best throughput via engine compilation | | Mixed-precision / AutoQuant | **TRT-LLM AutoDeploy** | Only option for AutoQuant checkpoints | Check the support matrix in `references/support-matrix.md` to confirm the model + format + framework combination is supported. ### 3. Check the environment Read `skills/common/environment-setup.md` for GPU detection, local vs remote, and SLURM/Docker/bare metal detection. After completing it you should know: GPU model/count, local or remote, and execution environment. Then check the **deployment framework** is ins …