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: true and the frozen base never enters VRAM at all. That works for sft and, since v0.72.4, for dpo, orpo, simpo and kto, 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.

yaml
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: 16

Direct Preference Optimization (DPO)

Train with preference pairs (chosen vs rejected).

yaml
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: 16

Group Relative Policy Optimization (GRPO)

Reasoning training (DeepSeek-R1 style) with reward functions instead of a reward model.

yaml
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: 16

Built-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:

python
# 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.

yaml
# 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: 16

All Training Tasks

All 23, exactly as the schema accepts them.

TaskDataUse Case
sftalpaca/sharegpt/chatml/llavaInstruction tuning
dpoprompt+chosen+rejectedPreference alignment
online_dpoprompts + a judge or a reward modelOn-policy preference with a judge in the loop (v0.71.31)
grpoprompts + reward fnsReasoning (DeepSeek-R1); a PRM can score every step
ppoprompts + reward model/fnFull RLHF stage 3
ktoprompt+completion+labelUnpaired preference
bcoprompt+completion+labelBinary classifier optimization
orpoprompt+chosen+rejectedReference-free alignment
simpoprompt+chosen+rejectedLength-normalized preference
ipoprompt+chosen+rejectedRegularized preference
preferenceany preference formatUnified dispatcher; picks the loss for you
reward_modelprompt+chosen+rejectedRLHF stage 2
prmstep-labelled reasoning (prm)Process reward model, graded per step
pretrainplaintext (raw text)Continued pre-training
embeddinganchor+positive(+negative)Sentence embeddings
classifiertext + label (num_labels)Sequence classification
rerankerquery + document + labelReranking
cross_encoderpair + labelCross-encoder scoring
distilldata + a teacher_modelKnowledge distillation, incl. cross-tokenizer ULD and MiniLLM
unlearna forget setNPO / SimNPO / RMU removal
ttsaudioText-to-speech (BETA, hardware-gated)
asr{"audio": path, "text": transcript}Whisper fine-tuning with WER/CER (v0.71.32)
moe_lora_routingalpaca/sharegptMoLE per-token gating over N task LoRAs (v0.67)

Running Training

bash
# 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.