Training Methods
Soup supports 23 training tasks via the task config key. That number is the exact cardinality of the task field in the config schema, not a marketing round-up: the full list is in All Training Tasks below. Switching method means changing one line of YAML, not changing tools.
soup edit set (ROME / MEMIT / AlphaEdit) and soup steer train (CAA / ITI / RepE) are not task: values. They are weight-surgery and inference-time commands, documented under Unlearning & knowledge editing and RAG & steering.
If the model does not fit in your card, add
training.stream_layers: trueand the frozen base never enters VRAM at all. That works forsftand, since v0.72.4, fordpo,orpo,simpoandkto, with DPO's reference model taken from the same stream with its adapters switched off, so it costs no extra weights. See Layer streaming and Preference losses over streaming.
Supervised Fine-Tuning (SFT)
The most common method. Train on instruction-response pairs.
base: meta-llama/Llama-3.1-8B-Instruct
task: sft
data:
train: ./data/train.jsonl
format: alpaca
training:
epochs: 3
lr: 2e-5
batch_size: auto
quantization: 4bit
lora:
r: 64
alpha: 16Direct Preference Optimization (DPO)
Train with preference pairs (chosen vs rejected).
base: meta-llama/Llama-3.1-8B-Instruct
task: dpo
data:
train: ./data/preferences.jsonl
format: dpo
training:
dpo_beta: 0.1
quantization: 4bit
lora:
r: 64
alpha: 16Group Relative Policy Optimization (GRPO)
Reasoning training (DeepSeek-R1 style) with reward functions instead of a reward model.
base: meta-llama/Llama-3.1-8B-Instruct
task: grpo
data:
train: ./data/reasoning_train.jsonl
format: sharegpt
max_length: 4096
training:
grpo_beta: 0.1
num_generations: 4
reward_fn: accuracy # or 'format', or path to custom .py
quantization: 4bit
lora:
r: 64
alpha: 16Built-in reward functions:
accuracy— checks if the final answer matches expected (supports####and\boxed{}formats)format— checks for structured<think>...</think>reasoning blocks
Custom reward functions — point to a Python file:
# my_reward.py
def reward_fn(completions, **kwargs):
return [1.0 if "correct" in c[-1]["content"] else 0.0 for c in completions]PPO / Full RLHF Pipeline
Three-step pipeline: SFT warmup -> Reward Model -> PPO alignment.
# Step 3: PPO alignment
base: meta-llama/Llama-3.1-8B-Instruct
task: ppo
data:
train: ./data/prompts.jsonl
format: chatml
training:
reward_model: ./output_rm # From step 2
ppo_epochs: 4
ppo_clip_ratio: 0.2
ppo_kl_penalty: 0.05
quantization: 4bit
lora:
r: 64
alpha: 16All Training Tasks
All 23, exactly as the schema accepts them.
| Task | Data | Use Case |
|---|---|---|
| sft | alpaca/sharegpt/chatml/llava | Instruction tuning |
| dpo | prompt+chosen+rejected | Preference alignment |
| online_dpo | prompts + a judge or a reward model | On-policy preference with a judge in the loop (v0.71.31) |
| grpo | prompts + reward fns | Reasoning (DeepSeek-R1); a PRM can score every step |
| ppo | prompts + reward model/fn | Full RLHF stage 3 |
| kto | prompt+completion+label | Unpaired preference |
| bco | prompt+completion+label | Binary classifier optimization |
| orpo | prompt+chosen+rejected | Reference-free alignment |
| simpo | prompt+chosen+rejected | Length-normalized preference |
| ipo | prompt+chosen+rejected | Regularized preference |
| preference | any preference format | Unified dispatcher; picks the loss for you |
| reward_model | prompt+chosen+rejected | RLHF stage 2 |
| prm | step-labelled reasoning (prm) | Process reward model, graded per step |
| pretrain | plaintext (raw text) | Continued pre-training |
| embedding | anchor+positive(+negative) | Sentence embeddings |
| classifier | text + label (num_labels) | Sequence classification |
| reranker | query + document + label | Reranking |
| cross_encoder | pair + label | Cross-encoder scoring |
| distill | data + a teacher_model | Knowledge distillation, incl. cross-tokenizer ULD and MiniLLM |
| unlearn | a forget set | NPO / SimNPO / RMU removal |
| tts | audio | Text-to-speech (BETA, hardware-gated) |
| asr | {"audio": path, "text": transcript} | Whisper fine-tuning with WER/CER (v0.71.32) |
| moe_lora_routing | alpaca/sharegpt | MoLE per-token gating over N task LoRAs (v0.67) |
Running Training
# Start training
soup train --config soup.yaml
# Resume from checkpoint
soup train --config soup.yaml --resume auto
soup train --config soup.yaml --resume ./output/checkpoint-500
# With W&B logging
soup train --config soup.yaml --wandb
# With TensorBoard
soup train --config soup.yaml --tensorboard
# With DeepSpeed (multi-GPU)
soup train --config soup.yaml --deepspeed zero2
# With FSDP2
soup train --config soup.yaml --fsdp full_shard
# Skip confirmation
soup train --config soup.yaml --yes
# Continual learning: rehearse an old dataset so the new task
# does not erase it (v0.71.36, sft/pretrain only)
soup train --config new_task.yaml --replay old_task.jsonl --replay-ratio 0.1--replay interleaves a seeded sample of old_task.jsonl into training; --replay-ratio is the fraction of the final mixed set. Validation stays pure new-task. See Data Moat II for the full mechanism and its measured limits.
Soup 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.