Skip to content

Your data and one YAML file in.A fine-tuned model out.

Fine-tune open LLMs on your own GPU or Mac. Describe the run in soup.yaml, get a LoRA adapter back.

Get started
pip install "soup-cli[train]"

Walk through a first runPython 3.11 to 3.13, Apache-2.0

Fig. 1: soup.yaml goes into soup train, and a LoRA adapter comes out in output/.
soup.yaml goes into soup train; output/ comes outAn isometric machine on one deck. A card labelled soup.yaml slides into a unit whose screen reads soup train, with three reels, an epoch counter at 03 and a lit progress bar. A stack of plates, the Soup pixel mark standing on the top one, is the output folder with the trained adapter. An ember line runs along the deck through the unit, from input to output.soup.yamlsoup trainepoch
  1. 1 soup.yamlthe run
  2. 2 soup trainLoRA
  3. 3 output/the adapter

From an empty folder to a model you can talk to

Fig. 1, line by line, as soup-cli 0.78.0 prints it.

Every option

Just checking your setup?

20 example rows, trained on a small open model.

terminal
soup quickstart
  1. Step 1: Install

    [train] adds PyTorch.

    terminal
    pip install "soup-cli[train]"
    soup doctor
  2. Step 2: Write the config

    LoRA on Llama-3.1-8B, loaded on the GPU in 4-bit: more than a 4 GB card holds unless you stream the base (BETA, below). Gated base: set HF_TOKEN.

    terminal
    soup init --template chat
    Using template: chat
    Config saved to soup.yaml
    Next step: soup train --config soup.yaml
    soup.yaml, as the template writes it
    # Soup template: Chat Assistant
    # Fine-tune a model for conversational chat
    base: meta-llama/Llama-3.1-8B-Instruct
    task: sft
    # backend: unsloth # 2-5x faster, pip install "soup-cli[fast]"
    data:
    train: ./data/train.jsonl
    The Unsloth comment ships in the template; its 2-5x is Unsloth's figure, not Soup's.
  3. Step 3: Add your data

    One JSON row per example.

    terminal
    soup data demo alpaca_demo --output data/train.jsonl
    Copied bundle 'alpaca_demo' to …/data/train.jsonl
    soup data inspect ./data/train.jsonl
    Inspecting data/train.jsonl...
    …
    data/train.jsonl, one row
    {"instruction": "Translate to Spanish.", "input": "Hello, how are you?", "output": "Hola, ¿cómo estás?"}
  4. Step 4: Train

    Soup sizes the batch and asks once (--yes in scripts).

    terminal
    soup train --config soup.yaml
    Loading config from soup.yaml...
    Training Setup
    Device: …
    Memory: …
    Model: meta-llama/Llama-3.1-8B-Instruct
    Task: sft
    Backend: transformers
  5. Step 5: Use the adapter

    terminal
    soup chat --model ./output
    soup serve --model ./output
    Endpoints: /v1/chat/completions, /v1/models, /health
    soup export --model ./output --format gguf --quant q4_k_m
    output/
    output/
    ├ adapter_model.safetensors
    ├ adapter_config.json
    ├ tokenizer.json, chat_template.jinja
    ├ soup_run.json # base, run id, data SHA-256
    ├ rewind.jsonl # loss log for soup rewind
    └ checkpoint-…/

Pick the job. Get the command.

Coming from LLaMA-Factory, Axolotl or Unsloth? soup migrate converts your config.

Teach a model your task

Chat rows in, a tuned model out.

  • 21 templates
  • 181 recipes
  • vision and speech via [vision], [audio]
Browse the recipe catalog
terminal
soup init --template code
soup recipes list
soup recipes use whisper-tiny-asr
✓ Recipe whisper-tiny-asr written to soup.yaml
Next: soup train --config soup.yaml

Layer streaming, BETA

When the model is bigger than the card

The frozen base reaches the GPU one layer at a time, so peak VRAM follows a layer, not the model. Slower, for models that do not fit.

Llama-3.1-8B-Instruct in NF4: 3.32 GB peak VRAM at 119.6 tok/s on a 4 GB RTX 3050 Laptop, batch 1, sequence 512.

