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
- KTO runs natively on Apple Silicon:
task: ktowithbackend: mlx(#2000 by @dryn85-max in #2111). It was refused at config load. Soup's own MLX loop now trains TRL 0.29.1's KTO objective withtraining.kto_beta: summed completion log-ratios against a reference precomputed once from the base model, and a detached KL estimate built from TRL's own mismatched rows. Batches run in dataset order, as in TRL. Rows that fit inmax_lengthtrain on the same tokens on either backend. Labels are read by the loader's KTO converter, exactly as on the transformers backend. An empty completion, or a prompt that leaves no completion room, is refused before training.batch_sizestays at least 2, and a run whose gradient accumulation cuts the last batches warns naming them.--resumerefuses another task or base, and a nonfinite loss stops the run.quantization: 8bit,lora.r: 0, non-text modalities, DoRA and LoRA+ are refused on MLX. Try:soup train --config soup.yamlwithtask: kto,backend: mlxandformat: ktodata.