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.

993 B
Raw Blame
  • DPO runs natively on Apple Silicon: task: dpo with backend: mlx (#1846 by @dryn85-max). It was refused at config load because the MLX wrapper was scaffolding. Soup now runs its own MLX loop with TRL's default sigmoid loss and training.dpo_beta. Rows are read by the same format: dpo converter as on the transformers backend and tokenized the way TRL 0.29 does, except that ties and rows the chat template cannot slice are skipped with a count, and per-row tools are not applied. No second model is loaded: reference log-probs are precomputed from the base model. training.seed and training.data_seed are honoured, and the vocabulary head runs in checkpointed chunks to keep long pairs in memory. Measured once on an M4 Pro, Qwen2.5-0.5B-Instruct trained faster than TRL on MPS with the same bf16 weights and less process memory. Try: soup train --config soup.yaml with task: dpo, backend: mlx and base: mlx-community/Qwen2.5-0.5B-Instruct-4bit.