Skip to content
Back to skills

Inference And Serving

ASecurity

"Use Colossal-Inference APIs and commands for LLM generation,

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

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/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-inference-and-serving)

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 Colossal-Inference APIs and commands for LLM generation,
  speculative decoding, diffusion inference, serving, and benchmark planning."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# Inference and Serving

Use this sub-skill when the task involves `colossalai.inference`, `InferenceConfig`, `InferenceEngine`, LLaMA generation, tensor-parallel inference, speculative decoding, Stable Diffusion 3 patched parallelism, or inference service/client benchmarks.

## Route Here

- Construct or interpret `InferenceConfig` and `InferenceEngine` usage.
- Generate safe `colossalai run` commands for LLM generation, tensor parallelism, drafter/speculative decoding, or diffusion prompts.
- Diagnose model path, tokenizer, policy, CUDA graph, KV cache, TP size, or patched parallelism errors.
- Plan serving/client/benchmark checks without starting a service by default.

## Reroute

- General install, `colossalai run`, and hostfile issues: use `../installation-and-launch/SKILL.md`.
- ShardFormer training/model-sharding and topology theory: use `../parallelism-and-sharding/SKILL.md`.
- Training/fine-tuning with Booster: use `../booster-training/SKILL.md`.
- ColossalChat or application-specific inference after training: use `../application-recipes/SKILL.md`.

## Fast Start

```python
from colossalai.inference import InferenceConfig, InferenceEngine
config = InferenceConfig(max_batch_size=8, max_output_len=256, tp_size=1)
```

Generate commands without running models:

```bash
python scripts/inference_command_builder.py llama --model /models/llama --max-length 128 --nproc-per-node 1
python scripts/inference_command_builder.py llama --model /models/main --drafter-model /models/draft --tp-size 2 --nproc-per-node 2
python scripts/inference_command_builder.py diffusion --model /models/sd3 --prompt "hello world" --nproc-per-node 2
```

## References and Helpers

- `references/inference-api.md` lists inspected `InferenceConfig`/`InferenceEngine` fields and API patterns.
- `references/llm-and-speculative-decoding.md` covers LLaMA generation, tensor parallelism, drafter models, and GLIDE caveats.
- `references/diffusion-serving-benchmarks.md` covers Stable Diffusion 3, patched parallelism, serving, clients, and benchmark safety.
- `references/troubleshooting.md` maps inference-specific failures to checks.
- `scripts/inference_command_builder.py` prints safe ColossalAI inference command templates.

## Operating Rules

- Do not download or load real model weights unless the user provided/approved the model path and compute budget.
- Align `--nproc_per_node` with tensor or patched parallelism sizes.
- Treat optimized CUDA kernels and CUDA graphs as optional acceleration paths; fall back to safer settings for debugging.

Files in this skill

  • SKILL.md2.8 KB
  • references/diffusion-serving-benchmarks.md1.1 KB
  • references/inference-api.md1.7 KB
  • references/llm-and-speculative-decoding.md1.4 KB
  • references/troubleshooting.md1.9 KB
  • scripts/inference_command_builder.py1.8 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.