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
backend: mlxno longer crashes when a split is smaller than one batch (#1851 by @dryn85-max in #1857). mlx-lm trains and evaluates in whole batches. A one-row validation split, which the defaultval_split: 0.1gives on the bundled 10-rowalpaca_tiny.jsonl, crashed at the first evaluation withDataset must have at least batch_size=2 examples, after the model had loaded. Such a split is now skipped with a warning that names both numbers and saysval_losswill be absent, and the run trains. A training split smaller than one batch is refused before the model loads. Try:soup train --config soup.yamlwithbackend: mlx,data.train: examples/data/alpaca_tiny.jsonlandbatch_size: 2.