Getting Started
Installation
As of v0.71.0 the install is split. pip install soup-cli is a light, PyTorch-free CLI + data-tools install — soup init, soup data …, and the inspection commands all work on it. To fine-tune, add the [train] extra:
# Light core: CLI + config + data tools, no PyTorch
pip install soup-cli
# Add the training stack (torch, transformers, peft, trl, datasets, …)
pip install "soup-cli[train]"
# Everything (train + serve + ui + data + mcp) in one shot
pip install "soup-cli[all]"
# Or from GitHub (latest dev)
pip install git+https://github.com/MakazhanAlpamys/Soup.gitUpgrading from ≤ v0.70?
pip install soup-clino longer pulls PyTorch. If you train, reinstall withpip install "soup-cli[train]"— a missing heavy dependency now surfaces a friendly *"Training needs the [train] extra"* message instead of anImportError.
Requirements
Default: resident QLoRA
- Python 3.10 to 3.12 (the floor was raised from 3.9 in v0.71.0; v0.73.0 added the upper bound, because on 3.13 and above pip resolved untested PyTorch wheels that crash inside the native extension before Soup runs)
- CUDA-compatible GPU (recommended); Apple Silicon (MPS) or CPU (experimental) also work
- 8 GB+ VRAM for 7B models with QLoRA
If the model does not fit: layer streaming (opt-in, BETA)
- Set
training.stream_layers: trueinsoup.yamland the frozen base never loads into VRAM: Llama-3.1-8B fine-tunes in 3.32 GB on a 4 GB card. Slower than resident training, so leave it off for a model that already fits. See Layer Streaming.
Streaming bounds the decoder stack to one layer at a time. Embeddings and the logits tensor stay resident, so peak VRAM still depends on the model, just much less.
Optional Extras
pip install "soup-cli[train]" # Training stack: torch, transformers, peft, trl, …
pip install "soup-cli[fast]" # Unsloth 2-5x training speedup
pip install "soup-cli[mlx]" # Apple Silicon backend (M1–M4)
pip install "soup-cli[serve]" # FastAPI inference server
pip install "soup-cli[serve-fast]" # vLLM backend
pip install "soup-cli[sglang]" # SGLang backend
pip install "soup-cli[eval]" # lm-evaluation-harness
pip install "soup-cli[data]" # MinHash dedup + semantic split (scikit-learn)
pip install "soup-cli[data-pro]" # langdetect + Presidio PII
pip install "soup-cli[vision]" # Pillow for vision fine-tuning
pip install "soup-cli[audio]" # librosa + soundfile
pip install "soup-cli[qat]" # Quantization-aware training
pip install "soup-cli[liger]" # Liger Kernel fused ops
pip install "soup-cli[onnx]" # ONNX export
pip install "soup-cli[tensorrt]" # TensorRT-LLM export
pip install "soup-cli[awq]" # AWQ / GPTQ quantized export
pip install "soup-cli[ui]" # Web UI dashboard
pip install "soup-cli[tui]" # Full-screen Textual dashboard
pip install "soup-cli[trackers]" # MLflow / SwanLab / Trackio logging
pip install "soup-cli[deepspeed]" # ZeRO distributed training
pip install "soup-cli[ring-attn]" # Ring FlashAttention
pip install "soup-cli[remote]" # Remote datasets (s3 / gs / az / oci)
pip install "soup-cli[sign]" # ed25519 adapter / attestation signing
pip install "soup-cli[compile]" # DSPy / GEPA / TextGrad prompt compiler
pip install "soup-cli[carbon]" # codecarbon energy / CO2 tracking
pip install "soup-cli[modal]" # Serverless cloud GPU (soup train --cloud modal)
pip install "soup-cli[mcp]" # MCP server (soup mcp serve) for coding agents
pip install "soup-cli[cce]" # Cut Cross-Entropy (training.use_cut_ce)
pip install "soup-cli[mix]" # scikit-optimize, for soup data mix --optimize
pip install "soup-cli[pdf]" # reportlab, for the EU AI Act Annex XI/XII PDFs
pip install "soup-cli[dev]" # the test and lint stack, for contributingUse double quotes, and here is why
pip install "soup-cli[train]" is the only spelling that works in every shell: cmd.exe, PowerShell, bash and zsh. Every command above uses it.
Older tutorials and videos, including some of ours, show the single-quoted pip install 'soup-cli[train]'. That is bash, zsh and PowerShell syntax. Windows cmd.exe has no single-quote quoting, so it hands the quotes straight to pip:
ERROR: Invalid requirement: "'soup-cli[train]'": Expected package name at the start of dependency specifierIf you hit that, swap the ' for ". Nothing is wrong with the package: pip is rejecting a literal quote character. Dropping the quotes entirely also works on Windows, but then zsh reads [train] as a glob and fails instead.
Quick Start
1. Create a config
# Interactive wizard
soup init
# Or use a template
soup init --template chat2. Train
soup train --config soup.yamlSoup automatically detects your GPU, sets optimal batch size, configures LoRA, and begins training.
3. Chat with your model
soup chat --model ./output4. Push to HuggingFace
soup push --model ./output --repo your-username/my-model5. Export and serve
# Export to GGUF for Ollama / llama.cpp
soup export --model ./output --format gguf --quant q4_k_m
# Start OpenAI-compatible server
soup serve --model ./output --port 8000Health Check
Check your environment for compatibility issues:
soup doctorShows Python version, GPU availability, all dependency versions, and fix suggestions.
Quick Demo
Run a complete demo in one command:
soup quickstart # Creates sample data + config + trains TinyLlama
soup quickstart --dry-run # Just create files without trainingSoup is free and Apache-2.0. If it saved you a training run, starring the repo costs nothing and helps most. You can also fund the GPU time behind the work a 4 GB laptop cannot reach.