Downloads · 30 days
8
1% of all-time downloads
arjhinety/schemaforge-v2-distilled-minicpm5-1b
schemaforge-v2-distilled-minicpm5-1b is a text generation model from arjhinety. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
This is the V2 release checkpoint. It closes out the V2 phase of the SchemaForge project: the pipeline (teacher-validation gate, hard-example generation, confidence calibration, hybrid routing, failure-category analys…
Downloads · 30 days
8
1% of all-time downloads
All-time downloads
631
Public
Parameters
1.1B
2.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.2 GB · 100%
From the Hugging Face model README
This is the V2 release checkpoint. It closes out the V2 phase of the SchemaForge project: the pipeline (teacher-validation gate, hard-example generation, confidence calibration, hybrid routing, failure-category analysis, and a now-deterministic/reproducible training pipeline) is considered methodologically complete as of this checkpoint. Follow-on work (V3) targets the model's own remaining weaknesses (see Known limitations) under a fresh whitepaper. See SchemaForge V2 whitepaper and
logs/V2_TRAINING_FAILURES.mdfor the complete 15-iteration research history, including every negative result along the way.
A student checkpoint (openbmb/MiniCPM5-1B, ~1.04B params) sequence-level knowledge-distilled
from a google/gemma-4-31B teacher for JSON/structured extraction across 12 document schemas
(invoice, receipt, resume, contract, support ticket, medical note, insurance claim, CRM record,
email, conversation, form, knowledge-graph triple). Part of the SchemaForge V2 project: an
automatic distillation pipeline with teacher-output validation, hard-example generation, and
field-level evaluation, not just a checkpoint — and the pipeline itself is the project's primary
contribution. This specific checkpoint's headline result is not a raw-model number: it's that
routing between this model and a tuned deterministic pre-pass (by field ownership) beats either
system alone on every metric simultaneously — see Results below.
15 training iterations were run during V2 development (full history in
logs/V2_TRAINING_FAILURES.md). The single highest field-F1 measurement across all of them
(0.6858, iteration 5/10) was produced by a checkpoint whose weights were later lost to a since-
fixed process bug (a checkpoint got overwritten without a backup before that safeguard existed —
documented, not hidden, in iteration 12's postmortem). This checkpoint (iteration 15) is the
most recent, and was produced by the fully bug-fixed pipeline: a fixed training random seed, an
automatic checkpoint-backup step, and — critically — deterministic (greedy) teacher-label
generation, none of which were true for the iteration-5 checkpoint. A controlled re-run
(iteration 15) measured this fix's actual impact: field F1 moved by only 0.0003 versus its
immediate predecessor, meaning this checkpoint's score (0.6827) is a stable, reproducible
measurement, not a lucky or unlucky draw — the property that matters most for a checkpoint meant
to be published and cited.
schemaforge/hardexamples/generate.py across the 9
training schemas (3 schemas — insurance_claim, conversation, kg_triple — are held out
from training entirely, evaluated only for generalization).docs/PROJECT_CHARTER.md §7.1).temperature=0.0) for reproducibility — see "Why this
checkpoint" above.Erratum (2026-11-04). The 72-record and 288-record eval sets are not held out from training: they use the same seed templates as the training corpus. Against the V2 training corpus, 27 of 72 and 109 of 288 eval source texts match a training document after entity masking (similarity >= 0.95); exact matches are 0 of 72 and 0 of 288. The matches are template-level (same structure, different names, numbers and dates), not verbatim copies. Scores on these sets, including 0.6827, are therefore in-sample for those rows. The three held-out schemas (insurance_claim, conversation, kg_triple) have no 13-word overlap with training. Details: https://github.com/arjhinety/SchemaForge (commit b647575).
On a 72-record eval set spanning all 12 schemas (the 3 held-out schemas are absent from training; the other 9 are not held out, see erratum above):
| system | field precision | field recall | field F1 | hallucination rate | schema validity |
|---|---|---|---|---|---|
| deterministic rules alone | 0.9185 | 0.1729 | 0.2911 | 0.0000 | 1.0000 |
| this model alone (residual-field prompt) | 0.4900 | 0.4784 | 0.4841 | 0.0914 | 0.8194 |
| hybrid (rules → this model) | 0.7174 | 0.6513 | 0.6827 | 0.0092 | 0.8333 |
The hybrid system beats both individual systems on every metric simultaneously — this is the
project's central architectural claim, and it holds here as it has in every hybrid configuration
tested. missing_field (omission) is the dominant failure category across every measured
configuration in this project (roughly 55-62% of all failures) — the clearest remaining target
for future work.
The comparison of later V3 checkpoints against this checkpoint, and the recommendation to deploy V2-FINAL, rest on the 72-record set, which has 27 of 72 entity-masked template matches to V2 training data. The numbers are unchanged.
MiniCPM5-1B's zero-shot score — the distillation's value in this pipeline is realized
through the hybrid architecture, not as a standalone extractor. Use it hybrid, with the
deterministic pre-pass, not alone.missing_field remains the dominant failure mode; a targeted fix attempted in iteration 14
(isolated corruption-operator training) did not help and is documented as a negative result.from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("<this-repo>")
model = AutoModelForCausalLM.from_pretrained("<this-repo>", trust_remote_code=True)
prompt = (
"Extract the following fields as JSON from the text below. Schema: invoice.\n"
"Fields to extract: line_items[].description, vendor_name.\n"
"Text:\nINVOICE #INV-1001. Vendor: Acme Supply Co. ...\n"
"JSON Output:"
)
inputs = tokenizer(prompt, return_tensors="pt")
out = model.generate(**inputs, max_new_tokens=512, do_sample=False)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
For production use, run this model behind the deterministic pre-pass (schemaforge/deterministic/)
and merge with schemaforge/hybrid/pipeline.py's merge_prediction — using the model alone
forgoes the architecture's actual advantage. The prompt format (schema name + explicit residual
field list, generated from the schema's semantic_fields minus whatever the deterministic pass
already resolved) must match training; see src/08_hybrid_eval.py's build_prompt in the source
repository for the exact template.
AMD Instinct MI300X (192GB), ROCm 7.0.2, PyTorch 2.11.0.dev+rocm7.0. GPU access provided by the AMD AI Developer Program.
model.safetensors sha256: c13f7f6c21c35d2ed9159acc044a9f88abcd9fdfe9d0248ee625236b70c8470dloop-iter3-20260810T095747Z (see experiments/loop-iter3-20260810T095747Z/ in
the source repository for full machine-readable provenance)9c941ea12f299b66c7bfd04603f6beea0ce04c9bSee the SchemaForge GitHub repository for the full pipeline (schema registry, deterministic pre-pass, hard-example generator, teacher-validation gate, evaluation harness, calibration module, failure-category classifier, hybrid routing), the V2/V3 whitepapers, all experiment manifests, and evidence graphs.