Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
0
4.2k
<|im_start|>system
You are an operations copilot. Confirm the blast radius of anything you change, and prefer a staged rollout over a single switch.
# Reasoning effort
Reasoning effort is set to low. Think briefly through only the essential steps in the user's language, then proceed directly to the answer.
# Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"type": "function", "function": {"name": "deploy.rollout", "description": "Roll a release out to a named environment, optionally staged.", "parameters": {"type": "object", "properties": {"environment": {"type": "string"}, "release_tag": {"type": "string"}, "strategy": {"type": "object", "description": "{kind, batch_pe...
</tools>
For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
<tool_call>
{"name": <function-name>, "arguments": <args-json-object>}
</tool_call><|im_end|>
<|im_start|>user
Ship v9.2.4 to production, but carefully.<|im_end|>
<|im_start|>assistant
<think>
Careful means staged. I will move ten percent first and pause long enough that an error budget breach shows up before the next batch goes out.
</think>
<tool_call>
{"name": "deploy.rollout", "arguments": {"environment": "production", "release_tag": "v9.2.4", "strategy": {"kind": "canary", "batch_percent": 10, "pause_seconds": 600}, "notify": ["oncall@example.net", "#releases"], "halt_on_error": true, "budget_seconds": 5400}}
</tool_call><|im_end|>
<|im_start|>user
<tool_response>
{
"failure": {
"kind": "precondition",
"detail": "environment production is frozen",
"window": "2026-08-10T00:00Z/2026-08-12T00:00Z",
"override_role": "release-captain"
}
}
</tool_response><|im_end|>
<|im_start|>assistant
<think>
A change freeze, not a technical failure. Overriding it needs a role I was not given, so the honest move is to stage into the pre-production environment and hand the freeze decision back rather than route around it.
</think>
<tool_call>
{"name": "deploy.rollout", "arguments": {"environment": "preprod", "release_tag": "v9.2.4", "strategy": {"kind": "canary", "batch_percent": 25, "pause_seconds": 300}, "notify": ["#releases"], "halt_on_error": true, "budget_seconds": 3600}}
</tool_call><|im_end|>
<|im_start|>user
<tool_response>
{"accepted": true, "batches": 4, "eta_minutes": 25}
</tool_response><|im_end|>
<|im_start|>assistant
<think>
</think>
Production is under a change freeze until 12 August and lifting it needs the release-captain role, which I do not hold. I staged v9.2.4 into preprod instead — four batches, about 25 minutes. Once the freeze lifts the same call against production will work unchanged.<|im_end|>
<|im_start|>system
# Reasoning effort
Reasoning effort is set to high. Think carefully through the task in the user's language, validate key assumptions, consider plausible alternatives, and prioritize correctness and clarity.
# Tools
You may call one or more functions to assist with the user query.
You are provided with function signatures within <tools></tools> XML tags:
<tools>
{"type": "function", "function": {"name": "inventory.lookup", "description": "Look up a part in the warehouse inventory.", "parameters": {"type": "object", "properties": {"sku": {"type": "string"}}, "required": ["sku"]}}}
</tools>
For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:
<tool_call>
{"name": <function-name>, "arguments": <args-json-object>}
</tool_call><|im_end|>
<|im_start|>user
How many D4820 do we have left?<|im_end|>
<|im_start|>assistant
<think>
One lookup answers this.
</think>
<tool_call>
{"name": "inventory.lookup", "arguments": {"sku": "D4820"}}
</tool_call><|im_end|>
<|im_start|>user
<tool_response>
{"sku": "D4820", "on_hand": 268, "reserved": 40, "warehouse": "Memphis"}
</tool_response><|im_end|>
<|im_start|>assistant
<think>
</think>
Stock figures for D4820 are above; the reserved count is already committed to open orders, so subtract it before promising anything.<|im_end|>
End of preview. Expand in Data Studio

calib-corpora

A pool of calibration material, the recipes that turn it into a calibration set for one specific model, and the measurement corpora those quants are scored against.

This repository is not a corpus. Nothing here is meant to be fed to llama-imatrix as-is except the files under builds/, and each of those was made for one named model and is close to useless for any other.

Why it is built this way

The first version of this repository was a single calib_train.txt. It had DeepSeek-V4's chat markup baked into its agentic and reasoning slices and a vocabulary sweep built for DeepSeek's 129,280 embedding rows. Pointed at meta-models/Muse-Glimmer-30B it covered 47.56% of that model's 202,048 rows. Rebuilt from the same material under a Muse Glimmer recipe, it covered 97.22%.