Measured on v0.72.2 at 952 MHz, before the NF4 gradient repair; a post-repair row from another RTX 3050 Laptop, taken at a different clock, is recorded, and the two are not directly comparable. The 8B numbers are supervised fine-tuning; no preference-loss run on 8B has been measured on a 4 GB card. DPO is not free in time (1.52x the layer reads, measured on the v0.72.4 stack), and no tok/s is claimed for a preference loss because none was measured. 8B is the largest size measured on that card.
Opt-in
training.stream_layers: true, BETA
Tasks
sft, dpo, orpo, simpo, kto, bco, ipo; not grpo or ppo
Models
11 architectures: Llama, Qwen, Mistral, Gemma, Phi, DeepSeek-V3
Setup
one GPU, transformers, text, plain LoRA, none or 4bit
Batch
a number; auto is refused
Guard
a pre-flight that refuses a run that will not fit

Upgrading from an older release? A run that finished may still be wrong. Run soup doctor --config soup.yaml first, then check what to re-run, release by release.

Fig. 2where the model lives while it trains
How layer streaming places the modelThe frozen base lives in CPU RAM or on an NVMe drive as a stack of decoder layers; one layer at a time is copied into VRAM buffers on the GPU, where the adapter, the embeddings and the head stay.CPU RAM or NVMefrozen base, one plate per layerone layer at a timeGPU VRAMGPU VRAM
Peak VRAM: about one layer, plus the buffers, adapter, embeddings and head.
soup.yaml, Llama-3.1-8B on a small card
base: meta-llama/Llama-3.1-8B-Instruct
task: sft
data:
train: ./data/train.jsonl
format: alpaca
max_length: 512
training:
stream_layers: true # opt-in, BETA
quantization: 4bit # NF4 store, about 4x smaller
batch_size: 1 # a number: auto is refused
lora:
r: 16
target_modules: [q_proj, v_proj]
output: ./output
Passes soup doctor --config on 0.78.0. It shows the keys; it is not the config the 119.6 tok/s row was measured with.

What you need

Pick your machine.

8+GB VRAM

for a 7B model with QLoRA, a rule of thumb. Less with layer streaming.

pip install "soup-cli[train]"
All requirements and extras
  • Python

    3.11 to 3.13

    3.10 installs v0.76.x

  • Models

    any Hugging Face-compatible model

    gated ones need HF_TOKEN

  • Data

    JSONL, JSON, CSV, Parquet, TXT

    format detected

  • Docker

    ghcr.io/makazhanalpamys/soup:0.78.0

    pass --yes

Works with

  • Hugging Face
  • Ollama
  • llama.cpp
  • vLLM
  • SGLang
  • Unsloth
  • DeepSpeed
  • ONNX
  • TensorRT
  • W&B

Before you install

The rest is in the docs FAQ.

How do I install Soup CLI?

Run pip install "soup-cli[train]" on Python 3.11 to 3.13. pip install soup-cli alone is a light core without PyTorch, for configs and the data tools. Where the system Python refuses pip (PEP 668), use pipx install "soup-cli[train]". On Python 3.10, pip installs v0.76.x instead.

Do I need a big GPU?

Not necessarily. soup init --template chat writes a LoRA run on a 4-bit base, far lighter than a full fine-tune. If the model still does not fit, training.stream_layers: true (BETA) streams the frozen base into VRAM one layer at a time; it is slower, so leave it off when the model fits.

Does it run on a Mac?

Yes, on Apple Silicon through MLX: pip install "soup-cli[mlx]", then set backend: mlx. It trains LoRA adapters for SFT, DPO, ORPO, SimPO, KTO and GRPO (built-in accuracy or format reward; an unquantized base or one pre-quantized to 4 bits), and task: preference with preference_loss dpo, orpo or simpo runs too. It also chats and merges natively. Upstream covers the 4-bit, preference, chat and merge paths only with a hosted macOS test job. Other tasks are refused at load.

Does Soup send my data anywhere?

Not unless you set it up to. Training reads your files on your machine; pushing to the Hub, cloud runs, LLM judges and experiment trackers are each something you configure. Telemetry is opt-in with SOUP_TELEMETRY=1, and the shipped release sends nothing even then.

In final testing, not on sale yet

Soup Zero

A desktop workbench on top of the CLI, in the making.

Explore the vision

Your first run starts with one install.

Read the Quick Start

pip install "soup-cli[train]"
Get started

Read the source

Free and Apache-2.0. No Soup account, no vendor lock-in.

Every performance number on this site is measured rather than claimed, most of them on a 4 GB laptop GPU. Donations buy GPU time for what that card cannot reach: multi-GPU, and a card we do not have to give back.

Want to help? Join Soup Tasters · Open the Tasters app

Soup sends nothing about your runs unless you ask it to.