L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Productivité · SKILL.md

inference-and-serving

inference-and-serving

Use Megatron-LM offline inference, high-level LLM APIs, coordinator mode, and serving command templates.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: inference-and-serving description: "Use Megatron-LM offline inference, high-level LLM APIs, coordinator mode, and serving command templates." metadata: disco-role: operating disable-model-invocation: true license: NOASSERTION

inference-and-serving

Use this sub-skill when the user asks for Megatron offline generation, dynamic/static inference, high-level MegatronLLM / MegatronAsyncLLM, coordinator mode, OpenAI-compatible serving, or text-generation server troubleshooting.

Read first

Route by task

TaskAction
Batch/offline generationChoose sync direct vs coordinator vs async; render an offline command template.
Start HTTP/OpenAI-compatible serverUse coordinator mode and server template; confirm ports and frontend replicas.
Use Python high-level APIRead API reference for MegatronLLM, MegatronAsyncLLM, ServeConfig, and SamplingParams.
Debug checkpoint/tokenizer loadRoute checkpoint-format issues to checkpointing, then return to inference context limits.
Compare legacy tools vs high-level APIPrefer high-level API for new usage; keep legacy server flags only when needed.

Required inputs before an inference answer

  • Checkpoint root and format.
  • Tokenizer type/files/model and vocabulary compatibility.
  • Model architecture args and parallel sizes.
  • Number of GPUs/ranks and whether coordinator mode is desired.
  • Prompt source: inline prompts, prompt file, generated tokens per request, output JSON path.
  • Sampling controls: temperature, top-k/top-p, max tokens.

Safety and validation

  • Do not start a long-running server unless the user explicitly requests it.
  • For command templates, prefer --help/dry command rendering first.
  • For server tasks, clarify bind host/port and whether external network exposure is intended.
  • Validate prompt lengths against context limits; chunked prefill changes the constraint.
  • Ensure all ranks receive a shutdown path in coordinator/server mode.

Boundaries

Skills enregistrées