malaiwah/glm5-next-tiny-cpu-repro-v1
This repository is an evidence bundle, not one root-format dataset at repository root. first/ and repeat/ are separate complete sealed QFS root datasets; comparison/ holds the comparison receipt and tokenwise result. panel/ is the sealed input panel. Other files are provenance, logs and reproduction tools. Do not pass the bundle root as a QFS dataset. GLM5-Next tiny native CPU fixture This is a complete untrained random-initialized native Glm5NextForConditionalGeneration wrapper… See the full description on the dataset page: https://huggingface.co/datasets/malaiwah/glm5-next-tiny-cpu-repro-v1.
This repository is an evidence bundle, not one root-format dataset at repository root. first/ and repeat/ are separate complete sealed QFS root datasets; comparison/ holds the comparison receipt and tokenwise result. panel/ is the sealed input panel. Other files are provenance, logs and reproduction tools. Do not pass the bundle root as a QFS dataset.
GLM5-Next tiny native CPU fixture
This is a complete untrained random-initialized native Glm5NextForConditionalGeneration wrapper (glm5_next with glm5_next_text) for CPU toolchain reproduction. It is not a trained language model, quantization candidate, benchmark result, or behavioral substitute for GLM-5.3-Flash. No source weights, training data, remote model code, paid GPU, or cloud compute were used. The installed native class is not named FlashrootGlm5NextForConditionalGeneration.
Architecture and tokenizer
Five layers preserve KDA/KDA/KDA/DSA/KDA and dense/dense/dense/MoE/MoE schedules. Hidden 64, dense intermediate 128, expert intermediate 32; 8 routed experts, top-2 plus one shared expert. mHC has four streams, 20 Sinkhorn iterations, epsilon 1e-6. MLA has Q rank 32, KV rank 16, four heads, NoPE/V dimensions 16 and RoPE dimension zero. Indexer: 4 heads x 16, top-k 8, pool 4 and tail selection enabled. KDA: 4 heads x 16, convolution 4 and gate lower bound -5. Nested linear_attn_config matches effective flattened settings. The real native vision tower has one layer, hidden 32, four heads, intermediate 64, output/projector 64, patch 4 and merge 2. The LM head is independent and untied. MTP count is zero, with no orphan prediction-layer tensors.
The 266-entry byte BPE has no merges, four ordinary specials plus six modality specials with IDs 4–9, and all 256 byte symbols. It roundtrips Unicode and inserts BOS/EOS with the native tokenizer template. It is not the upstream tokenizer. Native initialization covers every tensor. The native BF16 loader selects its FP32 retention; the exact retained list and both clean native loading reports are in build-manifest.json. Every tensor is checked for native conversion and final save/reload equality; no missing/mismatched-key overrides, weight repair, quantization metadata or partial hand-authored state dictionaries.
Architecture reference only (no weights copied): inference-optimization/GLM-5.3-Flash-0.1B-A0.1B.
Immutable artifacts and measured evidence
- Model checkpoint/tokenizer pin: `malaiwah/glm5-next-tiny-random-bf16@e84b6a4844a36baecfaba7dbf0ca3cfea6662d24`.
- Evidence bundle: `malaiwah/glm5-next-tiny-cpu-repro-v1`.
cpu-reproduction-summary.json/evidence-summary.json: actual command/runtime/resource evidence.comparison/comparison-receipt.json: forced numerical replay and tokenwise array in the evidence bundle.boundary-probe.json: separate native CPU prefill lengths 3, 4, 5, 12, 13, 64, 65, single-token cached decode and subsequent three-token cached continuation. Records actual native Python call events and indexer selections, finite logits/cache tensors, and observed cached-versus-uncached differences. It does not infer branch execution from configuration.
Two fresh CPU processes use two threads each. Both captures retain the default generation sanity check and pass strict tensor verification. A forced NumPy/CPU/float32 replay checks all 252 positions; the tokenwise float64 artifact is required to contain literal positive zeros. The other lane explicitly means CPU, not CUDA. Inputs are four embedded synthetic 64-token windows, not a corpus/quality benchmark. Both captures and boundary probes are text-only. Vision weights are real and complete but no image/video execution or quality is claimed. Exact reproduction is limited to recorded software/hardware behavior.
Measured values (generated by the workflow, never handwritten):
{
"boundary_probe_elapsed_seconds": 2.8895256030373275,
"capture_resources": {
"first": {
"bytes": {
"checkpoint_read": 878987,
"hidden_d2h": 36628,
"weights_h2d": null
},
"checkpoint_bytes": 878987,
"checkpoint_files": 2,
"device_name": null,
"forward_timing": "wall-clock",
"note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly",
"peak_cuda_allocated_bytes": null,
"peak_cuda_reserved_bytes": null,
"peak_resident_weight_bytes": 851620,
"peak_rss_bytes": 381571072,
"rss_units_source": "Linux ru_maxrss",
"seconds": {
"decode_sum": null,
"elapsed": 3.176,
"fill_sum": null,
"forward_sum": 0.47,
"identity": 0.009,
"layer_load_max": null,
"layer_load_sum": null,
"layer_loads": null,
"resident_load": 2.64,
"seal": 0.007
}
},
"repeat": {
"bytes": {
"checkpoint_read": 878987,
"hidden_d2h": 36628,
"weights_h2d": null
},
"checkpoint_bytes": 878987,
"checkpoint_files": 2,
"device_name": null,
"forward_timing": "wall-clock",
"note": "provenance, not identity: peaks and stage seconds this run measured; forward_sum is device time under cuda-events, wall time otherwise; seal covers head serialisation up to this block's assembly",
"peak_cuda_allocated_bytes": null,
"peak_cuda_reserved_bytes": null,
"peak_resident_weight_bytes": 851620,
"peak_rss_bytes": 382017536,
"rss_units_source": "Linux ru_maxrss",
"seconds": {
"decode_sum": null,
"elapsed": 2.806,
"fill_sum": null,
"forward_sum": 0.503,
"identity": 0.008,
"layer_load_max": null,
"layer_load_sum": null,
"layer_loads": null,
"resident_load": 2.248,
"seal": 0.005
}
}
},
"kl": {
"max": 0.0,
"mean": 0.0,
"median": 0.0,
"p95": 0.0,
"p99": 0.0,
"p99_9": 0.0
},
"measurement_scope": {
"contexts": 4,
"covers_full_panel": true,
"position_filter": "all",
"positions_per_context": 63,
"scored_positions": 252,
"subset_detail": null
},
"parameter_count": 422430,
"tensor_count": 209,
"top1_agreement": 1.0,
"weight_bytes": 876108
}Local CPU reproduction
Python 3.12, isolated environment with requirements-cpu.txt; no FLA or causal-conv1d. A CUDA-enabled PyTorch build is rejected. The native model needs Transformers 5.16.1. The QFS source base recorded for this execution is 5cf8a81b8b701a2476fbed38619e62bd1052914e; actual source hashes and tracked modification status are recorded in qfs-source.json and capture summary. Use the corresponding QFS checkout, including any explicitly recorded source changes.
python build_fixture.py --out ./fresh-model
python probe_cpu.py --model-dir ./fresh-model --out ./fresh-boundary.json
python build_panel.py --model-dir ./fresh-model --model-repository malaiwah/glm5-next-tiny-random-bf16 --model-revision e84b6a4844a36baecfaba7dbf0ca3cfea6662d24 --out ./fresh-panel --qfs-root /path/to/QFS
python verify_cpu.py --model-dir ./fresh-model --model-repository malaiwah/glm5-next-tiny-random-bf16 --model-revision e84b6a4844a36baecfaba7dbf0ca3cfea6662d24 --panel-dir ./fresh-panel --out ./fresh-reproduction --qfs-root /path/to/QFSAll output locations must be new. Regeneration is CPU/version-specific; compare generated core files to build-manifest.json and the immutable Hub pin before claiming provenance. release.py --stage-only is a maintainer workflow creating private repositories and refuses repository collisions. Public release requires a separate release.py --publish invocation after successful staging; it rechecks staged bytes and remote branch tips before visibility changes, then performs unauthenticated immutable-revision downloads and another CPU replay. MIT license covers this fixture/code; dependencies retain their own licenses.
