Skip to content

armgit / Soup

Public Imported from GitHub
0

Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.

855 B
Raw Blame
# Soup template: MoE (Mixture of Experts) Fine-tuning
# Fine-tune a Mixture of Experts model with ScatterMoE LoRA
#
# Supported MoE models: Qwen3-30B-A3B, Mixtral-8x7B, DeepSeek-V3, etc.

base: Qwen/Qwen3-30B-A3B
task: sft
# backend: unsloth  # 2-5x faster, pip install "soup-cli[fast]"

data:
  train: ./data/train.jsonl
  format: alpaca
  val_split: 0.1
  max_length: 2048

training:
  epochs: 3
  lr: 1e-5
  batch_size: auto
  gradient_accumulation_steps: 8
  lora:
    r: 64
    alpha: 16
    target_modules: auto
    # peft adapts fused expert parameters through a ParamWrapper, which refuses a
    # non-zero dropout, so moe_lora: true and the 0.05 default cannot both hold
    # (#798). Every shipped MoE recipe pins this line for the same reason.
    dropout: 0.0
  quantization: 4bit
  moe_lora: true
  moe_aux_loss_coeff: 0.01

output: ./output