Two things are bound to a target model and nothing else is: the chat markup and the vocabulary. So those are the only two things a build re-derives. Everything else lives in the pool, model-agnostic, and is shared by every build.

Layout

pool/       raw units, model-agnostic. One JSON object per line, each with
            licence and provenance. Dialogue is stored as structured
            `messages`, never as rendered markup.
recipes/    one YAML file per target model: shares, budgets, tokenizer, seed
builds/     the output of tools/build.py under a recipe, with a manifest
eval/       measurement corpora, disjoint from every build by construction
tools/      the pipeline
archive/    material that has been imported into the pool and is kept only
            so its origin stays visible

builds/dsv4-flash-0731/ also contains the pipeline that produced it. That code predates the pool and recipe split, held its budgets as Python constants, and is kept as it was. It is history, not an alternative to tools/.

Builds

build recipe tokens notes
muse-glimmer-30b recipes/muse-glimmer-30b.yaml 4,901,495 first build under the pool and recipe split
nemotron-3.5-lightning recipes/nemotron-3.5-lightning.yaml see manifest hybrid Mamba2, expert rows do not divide by 256
qwen3.8-27b recipes/qwen3.8-27b.yaml 4,967,044 3,004 documents, 50.87% synthetic
dsv4-flash-0731 recipes/dsv4-flash-0731.yaml 1,868,626 predates this format, recipe is a reconstruction
kolibri-1-moe recipes/kolibri-1-moe.yaml 5,598,775 4,773 documents, German 21.4% (pool/german/), reasoning_effort rendered; calib_longctx 771,843 tokens in 29 documents

Every build carries a manifest.json with the recipe hash, the tokenizer hash, the corpus hash, requested against actual shares, per-category token counts, document length percentiles, and the hash of every pool shard that existed when it ran. Read that file rather than this table when the number has to be right.

Running the imatrix

llama-imatrix -m <model>-BF16.gguf \
  -f builds/<build>/calib_train.txt \
  --parse-special -c 4096 -o imatrix.gguf

--parse-special is not optional. llama-imatrix defaults to parse_special = false. Without the flag every <|im_start|>, <|start|>, <think> and <tool_call> in the agentic and reasoning slices is tokenized as literal punctuation, and the tokens the model actually emits appear zero times. For these recipes that is about 40% of the corpus calibrating nothing, and it fails silently.

calib_longctx.txt is a separate file and a separate run. Documents in it are unbroken and 16k to 32k tokens, so it exercises the long-range path that a 4096 token window never reaches.

Measurement corpora

eval/ never intersects a build. Verified pairwise with tools/crosscheck.py.

corpus tokens chunks @4096 scored positions vocab dup lines
eval/neutral/eval_neutral.txt 353,771 86 176,128 19.43% 1.37%
eval/code/eval_code_full.txt 350,887 85 174,080 15.31% 31.63%
eval/agentic/eval_agentic.txt 350,438 85 174,080 5.50% 44.55%
eval/neutral-de/eval_neutral-de.txt ¹ 348,005 84 172,032 23.18% 7.78%
eval/longctx/eval_longctx.txt ¹ 349,426 85 174,080 20.69% 3.50%
eval/agentic-kolibri/eval_agentic-kolibri.txt ¹ 353,717 86 176,128 6.58% 36.33%

¹ Counted in Kolibri-1's tokenizer (128,000 ids).

llama-perplexity scores the second half of each context window, so a corpus has to be about twice the size of the measurement wanted out of it.

neutral. 30 languages, no code. Latin script is 46.5% of letters, then Arabic 7.6%, Armenian 6.3%, Cyrillic 5.4%, Han 5.3%, Greek 4.3%, Hebrew 4.2%, Devanagari 3.7%, Myanmar 3.6%, then Bengali, Thai, Georgian, Tamil, Hangul, Hiragana, Katakana, Ethiopic. This is the default measurement set.

code. eval_code.txt is the file previously called eval_neutral.txt, byte-identical so older measurements stay comparable. It was never neutral prose: measured, it is a source-code corpus. eval_code_ext.txt extends it from seven repositories that appear nowhere else, and eval_code_full.txt is the two concatenated. Measure against the full one.

neutral-de. German Wikipedia prose from offsets tools/pool_german.py never reads for the pool. For a model trained on a quarter German.

longctx. Long articles (12k+ tokens), German and English: eight chunks at -c 32768, or needles for 64k and 128k.

