Examples

March 7, 2026 ยท View on GitHub

Training examples ordered from simplest to most advanced.

ExampleGPUsBackendModelNodesDifficulty
hf-quickstart3HuggingFaceQwen3-8B1Easiest
qwen3-8b-single-node4+SGLangQwen3-8B1Easy
kimi-k25-2node-h20016SGLangKimi-K2.52Advanced
kimi-k25-3node-h10024SGLangKimi-K2.53Advanced

Quick start

If you just want to try TorchSpec locally, start with hf-quickstart (3 GPUs, no SGLang dependency):

./examples/hf-quickstart/run.sh

For production workloads with async inference, use qwen3-8b-single-node:

./examples/qwen3-8b-single-node/run.sh

Switching inference backends

Examples use SGLang by default. To use vLLM instead:

# Use vLLM backend with qwen3-8b-single-node example
./examples/qwen3-8b-single-node/run.sh \
    --config configs/vllm_qwen3_8b.yaml \

Data

Sample training data is in data/sample_conversations.jsonl. All examples that use local data point to this file by default.