serving-api
Operate LightLLM HTTP serving, request payloads, streaming, and profiler control.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- serving-api
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate LightLLM HTTP serving, request payloads, streaming, and profiler control.
- disable-model-invocation
- true
02 资源文件 2
- 参考文档references/troubleshooting.md2.6 KB
- 参考文档references/workflows.md2.9 KB
03 SKILL.md 正文
serving-api
Use this sub-skill when a user wants to start a LightLLM server, send a request to one of its HTTP APIs, debug a streaming response, enable profiler control, or understand the serving-side request/response shapes.
Covers
python -m lightllm.server.api_serverstartup for single-node serving.- LightLLM-native
/generateand/generate_streamcalls. - OpenAI-compatible
/v1/chat/completionsand/v1/completionscalls. - Anthropic-compatible
/v1/messagesand OpenAI Responses/v1/responses. - Health, readiness, liveness, model-info, token-load, metrics, and profiler endpoints.
- Function calling, reasoning parser settings, and multimodal request payloads.
- Response schema expectations for streamed and non-streamed outputs.
Does not cover
- Whether a particular model family or backend is supported.
- PD disaggregation or multi-node launch order.
- Benchmark design beyond a single smoke request against a running server.
Read first
- ../../references/api-reference.md
- ../../references/cli-reference.md
- references/workflows.md
- references/troubleshooting.md
Use this route when the user says
- “start the LightLLM API server”
- “how do I call
/generate?” - “how do I use the OpenAI / Anthropic compatibility APIs?”
- “why is streaming empty or truncated?”
- “how do I enable profiler start/stop or check metrics?”
- “how should I format multimodal or tool-call requests?”
Minimal working sequence
- Confirm the package is installed and the CUDA/runtime environment is ready.
- Read the CLI and API references for the chosen endpoint family.
- Start the server with the smallest valid
StartArgssubset. - Use
scripts/request_smoke.pyfor a single local request before any larger integration or benchmark call. - If the request shape fails, compare the payload against the request models in
references/api-reference.md.
Common decision points
- Use
/generatefor the LightLLM-native string input path. - Use
/v1/completionsfor completion-style prompts. - Use
/v1/chat/completionsfor message lists, tool calls, and reasoning-aware chat flows. - Use
/v1/messagesonly when Anthropic compatibility is explicitly needed. - Use
/v1/responseswhen a client expects the newer OpenAI Responses schema. - Use
/readinessrather than/healthwhen a benchmark or deploy script needs a real launch signal.
Bundled helper scripts
../../scripts/inspect_api_surface.pyprints the live route table and schema signatures.../../scripts/request_smoke.pycan send a tiny request to a running local server.../../scripts/inspect_start_args.pyhelps when a flag combination is not accepted.
Troubleshooting highlights
- The server may import before the model is ready; check readiness, not only health.
- Proxy variables can break local calls to
localhostor the PD master host. - Streaming clients must handle SSE-style incremental output.
- Multimodal payloads must use the structured message content blocks described in the API reference.
/v1/messagescan fail iflitellmis not installed.
Review standard
This sub-skill is complete when a future agent can:
- start a serving process,
- select the correct endpoint family,
- construct a minimal valid payload,
- interpret the first response shape,
- and diagnose the common API/path/proxy failures without reopening the source repository.
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).