agentic-kolibri. eval/agentic's generator (120 scripted conversations and up to 900 grounded in the four held-out repositories) rendered through Kolibri-1's own template by tools/build_eval_auto.py: its special tokens, its Hermes tool calls, reasoning_effort per conversation. grounding.json holds the repository commits. 188 conversations: 98 grounded, 90 scripted. Disjoint from kolibri-1-moe (builds/kolibri-1-moe/crosscheck.json) apart from 94 13-grams of the template's own scaffolding and one where two conversations join; llama-perplexity must read it with --parse-special.

agentic. Conversations in a model's own markup, across four reasoning strengths, grounded in four repositories reserved for this purpose.

Two things to know before using eval/agentic:

  1. llama-perplexity has no --parse-special. Special tokens are scored as their literal characters. That is still a valid comparison between quants of one model, because the text is identical for all of them, but it is not what the model sees at inference.
  2. Its duplicate-line share is 44.6%, or 30.3% excluding the chat template's own scaffolding. A conversation that declares tools has to repeat the template's tool-definition block verbatim. There is no way to have native markup and a low duplicate-line ceiling at once. The same applies to code. Only eval/neutral reaches 2%, at 1.37%.

The pool

7,415 units after filtering, in pool/<category>/*.jsonl. Every line carries source, license, path, origin and a provenance object.

Dialogue is stored as messages, not as rendered text. tools/build.py applies the target model's chat format at build time. Storing one model's special tokens in the pool is exactly what made the first version of this corpus single-use.

render says what a unit is:

  • text, used verbatim
  • chat, messages are rendered by the renderer the recipe selects
  • dsv4, already rendered in DeepSeek markup. Kept, never built from. 203 such units are preserved for provenance and their conversations were regenerated structurally instead.

pool/_quarantine/ holds everything removed, with the reason on each record. Nothing is deleted.

Provenance and licences

Repository files keep their upstream licence (MIT, Apache-2.0, BSD-3-Clause, BSL-1.0) and record the commit they came from. Wikipedia is CC-BY-SA-4.0. Generated units are CC0-1.0 and live under a synthetic/ subdirectory, with one caveat: agentic traces quote real repository files verbatim inside tool results, and those excerpts keep their own licence, recorded per unit.

patriciogonzalezvivo/thebookofshaders is an obvious fit for the graphics slice and is all-rights-reserved. It is not here and must not be added.

Deduplication and contamination

All at 13-word shingles, tools/dedupe.py.

check result
wikitext-103-raw-v1 (superset of wikitext-2) 6 documents removed
pool against eval, any shared 13-gram 3,672 documents
pool against eval, distinctive 13-gram 143 removed, 0 remain
exact duplicates within the pool 379 removed
near duplicates at J >= 0.8 202 removed
total quarantined 1,056 of 8,471 (12.5%)

The two eval rows differ by a factor of twenty-five and the difference matters. A 13-gram shared by thousands of documents is an MIT header or an SPDX line, not leaked measurement data. Treating those as contamination removed 43% of the pool on the first run and improved nothing. A gram counts as evidence only when it occurs in at most two pool documents. Both numbers are reported here rather than only the flattering one.

No wikitext of any version is in any build. Grepping for the string proves nothing, because wikitext is a curated slice of English Wikipedia and this pool contains English Wikipedia, so the check is shingle overlap against the benchmark text itself.

Vocabulary coverage

Worked example, muse-glimmer-30b, against 202,048 embedding rows.

old flat corpus this build
seen at least once 96,099 (47.56%) 196,430 (97.22%)
seen at least 10 times 14,454 (7.15%) 24,831 (12.29%)
seen at least 100 times 2,097 (1.04%) 4,968 (2.46%)
unseen 105,949 (52.44%) 5,618 (2.78%)

The jump is the vocabulary sweep, regenerated for this tokenizer by tools/vocab_sweep.py: 200,185 of the 200,220 ids that have any standalone textual form, at 2.09 tokens per id. The remaining 1,828 ids are fragments of multi-byte characters and cannot appear alone in any text at all. That is the real ceiling, 99.08%, not 100%.

A sweep is a function of the tokenizer, so there is one file per target under pool/vocab_sweep/synthetic/<recipe name>.jsonl, and tools/build.py selects the one matching the recipe name and drops every other. A sweep built for another model is not merely useless here, it is noise.

Two tokenizers, one percent apart

llama-tokenize and tokenizer.json disagree by about 1% on the same file (4,954,537 against 4,901,495 tokens on the muse-glimmer calib_train.txt). The disagreement is not spread evenly. It is almost entirely non-Latin text.

slice tokenizer.json llama-tokenize
multilingual 34,988 37,072 +5.96%
vocab_sweep 28,389 28,826 +1.54%
longctx 356,401 356,215 -0.05%
code 16,425 16,420 -0.03%
agentic 34,950 34,948 -0.01%
graphics, reasoning, structured 0.00%

Both sides run the same llama4 split regex, but llama.cpp implements the Unicode property classes in it with its own tables rather than a regex engine, and on Han, Arabic, Devanagari and similar it splits more finely. Latin-script code and prose agree to within a rounding error.

llama-tokenize is authoritative, because it is the vocabulary and pre-tokenizer llama-imatrix will actually use, and the coverage figures above come from it. The manifest's per-document token counts come from tokenizer.json, because a build needs an in-process tokenizer to hit a budget. Treat the manifest as sizing and the coverage report as measurement, and read the multilingual share as about 6% larger in practice than the manifest states.

A llama.cpp crash worth knowing about

llama-tokenize and llama-imatrix abort on some plain-ASCII input:

$ printf '\xF4\x91\x92\x93' > t.txt      # sixteen ASCII characters
terminate called after throwing an instance of 'std::invalid_argument'
  what():  invalid codepoint

The escape sequence is only described in the source file, not encoded. F4 91 92 93 would decode to U+111493, past U+10FFFF, and unicode_cpt_to_utf8 in src/unicode.cpp throws instead of substituting U+FFFD. UTF-8 conformance test suites are full of such literals. The first calib_train.txt contained one, from nlohmann/json tests/src/unit-unicode1.cpp, and it would have killed an imatrix run partway through. tools/screen.py finds and quarantines such documents by divide and conquer. It found exactly two.

Adding a model

# 1. write the recipe. See RECIPE.md for every field.
$EDITOR recipes/<name>.yaml

# 2. regenerate the vocabulary sweep for this tokenizer
python tools/vocab_sweep.py --tokenizer /path/to/tokenizer.json --name <name>

# 3. build
export FOUNDRY_MODEL_DIR=/path/to/original/weights
python tools/build.py --recipe recipes/<name>.yaml

# 4. check what came out
python tools/coverage.py --gguf <model>.gguf \
    --tokenizer /path/to/tokenizer.json builds/<name>/calib_train.txt
python tools/crosscheck.py builds/<name>/calib_*.txt eval/*/*.txt

