Soup Adapts a Language Model for MacBook Incidents

Soup, an open-source tool, allows for fine-tuning a small language model using examples and a YAML recipe. A trial on an Apple Silicon M5 MacBook, equipped with 24 GB of memory, applies this method to incident report writing.
Measurements and Tests of the Fine-Tuned Model
During the trial, the training loss decreased from 1.3162 to 0.6749, with 9 examples used for training and 3 reserved for validation. This error measure is better the lower it is. The validation loss reached 1.0636. The adapter saved in output occupies 2.1 MB.
The comparison involves submitting four identical notes to the initial model and then to its fine-tuned version. Three are presented as new to the model. In a test with the note alone, the fine-tuned version responded like the initial model. The tester recommends revisiting the instruction used for training during inference.
The selected cases involve a slow billing table, without a confirmed resolution time, failed searches with log examination, a restored download under supervision, and notifications with an unconfirmed status. The script make_prompts.py must gather these notes and their instructions into prompts.jsonl. The commands set the temperature to 0, a setting presented as making responses repeatable, with a limit of 80 tokens. The outputs must be separated into out_base.jsonl and out_tuned.jsonl; for the fine-tuned version, the command specifies the adapter ./output as well as the initial model.
Hardware Conditions of the Trial
The documentation favors NVIDIA GPUs, but the trial on Mac uses MLX, the engine designed for Apple Silicon. The NVIDIA procedure, not tested in this experiment, requires installing soup-cli[train] and removing the line backend: mlx. The required environment includes Python 3.11 to 3.13 and about 2.5 GB available on disk. An internet connection is necessary at the start, without an API key.
The installation performed uses uv, Python 3.12, and the package soup-cli[mlx,train] fixed at version 0.77.2. Creating the environment with python -m venv and installation with pip are also suggested. The command soup --version allows checking that the tool is installed.
Soup automatically downloads the public model during the first training. The tester reports retrieving 7 files from Hugging Face, totaling about 950 MB, in 1 minute and 12 seconds with their connection. Subsequent launches reuse the local files and are described as much faster.
Le brief IA que les pros lisent chaque soir
Les 7 actus IA du jour, décryptées en 5 min. Gratuit.
Inclus dès l'inscription : notre sélection des meilleurs guides & comparatifs IA.
Choisissez votre rythme
Gratuit · Pas de spam · Désabonnement en 1 clic
Fictional Examples of Incident Reports
The exercise imposes an output limited to three lines, labeled STATUS, IMPACT, and NEXT. No cause, resolution time, or other fact absent from the note should be added. Situations as well as expected responses are fictional. In the soup-incident-demo folder, make_data.py is intended to prepare 12 examples in JSONL format.
These data follow the Alpaca format, recognized by Soup: instruction describes the task, input contains the note, and output provides the target response. The investigation situations cover checkout errors with gateway log inspection, slowed connections with authentication trace examination, expired searches with sampling of failed requests, and repeated payment attempts with verification of provider errors. The command soup data validate data/train.jsonl is used to check the file.
The monitoring situations focus on restored checkout with error tracking, searches returned to normal with p95 latency tracking, stabilized connections after correction, and order delays being resolved with queue observation. For resolved incidents, proposed actions include closing an API ticket, publishing a summary on checkout, or sharing a synthesis on connections. The disappearance of expired searches is associated with a timeline refresh.
An Adapter Trained with LoRA
Supervised learning brings a request closer to an expected response. Soup here loads Qwen2.5-0.5B-Instruct, a public model under the Apache-2.0 license, and then applies LoRA: the initial weights remain fixed while an additional file, the adapter, is trained. This method comes from research in 2021, not from Soup. Axolotl, LLaMA-Factory, and Unsloth also offer model fine-tuning.
Soup combines preparation, training, and testing in a command-line interface, driven by data and a recipe. The file soup.yaml designates Qwen/Qwen2.5-0.5B-Instruct, the mlx engine, the file ./data/train.jsonl, and the folder ./output. It also specifies quantization: none. The parameters val_split: 0.2 and epochs: 3 correspond to reserving 3 examples out of 12 and three complete passes over the data, called epochs. However, they do not appear in the provided YAML block.
The command soup train --config soup.yaml --yes starts the operation without asking for interactive confirmation, which is suitable for script execution. Without this option, Soup presents the configuration and requests confirmation in the terminal. The indications target_modules and warmup do not signal errors. The end of processing is announced by the message "Training completed!"
Brief IA — L'actualité IA en français
L'essentiel de l'actualité de l'intelligence artificielle, décrypté et expliqué chaque jour.