For everyone — Continuing professional training, for a machine

A young engineer joins a company with plenty of general knowledge already — science, languages, culture — but knows neither the trade's vocabulary, nor how a report is written here, nor the internal rules. Their first months don't turn them into a different person: they adjust, on top of vast tacit knowledge, a thin layer of local "ways of speaking and doing". The fine-tuning of a language model works exactly the same way: you start from an open weight model — Mistral, Qwen, Llama — that already knows how to speak, reason, and code, and you tune it on the texts of a specific activity: procedures, technical notes, correspondence.

The appeal fits in one sentence: the online service remains a supplier, whereas the model fine-tuned at home becomes a competence — tuned to your vocabulary, hosted on your own hardware, deployable in your own programs, and reproducible: with the same corpus and the same recipe, you land on an equivalent model, the way software is rebuilt from its sources. This article explains what the state of the art allows today (the techniques, what they cost, what they don't erase), then how a documentation corpus becomes, via a continuous integration pipeline, a maintained model — and finally what this loop changes for an AI methodology like the one Yokul is building.

The full text

A refresher: where fine-tuning sits in a LLM's learning

A language model (the LLM explains this in detail) goes through three stages:

  1. Pre-training — very expensive, weeks of computation on thousands of GPUs: learning the language, the world, the code, by predicting the next word over billions of texts. This is the step that no mid-sized organization does over.
  2. Supervised fine-tuning (SFT) — learning to do what is being asked: follow an instruction, hold the assistant role, adopt a response format. The corpus becomes a list of (instruction, expected response) pairs.
  3. Preference alignment — making the responses more useful, safer, better "written", through reinforcement learning or through simpler methods known as direct preference methods (DPO: showing two responses, the better and the lesser one, is largely enough).

The fine-tuning discussed here covers stages 2 and 3 redone locally on a downloaded "base model" — never stage 1.

State of the art 1: PEFT — cutting the cost of tuning by orders of magnitude

The historical obstacle to fine-tuning was arithmetic: a 7-billion-parameter model stores every weight in memory and updates it — tens of gigabytes for the gradients alone. The decisive innovation of recent years, PEFT (parameter-efficient fine-tuning), starts from an observation: you don't need to rewrite all the knowledge, just a way of using it. So you freeze the base model and train only a small additional layer:

  • LoRA (low-rank adaptation): instead of rewriting the weight matrices, you insert alongside them very modest matrices (a few tens of millions of parameters), which alone are trained. The original model stays untouched; the resulting "adapter" weighs a few tens of megabytes — versionable in Git like code, fully usable in a continuous integration pipeline.
  • QLoRA, the great trick for small budgets: the frozen model is first quantized to 4 bits (each weight compressed from 16 to 4 bits), which divides the memory footprint by 4, while the adapter trains in reduced precision. The result: tuning a 7B model on a consumer graphics card, and a 24B model on craftsman-grade hardware.
  • Interchangeable adapters: a common base can carry several LoRAs — one adapter per trade, per tone, per task — swappable at runtime. This is the same thinking as separating the description of behaviors from their execution: the base partitions the general competence, the adapters specialize how it is read.

The trade-off remains real: an adapter conveys style and vocabulary perfectly, but adds no solid knowledge base. To make the model know texts, RAG is the better fit — indexing and document retrieval at question time. The rule of thumb that won consensus: RAG for knowledge that evolves, fine-tuning for the how-to (format, tone, procedures, output structures), with the two commonly combined.

State of the art 2: the corpus, the real raw material

The quality of a fine-tuned model is bounded above all by the quality of its corpus. The unglamorous but decisive phase is building the dataset:

  • Collection and cleaning: extracting the texts from the documentation system (PDFs, wikis, business messaging tools), removing duplicates, empty technical files, personal data, and normalizing formats.
  • Structuring into tasks: turning raw documents into usable examples — an excerpt and its question, a procedure and its summary, a draft and its final version. Many training corpora today are synthesized: a much larger general-purpose model generates the pairs out of the documents, under the eyes of a human who validates the samples.
  • Diversity and balancing: covering task and document types, not only the most frequent topics — masses of redundant examples have less effect than a thousand varied ones.
  • The held-out evaluation set: as soon as the corpus is built, a similar sample is set aside, never seen during training, to objectively arbitrate the model produced.

A corpus of a few hundred to a few thousand well-made examples is enough to transform the behavior of a 7–8 billion model on a given domain: it is this economy that made craftsman-level fine-tuning possible.

State of the art 3: the pipeline, from commit to served model

The techniques above are only worth what the discipline that hosts them is worth — the very subject of the article Continuous integration, from software to language models. The complete loop, modeled on software's:

Fine-tuning pipeline: versioned corpus, dataset preparation, LoRA/QLoRA training, evaluation (failure or success), .gguf quantization, weight registry, self-hosted inference server, user agents.

Free tools cover the whole pipeline: for training (Unsloth, Axolotl, LLaMA-Factory, peft/Hugging Face), for evaluation, quantization, and serving (llama.cpp, vLLM, Ollama) — all runnable on craftsman-grade hardware. See the article Self-hosting LLMs and distributing execution to agents.

Interpretation: what this loop means

Three readings give all of this its meaning.

Documentation. The documentation corpus is the formalized memory of an activity. By versioning it and turning it into a training set, you take it across a threshold: it no longer serves only to be read, it serves to produce conformance — the model reproduces the trade's vocabulary, manners, and exceptions even when the document's author is long gone. The CI pipeline guarantees that this transmission stays controlled: every model is the sum of a corpus and a recipe, both dated, replayable, and open to discussion.

Methodological. The corpus → model → evaluation → field-feedback loop is, methodologically, a classical knowledge cycle — collection, modeling, control, revision — accelerated by an order of magnitude. It changes the relationship to AI: the model stops being an external oracle and becomes an input of the same kind as a compiler or a library — a tool of the methodology, not the methodology. A badly governed LLM remains what the article Answering without understanding describes: a plausibility machine; it is the pipeline — traced corpora, evaluations, thresholds — that turns it into a trustworthy tool, measure by measure.

Modeling. The deepest meaning, for a project like Yokul: a fine-tuned model is a layer of learned behavior added on top of described behaviors. The ingredients exist: behavior is described separately from its execution, and a LLM can be one of the possible executions of a descriptor — the LLM article speaks of a "probabilistic orchestrator of exact components". The fine-tuning loop adds the missing piece: the probabilistic execution tunes itself to the corpora of the world it populates, the way an actor learns the part they are given.

What Yokul takes from it

The organization builds virtual worlds where actors perceive, learn, and transmit. The fine-tuning + CI + local self-hosting pipeline gives that ambition a workable methodology: the organization's corpora (simulation rules, ontologies of perception, quest texts) become datasets; the Mistral open weight models become specialized executions of behaviors — one model per narrative register, per type of actor; and the CI pipeline provides what every exercise of this kind was missing: a way to know, each week, whether the world's actors still carry the right vocabulary and still act correctly.

See also the next article, on distributing execution to agents.

See also