Home

The Internal Mechanics of LLMs

Understand the mechanisms, build tools, check their results

This second volume continues the journey of The Mechanics of LLMs. It explores building tools, measuring their results, inspecting representations and interpreting experiments with care.

The explanations can be read without running code. Python and familiarity with tables help readers reproduce the experiments. Controlled examples explain methods; they do not rank current models.

The Internal Mechanics of LLMs

Why a second volume?

A convincing answer is not, by itself, proof. This volume starts with an explicit task, builds a tool and asks which checks support a conclusion. It extends the foundations of the first volume with an investigative approach.

A reading path in four parts

1. Define before measuring

Specify the task, the computation and the reference used for comparison. Establish what a measurement can actually demonstrate.

2. Build and test

Explore classification, search, extraction and abstention. Build tools whose results can be tested rather than relying only on how convincing an answer appears.

3. Inspect and intervene

Examine representations, patching and adaptation. Distinguish what can be observed or decoded from evidence of what causes a result.

4. Transfer with care

Consider languages, formulations and counting on a corpus. Reassess controlled observations when the context changes.

Audience and prerequisites

  • Engineers and developers building tools around language models.
  • Advanced students and readers interested in evaluating experiments.
  • Technical leaders examining the results and limitations of a tool.

Python and familiarity with tables help reproduce the experiments. The explanations remain accessible without running the code.

Experiments and companion resources

The French edition described on LLM Mechanics presents 24 experiments. Examples using a small model and controlled datasets explain methods; they do not rank current models. Consult the companion repository for the available resources and instructions.

Editions and formats

French, English, Spanish and Portuguese editions are available in paperback and Kindle formats. The buttons above distinguish the language of each edition and its format, with links checked in KDP. LLM Mechanics also provides the reading path and the Lab.

Presentation, editions and reading path on LLM Mechanics

Search