crimson-knight's picture
Amber framework demo knowledge pack: train/valid pairs + two 50-item eval sets
f879505 verified
|
Raw
History Blame Contribute Delete
4.39 kB
---
pretty_name: Amber Framework Knowledge Pack (demo)
license: mit
language:
- en
task_categories:
- question-answering
- text-generation
size_categories:
- n<1K
tags:
- knowledge-pack
- fine-tuning
- lora
- synthetic
- crystal
- amber
- mlx
- arxiv:2502.14502
configs:
- config_name: default
data_files:
- split: train
path: data/train.jsonl
- split: validation
path: data/valid.jsonl
---
# Amber Framework Knowledge Pack (demo)
The demo **knowledge pack** dataset behind
[AgentC-Consulting/knowledge-packs](https://github.com/AgentC-Consulting/knowledge-packs):
teach a small local model the [Amber web framework](https://amberframework.org) (Crystal),
and **measure** whether it learned anything with a before/after eval harness.
A *knowledge pack* compiles a body of expertise into curated sources, schema-validated
generated training JSONL, a contamination-guarded held-out eval set, and a JSON manifest.
This repo ships the exact training data and the two 50-item eval sets used for the measured
run on record ([`live-run/RESULTS.md`](https://github.com/AgentC-Consulting/knowledge-packs/blob/main/live-run/RESULTS.md)).
## What's here
```text
data/train.jsonl 471 training pairs (mlx chat format: {"messages": [...]})
data/valid.jsonl 24 validation pairs
eval/memorization.jsonl 50 items (30 MC + 20 recall) — trained-fact probe
eval/heldout_sources.jsonl 50 items (30 MC + 20 recall) — overclaiming control
eval/stats.json generation stats (unit counts, split salt, seeds)
```
Generated deterministically (no model, no API) from
[amberframework/docs](https://github.com/amberframework/docs) @ `3648105`: 336
heading-chunked source units, split **before** generation by
`sha256(unit_id + "kp-amber-v1")` into 262 train / 74 eval units. Cloze facts are
sentences containing exactly one blankable inline-code term; each train fact yields 3
pairs (2 cloze phrasings + 1 multiple-choice phrasing).
## The two eval sets — read this before quoting numbers
- **`memorization`** probes facts that ARE in the training data through question templates
that never appear in training. It is a **trained-fact probe measuring fact injection,
not a source-held-out eval**.
- **`heldout_sources`** draws facts only from the 74 eval-split units, which contributed
**zero** training examples (unit-ID exclusion + dedup of blanked sentences into train).
It is the leakage/overclaiming control: a memorization-only adapter should NOT improve
here. Semantic restatements of a fact worded differently inside a train unit cannot be
fully excluded by these guards.
Measured on `mlx-community/SmolLM-135M-Instruct-4bit` (M1 Max, LoRA, lr 1e-4, 2000
iterations): recall of trained facts 1/20 → 11/20 at temp 0; the held-out-source control
stayed flat (9/50 → 7/50). Per-item reports (question, gold, full completion, verdict) are
checked in at
[`live-run/reports/`](https://github.com/AgentC-Consulting/knowledge-packs/tree/main/live-run/reports).
The eval questions are synthetic and not hand-reviewed; treat all numbers as lab notes, and
run the harness yourself — the generator and scorer are in the repo
([`live-run/`](https://github.com/AgentC-Consulting/knowledge-packs/tree/main/live-run)).
The trained adapter these numbers were measured on is published at
[crimson-knight/SmolLM-135M-Instruct-4bit-amber-lora](https://huggingface.co/crimson-knight/SmolLM-135M-Instruct-4bit-amber-lora).
## Quality ceiling (stated plainly)
Deterministic template generation tests memorization and lookup-like recall only — no
conceptual synthesis, no troubleshooting judgment. The 135M 4-bit base model is
floor-level capability; the signal is in the recall probes, not multiple choice.
Related reading on fact injection via LoRA: [arXiv:2502.14502](https://arxiv.org/abs/2502.14502)
(*How Much Knowledge Can You Pack into a LoRA Adapter without Harming LLM?*).
## Sources & license
Condensed from the Amber Framework documentation
([amberframework/docs](https://github.com/amberframework/docs)) with attribution. The Amber
framework itself is MIT; its docs repository carries no explicit LICENSE file (as of commit
`3648105`). The generated pairs, eval sets and tooling in this repo are MIT.
---
Built by the team at AgentC Consulting — https://agentc.consulting?ref=kp-dataset