Skip to content
Back to skills

Inference And Serving

ASecurity

"Use Megatron-LM offline inference, high-level LLM APIs,

  • 247 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added September 8, 2026
toolspythonapifrontend

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 6 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill inference-and-serving --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Inference And Serving?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Inference And Serving
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-inference-and-serving-083ee6bc/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-inference-and-serving-083ee6bc)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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

- For offline and server workflows, command shapes, and mode choices, read [references/inference-workflows.md](references/inference-workflows.md).
- For high-level API signatures and lifecycle, read [references/api-reference.md](references/api-reference.md).
- For coordinator, prompt length, checkpoint/tokenizer, CUDA graph, and server failures, read [references/troubleshooting.md](references/troubleshooting.md).
- Use [scripts/render_offline_inference_command.py](scripts/render_offline_inference_command.py) or [scripts/render_inference_server_command.py](scripts/render_inference_server_command.py) to render safe templates without starting inference.

## Route by task

| Task | Action |
|---|---|
| Batch/offline generation | Choose sync direct vs coordinator vs async; render an offline command template. |
| Start HTTP/OpenAI-compatible server | Use coordinator mode and server template; confirm ports and frontend replicas. |
| Use Python high-level API | Read API reference for `MegatronLLM`, `MegatronAsyncLLM`, `ServeConfig`, and `SamplingParams`. |
| Debug checkpoint/tokenizer load | Route checkpoint-format issues to checkpointing, then return to inference context limits. |
| Compare legacy tools vs high-level API | Prefer 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

- Install/CUDA readiness belongs to [../install-and-environment/SKILL.md](../install-and-environment/SKILL.md).
- Checkpoint conversion/resharding belongs to [../checkpointing-and-conversion/SKILL.md](../checkpointing-and-conversion/SKILL.md).
- Training and data preprocessing belong to [../training-cli-and-data/SKILL.md](../training-cli-and-data/SKILL.md).

Files in this skill

  • SKILL.md3 KB
  • references/api-reference.md2 KB
  • references/inference-workflows.md2.4 KB
  • references/troubleshooting.md2.1 KB
  • scripts/render_inference_server_command.py1.5 KB
  • scripts/render_offline_inference_command.py1.4 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.