Fine-tune LLMs from one YAML. Layer streaming trains an 8B model on a 4 GB laptop GPU.
Python cliconsumer-gpudpofine-tuningggufhuggingfacellmllmopslocal-ailocal-llmloralow-vrammachine-learningollamapeftpythonpytorchqlorasfttransformers
- DPO runs natively on Apple Silicon:
task: dpowithbackend: 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 andtraining.dpo_beta. Rows are read by the sameformat: dpoconverter 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-rowtoolsare not applied. No second model is loaded: reference log-probs are precomputed from the base model.training.seedandtraining.data_seedare 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.yamlwithtask: dpo,backend: mlxandbase: mlx-community/Qwen2.5-0.5B-Instruct-4bit.