The pool does not change. The recipe name must match the sweep filename exactly, because that is how the build finds it.

Rebuilding the pool from scratch

Order matters. Harvesting excludes the measurement split by (source, path), and the generators draw from the pool, so an agentic trace cannot quote a held-out file.

bash tools/clone.sh <raw-dir>                    # shallow clone the sources
python tools/pool_import.py                      # archive/ flat corpus -> pool
python tools/harvest.py --raw <raw-dir> --wiki <wiki-dir>
python tools/gen_agentic.py
python tools/gen_reasoning.py --scale 48
python tools/gen_structured.py
python tools/dedupe.py --wikitext <wikitext-dir>
python tools/screen.py --gguf <model>.gguf
python tools/build_eval.py --build builds/<name> ...

Tools

tool reads writes
clone.sh its own registry shallow clones on disk
pool_import.py archive/legacy-flat-corpus/ pool/**/legacy-*.jsonl
harvest.py cloned repos, Wikipedia pool/**/repos.jsonl, wikipedia.jsonl
gen_agentic.py pool pool/agentic/synthetic/
gen_reasoning.py pool pool/reasoning/synthetic/
gen_structured.py pool pool/structured/synthetic/
vocab_sweep.py a tokenizer pool/vocab_sweep/synthetic/<name>.jsonl
dedupe.py pool pool/_quarantine/, pool/dedupe-report.json
screen.py pool, a GGUF pool/_quarantine/untokenizable.jsonl
purge_overlap.py pool, eval pool/_quarantine/eval-residue.jsonl
build.py a recipe, pool builds/<name>/
build_eval.py pool eval/
build_eval_auto.py a tokenizer, a build, clones eval/agentic-<name>/ in the model's template
pool_german.py Hugging Face datasets pool/german/, eval/neutral-de, eval/longctx
coverage.py a corpus, a GGUF vocabulary coverage report
crosscheck.py builds, eval eval/crosscheck.json
converge.py imatrix checkpoints per-tensor cosine curve
imcompare.py two imatrix files per-tensor cosine
poollib.py library, not a command
auto_fmt.py a model's own chat template renderer, selected by format: auto

METHOD.md holds what these tools measured: how much corpus is enough, how much the content matters against the volume, and which of llama-imatrix's reported statistics mean anything.

Downloads last month
581