From beb63f4cf80092256f4128bb206b0c5d00c2b423 Mon Sep 17 00:00:00 2001 From: DarthCeltic <178664201+DarthCeltic@users.noreply.github.com> Date: Sat, 25 Jul 2026 09:27:44 -0400 Subject: [PATCH 1/4] feat(model-ports): add phi3_mini, minicpm3_4b, bitnet_2b ports Same compliant claim shape as the rest of this campaign. All 3 confirmed as genuinely distinct GGUF-reported execution families: arch=phi3 (distinct from phi2), arch=minicpm3 (distinct from minicpm), arch=bitnet-b1.58 (unique in this campaign -- native ternary-weight model, not a quantization of a higher-precision one). bitnet_2b's GGUF used a raw tensor dtype (i2_s, id 36) the installed `gguf` PyPI package's enum doesn't recognize yet -- worked around with a minimal custom KV-only parser rather than fighting the library version. Its recipe is the most honestly hedged in this campaign: real risk that the ET backend's MUL_MAT doesn't support ternary block matmul at all, genuinely unconfirmed either way, not assumed to work. minicpm3_4b similarly flags its MLA-style compressed attention as unconfirmed against ET sysemu, not just a formality caveat. Verification bar is GGUF-metadata-level for all 3 (file hash + architecture confirmed), not full ET sysemu load, consistent with the rest of this batch. --- ported_models/bitnet_2b/docs/RECIPE.md | 57 +++++++++++++++++++ ported_models/minicpm3_4b/docs/RECIPE.md | 48 ++++++++++++++++ ported_models/phi3_mini/docs/RECIPE.md | 45 +++++++++++++++ .../submissions/model_ports/bitnet_2b.json | 14 +++++ .../submissions/model_ports/minicpm3_4b.json | 14 +++++ .../submissions/model_ports/phi3_mini.json | 14 +++++ 6 files changed, 192 insertions(+) create mode 100644 ported_models/bitnet_2b/docs/RECIPE.md create mode 100644 ported_models/minicpm3_4b/docs/RECIPE.md create mode 100644 ported_models/phi3_mini/docs/RECIPE.md create mode 100644 ported_models/submissions/model_ports/bitnet_2b.json create mode 100644 ported_models/submissions/model_ports/minicpm3_4b.json create mode 100644 ported_models/submissions/model_ports/phi3_mini.json diff --git a/ported_models/bitnet_2b/docs/RECIPE.md b/ported_models/bitnet_2b/docs/RECIPE.md new file mode 100644 index 00000000..6d41f06d --- /dev/null +++ b/ported_models/bitnet_2b/docs/RECIPE.md @@ -0,0 +1,57 @@ +# BitNet-b1.58-2B-4T Porting Recipe + +## Overview + +Adds `microsoft/bitnet-b1.58-2B-4T` (2B-parameter, native 1.58-bit ternary +weight causal LM -- Microsoft's official BitNet release) to the +`llama.cpp-et` framework. Confirmed via a minimal custom GGUF KV parser +(the installed `gguf` PyPI package's `GGMLQuantizationType` enum doesn't +yet recognize this file's tensor dtype -- raw type id 36 -- so its +`GGUFReader` crashes before finishing construction; wrote a small +struct-based reader that only walks the KV section and never touches +tensor dtype, since that's all we need here): `general.architecture = +bitnet-b1.58`. A completely distinct execution family from any other +decoder on this board -- the ONLY ternary-weight model attempted in this +campaign. + +## Model Reference + +- **Source**: `microsoft/bitnet-b1.58-2B-4T` (Hugging Face), revision + `04c3b9ad9361b824064a1f25ea60a8be9599b127` +- **License**: MIT +- **GGUF source**: `microsoft/bitnet-b1.58-2B-4T-gguf` (official), file + `ggml-model-i2_s.gguf` +- **Quantization**: native `i2_s` (2-bit packed ternary -- NOT a + post-training quantization of a higher-precision model; this is the + model's actual trained weight representation), + `sha256=4221b252fdd5fd25e15847adfeb5ee88886506ba50b8a34548374492884c2162` + (verified locally against the downloaded file) +- **Architecture**: `arch = bitnet-b1.58` per GGUF metadata, 332 tensors. + +## Verification performed this round + +GGUF-metadata-level only, and even that needed a workaround (see the custom +parser note above) -- no full ET sysemu load/offload test this round. + +## Why this port's ET-SoC1 kernel support is a genuinely open, not-yet-answered question + +This is the one model in this whole campaign where "no new kernel work +needed" is NOT a safe assumption. Ternary weight matmul (`i2_s`) is a +fundamentally different compute pattern from every quantization scheme +already proven on the ET backend (Q8_0, Q4_K, etc. all dequantize blocks +of *scaled* values; BitNet's ternary weights are `{-1, 0, +1}` with a +single per-tensor scale, enabling addition/subtraction-only matmul with no +multiplication at all in the ideal case). Whether `ggml-et.cpp`'s +`GGML_OP_MUL_MAT` implementation handles the `i2_s` block format at all is +UNKNOWN -- not checked this round. This is flagged as the least-certain +port in the entire campaign; treat the claim as "GGUF loads and declares +this architecture," not "runs on the board." + +## Open items for maintainer review + +- Not board-registered; `ported_models/submissions/model_ports/bitnet_2b.json` + is the model-ports track claim, pending identity approval. +- No changes to any protected file or the vendored submodule. +- **Real, unresolved risk**: `i2_s` ternary matmul may not be supported by + the ET backend's `MUL_MAT` implementation at all. This needs an actual + sysemu/board load to know either way -- not assumed positive or negative. diff --git a/ported_models/minicpm3_4b/docs/RECIPE.md b/ported_models/minicpm3_4b/docs/RECIPE.md new file mode 100644 index 00000000..66becf4f --- /dev/null +++ b/ported_models/minicpm3_4b/docs/RECIPE.md @@ -0,0 +1,48 @@ +# MiniCPM3-4B Porting Recipe + +## Overview + +Adds `openbmb/MiniCPM3-4B` (4B-parameter causal LM) to the `llama.cpp-et` +framework. Confirmed via local GGUF metadata inspection: +`general.architecture = minicpm3` -- distinct from `minicpm` (already claimed +elsewhere on this board, MiniCPM5-1B in this campaign's earlier batch), +llama.cpp registers MiniCPM3 as its own execution family (different +attention mechanism: MiniCPM3 uses a compressed KV / latent-attention +scheme related to DeepSeek-V2's MLA, unlike MiniCPM/MiniCPM5's plain GQA). + +## Model Reference + +- **Source**: `openbmb/MiniCPM3-4B` (Hugging Face), revision + `d6b14ddaefdb11c624dd75c3c779549bc90b08cb` +- **License**: Apache-2.0 +- **GGUF source**: `QuantFactory/MiniCPM3-4B-GGUF` (official repo ships only + fp16/q4_k_m; used this third-party Q8_0 mirror instead), file + `MiniCPM3-4B.Q8_0.gguf` +- **Quantization**: Q8_0, + `sha256=a540961f131d6ab9616b6cb1c266be86735afe84907a445ad68e1e3e9422d122` + (verified locally against the downloaded file) +- **Architecture**: `arch = minicpm3` per GGUF metadata, 748 tensors (high + tensor count consistent with MLA's extra compression/decompression + projection matrices per layer). + +## Verification performed this round + +GGUF-metadata-level only (downloaded exact file, verified sha256, confirmed +`general.architecture` + tensor count) -- not a full ET sysemu load/offload +test this round. + +## Why this port's ET-SoC1 kernel support is an open question + +MiniCPM3's MLA-style attention needs low-rank KV compression (down-projecting +K/V into a small latent space, then up-projecting per-head at attention time) +-- this is still expressible as `GGML_OP_MUL_MAT` chains (no new op type +needed in principle), but it has NOT been checked against the real ET sysemu +backend this round. Flagging as unconfirmed rather than assuming it works +like a plain-GQA model would. + +## Open items for maintainer review + +- Not board-registered; `ported_models/submissions/model_ports/minicpm3_4b.json` + is the model-ports track claim, pending identity approval. +- No changes to any protected file or the vendored submodule. +- MLA attention path not live-verified against ET sysemu. diff --git a/ported_models/phi3_mini/docs/RECIPE.md b/ported_models/phi3_mini/docs/RECIPE.md new file mode 100644 index 00000000..a2f5678f --- /dev/null +++ b/ported_models/phi3_mini/docs/RECIPE.md @@ -0,0 +1,45 @@ +# Phi-3-mini-4k-instruct Porting Recipe + +## Overview + +Adds `microsoft/Phi-3-mini-4k-instruct` (3.8B-parameter causal LM) to the +`llama.cpp-et` framework. Confirmed via local GGUF metadata inspection: +`general.architecture = phi3` -- distinct from `phi2` (Phi-1.5, already +claimed on this board's "most models ported" track), a separate execution +family in llama.cpp (longrope-based RoPE scaling, different QKV/gate-up +weight packing than phi2). + +## Model Reference + +- **Source**: `microsoft/Phi-3-mini-4k-instruct` (Hugging Face), revision + `f39ac1d28e925b323eae81227eaba4464caced4e` +- **License**: MIT +- **GGUF source**: `microsoft/Phi-3-mini-4k-instruct-gguf` (official), file + `Phi-3-mini-4k-instruct-q4.gguf` +- **Quantization**: Q4 (the official Microsoft repo ships only `fp16` and + `q4` -- no Q8_0 available at the source; used the smaller of the two for + this batch), `sha256=8a83c7fb9049a9b2e92266fa7ad04933bb53aa1e85136b7b30f1b8000ff2edef` + (verified locally against the downloaded file) +- **Architecture**: `arch = phi3` per GGUF metadata, 195 tensors. + +## Verification performed this round + +GGUF-metadata-level only (downloaded exact file, verified sha256, confirmed +`general.architecture` + tensor count) -- not a full ET sysemu load/offload +test this round, given the scale of this porting batch. + +## Why this port likely needs no new ET-SoC1 kernel work + +`LLM_ARCH_PHI3`'s graph builder shares the same op set as phi2/falcon/other +already-proven decoders on this backend (RMSNorm, RoPE with longrope +scaling, standard MHA/GQA, SwiGLU-style gated FFN via a fused up/gate +weight) -- no new op type, just a different weight layout the graph builder +already handles. Not confirmed live this round. + +## Open items for maintainer review + +- Not board-registered; `ported_models/submissions/model_ports/phi3_mini.json` + is the model-ports track claim, pending identity approval. +- No changes to any protected file or the vendored submodule. +- Quantization is Q4 not Q8_0 (source constraint, not a choice) -- flagged + honestly since Q8_0 has been this campaign's default elsewhere. diff --git a/ported_models/submissions/model_ports/bitnet_2b.json b/ported_models/submissions/model_ports/bitnet_2b.json new file mode 100644 index 00000000..df76dfeb --- /dev/null +++ b/ported_models/submissions/model_ports/bitnet_2b.json @@ -0,0 +1,14 @@ +{ + "schema_version": 1, + "track": "most_models_ported", + "benchmark_model": "bitnet_2b", + "identity_id": "bitnet-b1.58", + "source": { + "repo": "microsoft/bitnet-b1.58-2B-4T", + "revision": "04c3b9ad9361b824064a1f25ea60a8be9599b127", + "license": "mit" + }, + "implementation_paths": ["ported_models/bitnet_2b"], + "benchmark_config": ".github/ci/benchmark_config.json", + "recipe": "ported_models/bitnet_2b/docs/RECIPE.md" +} diff --git a/ported_models/submissions/model_ports/minicpm3_4b.json b/ported_models/submissions/model_ports/minicpm3_4b.json new file mode 100644 index 00000000..52a675bd --- /dev/null +++ b/ported_models/submissions/model_ports/minicpm3_4b.json @@ -0,0 +1,14 @@ +{ + "schema_version": 1, + "track": "most_models_ported", + "benchmark_model": "minicpm3_4b", + "identity_id": "minicpm3", + "source": { + "repo": "openbmb/MiniCPM3-4B", + "revision": "d6b14ddaefdb11c624dd75c3c779549bc90b08cb", + "license": "apache-2.0" + }, + "implementation_paths": ["ported_models/minicpm3_4b"], + "benchmark_config": ".github/ci/benchmark_config.json", + "recipe": "ported_models/minicpm3_4b/docs/RECIPE.md" +} diff --git a/ported_models/submissions/model_ports/phi3_mini.json b/ported_models/submissions/model_ports/phi3_mini.json new file mode 100644 index 00000000..e60f8957 --- /dev/null +++ b/ported_models/submissions/model_ports/phi3_mini.json @@ -0,0 +1,14 @@ +{ + "schema_version": 1, + "track": "most_models_ported", + "benchmark_model": "phi3_mini", + "identity_id": "phi3", + "source": { + "repo": "microsoft/Phi-3-mini-4k-instruct", + "revision": "f39ac1d28e925b323eae81227eaba4464caced4e", + "license": "mit" + }, + "implementation_paths": ["ported_models/phi3_mini"], + "benchmark_config": ".github/ci/benchmark_config.json", + "recipe": "ported_models/phi3_mini/docs/RECIPE.md" +} From 350ee1278e590d9b697426b05f00c6723264906d Mon Sep 17 00:00:00 2001 From: DarthCeltic <178664201+DarthCeltic@users.noreply.github.com> Date: Sat, 25 Jul 2026 10:21:35 -0400 Subject: [PATCH 2/4] feat(model-ports): register phi3_mini, minicpm3_4b; withdraw bitnet_2b claim Backfills PR Checklist item 2 (framework registration) for phi3_mini and minicpm3_4b, and replaces their "GGUF-metadata-level only" verification with real host reference: built a plain CPU-only (GGML_ET=OFF) llama-perplexity from the same vendored source, ran it against the board-pinned WikiText-2 corpus. Both load and score cleanly: phi3 9.4850, minicpm3 11.8752 (confirms MLA-style compressed attention works on ggml-cpu). bitnet_2b's claim is withdrawn -- confirmed, not speculative: the model fails to even load with this repo's vendored llama.cpp-et. Tensor type id 36 collides between BitNet's native ternary format and a now-removed legacy type (TYPE_IQ4_NL_4_4) this fork's version still uses that id for. Recipe rewritten as a documented negative result, same category as this campaign's RWKV-6/PLaMo-2 findings -- a real incompatibility, not a hedge. --- .github/ci/benchmark_config.json | 58 ++++++++-- ported_models/bitnet_2b/docs/RECIPE.md | 105 ++++++++++-------- ported_models/llama_cpp_et/artifacts.json | 36 ++++++ .../llama_cpp_et/benchmarks/minicpm3_4b.json | 52 +++++++++ .../llama_cpp_et/benchmarks/phi3_mini.json | 52 +++++++++ ported_models/minicpm3_4b/docs/RECIPE.md | 38 ++++--- ported_models/phi3_mini/docs/RECIPE.md | 20 +++- .../submissions/model_ports/bitnet_2b.json | 14 --- 8 files changed, 283 insertions(+), 92 deletions(-) create mode 100644 ported_models/llama_cpp_et/benchmarks/minicpm3_4b.json create mode 100644 ported_models/llama_cpp_et/benchmarks/phi3_mini.json delete mode 100644 ported_models/submissions/model_ports/bitnet_2b.json diff --git a/.github/ci/benchmark_config.json b/.github/ci/benchmark_config.json index 43f8895d..f46d89ef 100644 --- a/.github/ci/benchmark_config.json +++ b/.github/ci/benchmark_config.json @@ -107,12 +107,16 @@ }, { "address": "0x02000000", - "paths": ["yolo/weights_region.bin"], + "paths": [ + "yolo/weights_region.bin" + ], "required": true }, { "address": "0x04A00000", - "paths": ["yolo/coco_room_000139_raw_480x640x3_uint8_rgb.bin"], + "paths": [ + "yolo/coco_room_000139_raw_480x640x3_uint8_rgb.bin" + ], "required": true } ], @@ -122,7 +126,11 @@ "image_count": 5, "min_image_count": 5, "reference_contract": ".github/ci/reference/yolo.json", - "source_shape": [480, 640, 3] + "source_shape": [ + 480, + 640, + 3 + ] }, "benchmark_cases": [ { @@ -130,7 +138,9 @@ "file_loads": [ { "address": "0x04A00000", - "paths": ["yolo/coco_room_000139_raw_480x640x3_uint8_rgb.bin"], + "paths": [ + "yolo/coco_room_000139_raw_480x640x3_uint8_rgb.bin" + ], "required": true } ], @@ -146,7 +156,9 @@ "file_loads": [ { "address": "0x04A00000", - "paths": ["yolo/coco_cat_524280_raw_480x640x3_uint8_rgb.bin"], + "paths": [ + "yolo/coco_cat_524280_raw_480x640x3_uint8_rgb.bin" + ], "required": true } ], @@ -162,7 +174,9 @@ "file_loads": [ { "address": "0x04A00000", - "paths": ["yolo/coco_giraffes_296969_raw_480x640x3_uint8_rgb.bin"], + "paths": [ + "yolo/coco_giraffes_296969_raw_480x640x3_uint8_rgb.bin" + ], "required": true } ], @@ -178,7 +192,9 @@ "file_loads": [ { "address": "0x04A00000", - "paths": ["yolo/coco_elephants_445248_raw_480x640x3_uint8_rgb.bin"], + "paths": [ + "yolo/coco_elephants_445248_raw_480x640x3_uint8_rgb.bin" + ], "required": true } ], @@ -194,7 +210,9 @@ "file_loads": [ { "address": "0x04A00000", - "paths": ["yolo/coco_baseball_043816_raw_480x640x3_uint8_rgb.bin"], + "paths": [ + "yolo/coco_baseball_043816_raw_480x640x3_uint8_rgb.bin" + ], "required": true } ], @@ -234,17 +252,24 @@ "file_loads": [ { "address": "0x0", - "paths": ["zero2m.bin", "common/zero2m.bin"], + "paths": [ + "zero2m.bin", + "common/zero2m.bin" + ], "required": true }, { "address": "0x2000", - "paths": ["dncnn/dncnn20l64_input.bin"], + "paths": [ + "dncnn/dncnn20l64_input.bin" + ], "required": true }, { "address": "0x14000", - "paths": ["dncnn/dncnn20l64_weights.bin"], + "paths": [ + "dncnn/dncnn20l64_weights.bin" + ], "required": true } ], @@ -253,7 +278,10 @@ "accuracy": { "kind": "uint8_npy", "offset": "0x10000", - "shape": [64, 64], + "shape": [ + 64, + 64 + ], "max_abs": 2, "reference_path": "ported_models/dncnn/refs/dncnn20l64_reference.npy", "comment": "Gates the 64x64 denoised output @0x10000 against the PyTorch/deepinv oracle (refs/dncnn20l64_reference.npy, produced by scripts/gen_dncnn_oracle.py running deepinv.models.DnCNN on the pinned weights). Board-verified: the int8 kernel matches the FP32 oracle at max_abs=1 (3/3 board runs); gate max_abs<=2 is a 1-unit margin." @@ -315,6 +343,12 @@ }, "smolvlm_500m": { "config": "ported_models/llama_cpp_et/benchmarks/smolvlm_500m.json" + }, + "phi3_mini": { + "config": "ported_models/llama_cpp_et/benchmarks/phi3_mini.json" + }, + "minicpm3_4b": { + "config": "ported_models/llama_cpp_et/benchmarks/minicpm3_4b.json" } } } diff --git a/ported_models/bitnet_2b/docs/RECIPE.md b/ported_models/bitnet_2b/docs/RECIPE.md index 6d41f06d..42f90024 100644 --- a/ported_models/bitnet_2b/docs/RECIPE.md +++ b/ported_models/bitnet_2b/docs/RECIPE.md @@ -1,18 +1,12 @@ -# BitNet-b1.58-2B-4T Porting Recipe - -## Overview - -Adds `microsoft/bitnet-b1.58-2B-4T` (2B-parameter, native 1.58-bit ternary -weight causal LM -- Microsoft's official BitNet release) to the -`llama.cpp-et` framework. Confirmed via a minimal custom GGUF KV parser -(the installed `gguf` PyPI package's `GGMLQuantizationType` enum doesn't -yet recognize this file's tensor dtype -- raw type id 36 -- so its -`GGUFReader` crashes before finishing construction; wrote a small -struct-based reader that only walks the KV section and never touches -tensor dtype, since that's all we need here): `general.architecture = -bitnet-b1.58`. A completely distinct execution family from any other -decoder on this board -- the ONLY ternary-weight model attempted in this -campaign. +# BitNet-b1.58-2B-4T -- Negative Result + +## Summary + +Attempted to add `microsoft/bitnet-b1.58-2B-4T` (2B-parameter, native +1.58-bit ternary weight causal LM) to the `llama.cpp-et` framework. **Does +not load with this repo's vendored `llama.cpp-et` submodule.** No +model-ports claim is filed for this model; this recipe documents the +failure rather than a working port. ## Model Reference @@ -20,38 +14,53 @@ campaign. `04c3b9ad9361b824064a1f25ea60a8be9599b127` - **License**: MIT - **GGUF source**: `microsoft/bitnet-b1.58-2B-4T-gguf` (official), file - `ggml-model-i2_s.gguf` -- **Quantization**: native `i2_s` (2-bit packed ternary -- NOT a - post-training quantization of a higher-precision model; this is the - model's actual trained weight representation), + `ggml-model-i2_s.gguf`, `sha256=4221b252fdd5fd25e15847adfeb5ee88886506ba50b8a34548374492884c2162` (verified locally against the downloaded file) -- **Architecture**: `arch = bitnet-b1.58` per GGUF metadata, 332 tensors. - -## Verification performed this round - -GGUF-metadata-level only, and even that needed a workaround (see the custom -parser note above) -- no full ET sysemu load/offload test this round. - -## Why this port's ET-SoC1 kernel support is a genuinely open, not-yet-answered question - -This is the one model in this whole campaign where "no new kernel work -needed" is NOT a safe assumption. Ternary weight matmul (`i2_s`) is a -fundamentally different compute pattern from every quantization scheme -already proven on the ET backend (Q8_0, Q4_K, etc. all dequantize blocks -of *scaled* values; BitNet's ternary weights are `{-1, 0, +1}` with a -single per-tensor scale, enabling addition/subtraction-only matmul with no -multiplication at all in the ideal case). Whether `ggml-et.cpp`'s -`GGML_OP_MUL_MAT` implementation handles the `i2_s` block format at all is -UNKNOWN -- not checked this round. This is flagged as the least-certain -port in the entire campaign; treat the claim as "GGUF loads and declares -this architecture," not "runs on the board." - -## Open items for maintainer review - -- Not board-registered; `ported_models/submissions/model_ports/bitnet_2b.json` - is the model-ports track claim, pending identity approval. -- No changes to any protected file or the vendored submodule. -- **Real, unresolved risk**: `i2_s` ternary matmul may not be supported by - the ET backend's `MUL_MAT` implementation at all. This needs an actual - sysemu/board load to know either way -- not assumed positive or negative. +- GGUF metadata (read via a minimal custom KV-only parser, since the + installed `gguf` PyPI package's tensor-dtype enum doesn't recognize this + file's dtype either): `general.architecture = bitnet-b1.58`, 332 tensors. + +## Root cause: confirmed, not speculative + +Built a plain CPU-only (`GGML_ET=OFF`) configuration of the exact vendored +`llama.cpp-et` source in this repo and tried to load the file with +`llama-perplexity`. It fails at model load, before any ET-specific code +runs at all: + +``` +gguf_init_from_file_impl: tensor 'blk.0.ffn_down.weight' of type 36 +(TYPE_IQ4_NL_4_4 REMOVED, use IQ4_NL with runtime repacking) has 6912 +elements per row, not a multiple of block size (0) +gguf_init_from_file_impl: failed to read tensor info +llama_model_load: error loading model: llama_model_loader: failed to load +model from ggml-model-i2_s.gguf +``` + +This repo's vendored `llama.cpp-et` fork is from a point in llama.cpp's +history where GGML tensor-type id 36 was `TYPE_IQ4_NL_4_4`, since removed +upstream. BitNet's official GGUF export uses type id 36 for its native +`i2_s` ternary format. The two collide: this fork's tensor-type enum +interprets BitNet's ternary tensors as a stale, incompatible legacy type, +and rejects the file outright at the format-parsing stage -- before +reaching any question of whether the ET backend's `MUL_MAT` could handle +ternary matmul. + +## Why no claim is filed + +The port genuinely does not run, on CPU or otherwise, with this repo's +current vendored source. Filing a model-ports claim for something that +doesn't load would be exactly the kind of unsubstantiated submission this +process is meant to prevent. This is the same category as this campaign's +other documented negative results (RWKV-6, PLaMo-2 -- both blocked on +missing `GGML_OP_CPY` support) -- a real, reproducible incompatibility, +not a hedge or a "maybe." + +## What would need to change + +Either this repo's vendored `llama.cpp-et` needs to be updated past the +point where type id 36 was reused for ternary support (a submodule bump, +out of scope for a model-port PR), or BitNet's GGUF would need +re-exporting against an older, non-conflicting tensor-type scheme (not +attempted -- would change the model's actual on-disk representation, not +just add board wiring). diff --git a/ported_models/llama_cpp_et/artifacts.json b/ported_models/llama_cpp_et/artifacts.json index 9c419ae1..c8494d2f 100644 --- a/ported_models/llama_cpp_et/artifacts.json +++ b/ported_models/llama_cpp_et/artifacts.json @@ -485,6 +485,42 @@ "sha256": "d1eb8b6b23979205fdf63703ed10f788131a3f812c7b1f72e0119d5d81295150", "size_bytes": 108783360, "note": "SmolVLM 500M vision projector (SigLIP ~93M + MLP). Q8_0 quantized. Must be loaded alongside smolvlm_500m_q8_gguf." + }, + "phi3_mini_q4_gguf": { + "kind": "model", + "framework": "llama.cpp-et", + "variant": "Phi-3-mini-4k-instruct-q4", + "filename": "Phi-3-mini-4k-instruct-q4.gguf", + "env": "PHI3_MINI_MODEL_PATH", + "source": { + "type": "huggingface", + "repo": "microsoft/Phi-3-mini-4k-instruct-gguf", + "revision": "main", + "filename": "Phi-3-mini-4k-instruct-q4.gguf", + "url": "https://huggingface.co/microsoft/Phi-3-mini-4k-instruct-gguf/resolve/main/Phi-3-mini-4k-instruct-q4.gguf" + }, + "sha256": "8a83c7fb9049a9b2e92266fa7ad04933bb53aa1e85136b7b30f1b8000ff2edef", + "size": 2393231072, + "local_cache": "local-artifacts/models/Phi-3-mini-4k-instruct-q4.gguf", + "board_path": "/data/models/Phi-3-mini-4k-instruct-q4.gguf" + }, + "minicpm3_4b_q8_gguf": { + "kind": "model", + "framework": "llama.cpp-et", + "variant": "MiniCPM3-4B-Q8_0", + "filename": "MiniCPM3-4B-Q8_0.gguf", + "env": "MINICPM3_4B_MODEL_PATH", + "source": { + "type": "huggingface", + "repo": "QuantFactory/MiniCPM3-4B-GGUF", + "revision": "main", + "filename": "MiniCPM3-4B.Q8_0.gguf", + "url": "https://huggingface.co/QuantFactory/MiniCPM3-4B-GGUF/resolve/main/MiniCPM3-4B.Q8_0.gguf" + }, + "sha256": "a540961f131d6ab9616b6cb1c266be86735afe84907a445ad68e1e3e9422d122", + "size": 4331349440, + "local_cache": "local-artifacts/models/MiniCPM3-4B-Q8_0.gguf", + "board_path": "/data/models/MiniCPM3-4B-Q8_0.gguf" } } } diff --git a/ported_models/llama_cpp_et/benchmarks/minicpm3_4b.json b/ported_models/llama_cpp_et/benchmarks/minicpm3_4b.json new file mode 100644 index 00000000..daa1d77d --- /dev/null +++ b/ported_models/llama_cpp_et/benchmarks/minicpm3_4b.json @@ -0,0 +1,52 @@ +{ + "runner": "llama_server", + "board": true, + "framework": { + "name": "llama.cpp-et", + "runner": "llama_server", + "source_artifact": "llama_cpp_source" + }, + "artifacts_file": "../artifacts.json", + "canonical_variant": "MiniCPM3-4B-Q8_0", + "score": { + "metric": "tokens_per_second", + "label": "Decode tokens/s", + "higher_is_better": true + }, + "llama_server": { + "source_artifact": "llama_cpp_source", + "model_artifact": "minicpm3_4b_q8_gguf", + "server_artifact": "llama_server", + "workdir_artifact": "llama_cpp_build", + "host": "127.0.0.1", + "port": 18134, + "device": "ET", + "gpu_layers": 99, + "ctx_size": 2048, + "batch_size": 256, + "ubatch_size": 128, + "parallel": 1, + "cache_ram_mib": 0, + "ready_timeout_s": 300, + "request_timeout_s": 420, + "flash_attn": false, + "api": "completion", + "prompt": "Repeat this token sequence without commentary: OK OK OK OK OK OK OK OK OK OK", + "max_tokens": 96, + "temperature": 0, + "ignore_eos": true, + "min_completion_tokens": 32, + "perplexity": { + "enabled": true, + "perplexity_artifact": "llama_perplexity", + "corpus_artifact": "wikitext2_raw_test", + "ctx_size": 128, + "batch_size": 128, + "ubatch_size": 128, + "timeout_s": 420, + "min_ppl": 1.0, + "max_ppl": 1000.0, + "chunks": 4 + } + } +} diff --git a/ported_models/llama_cpp_et/benchmarks/phi3_mini.json b/ported_models/llama_cpp_et/benchmarks/phi3_mini.json new file mode 100644 index 00000000..9171ba73 --- /dev/null +++ b/ported_models/llama_cpp_et/benchmarks/phi3_mini.json @@ -0,0 +1,52 @@ +{ + "runner": "llama_server", + "board": true, + "framework": { + "name": "llama.cpp-et", + "runner": "llama_server", + "source_artifact": "llama_cpp_source" + }, + "artifacts_file": "../artifacts.json", + "canonical_variant": "Phi-3-mini-4k-instruct-q4", + "score": { + "metric": "tokens_per_second", + "label": "Decode tokens/s", + "higher_is_better": true + }, + "llama_server": { + "source_artifact": "llama_cpp_source", + "model_artifact": "phi3_mini_q4_gguf", + "server_artifact": "llama_server", + "workdir_artifact": "llama_cpp_build", + "host": "127.0.0.1", + "port": 18133, + "device": "ET", + "gpu_layers": 99, + "ctx_size": 2048, + "batch_size": 256, + "ubatch_size": 128, + "parallel": 1, + "cache_ram_mib": 0, + "ready_timeout_s": 300, + "request_timeout_s": 420, + "flash_attn": false, + "api": "completion", + "prompt": "Repeat this token sequence without commentary: OK OK OK OK OK OK OK OK OK OK", + "max_tokens": 96, + "temperature": 0, + "ignore_eos": true, + "min_completion_tokens": 32, + "perplexity": { + "enabled": true, + "perplexity_artifact": "llama_perplexity", + "corpus_artifact": "wikitext2_raw_test", + "ctx_size": 128, + "batch_size": 128, + "ubatch_size": 128, + "timeout_s": 420, + "min_ppl": 1.0, + "max_ppl": 1000.0, + "chunks": 4 + } + } +} diff --git a/ported_models/minicpm3_4b/docs/RECIPE.md b/ported_models/minicpm3_4b/docs/RECIPE.md index 66becf4f..e638e83e 100644 --- a/ported_models/minicpm3_4b/docs/RECIPE.md +++ b/ported_models/minicpm3_4b/docs/RECIPE.md @@ -27,22 +27,34 @@ scheme related to DeepSeek-V2's MLA, unlike MiniCPM/MiniCPM5's plain GQA). ## Verification performed this round -GGUF-metadata-level only (downloaded exact file, verified sha256, confirmed -`general.architecture` + tensor count) -- not a full ET sysemu load/offload -test this round. +Host reference: built a plain CPU-only (`GGML_ET=OFF`) configuration of the +same vendored `llama.cpp-et` source and ran `llama-perplexity` against the +board-pinned WikiText-2 corpus (`wikitext2_raw_test`, +`sha256=173c87a53759e0201f33e0ccf978e510c2042d7f2cb78229d9a50d79b9e7dd08`), +context 128 / batch 128 / ubatch 128 / 4 chunks. The model loads and runs +cleanly on `ggml-cpu`: -## Why this port's ET-SoC1 kernel support is an open question +``` +Final estimate: PPL = 11.8752 +/- 2.29542 +``` -MiniCPM3's MLA-style attention needs low-rank KV compression (down-projecting -K/V into a small latent space, then up-projecting per-head at attention time) --- this is still expressible as `GGML_OP_MUL_MAT` chains (no new op type -needed in principle), but it has NOT been checked against the real ET sysemu -backend this round. Flagging as unconfirmed rather than assuming it works -like a plain-GQA model would. +This confirms MiniCPM3's MLA-style compressed attention (low-rank KV +down/up-projection) works correctly through the CPU backend. + +## Why this port's ET-SoC1 kernel support is still an open question + +CPU-backend success does not prove the ET-SoC1 backend's own `MUL_MAT` chain +handles the same low-rank-compression graph shape correctly -- that has not +been checked against the real ET sysemu backend or board. Flagging as +genuinely unconfirmed on ET specifically, not a formality. ## Open items for maintainer review -- Not board-registered; `ported_models/submissions/model_ports/minicpm3_4b.json` - is the model-ports track claim, pending identity approval. +- Registered in `artifacts.json`, `ported_models/llama_cpp_et/benchmarks/minicpm3_4b.json`, + and `.github/ci/benchmark_config.json` (port 18134) -- board-testable now, + independent of the model-ports track claim below. +- `ported_models/submissions/model_ports/minicpm3_4b.json` is the model-ports + track claim, pending identity approval. - No changes to any protected file or the vendored submodule. -- MLA attention path not live-verified against ET sysemu. +- MLA attention path confirmed on CPU, NOT live-verified against ET sysemu + specifically. diff --git a/ported_models/phi3_mini/docs/RECIPE.md b/ported_models/phi3_mini/docs/RECIPE.md index a2f5678f..b1cd223c 100644 --- a/ported_models/phi3_mini/docs/RECIPE.md +++ b/ported_models/phi3_mini/docs/RECIPE.md @@ -24,9 +24,16 @@ weight packing than phi2). ## Verification performed this round -GGUF-metadata-level only (downloaded exact file, verified sha256, confirmed -`general.architecture` + tensor count) -- not a full ET sysemu load/offload -test this round, given the scale of this porting batch. +Host reference: built a plain CPU-only (`GGML_ET=OFF`) configuration of the +same vendored `llama.cpp-et` source and ran `llama-perplexity` against the +board-pinned WikiText-2 corpus (`wikitext2_raw_test`, +`sha256=173c87a53759e0201f33e0ccf978e510c2042d7f2cb78229d9a50d79b9e7dd08`), +context 128 / batch 128 / ubatch 128 / 4 chunks. The model loads and runs +cleanly: + +``` +Final estimate: PPL = 9.4850 +/- 1.86142 +``` ## Why this port likely needs no new ET-SoC1 kernel work @@ -38,8 +45,11 @@ already handles. Not confirmed live this round. ## Open items for maintainer review -- Not board-registered; `ported_models/submissions/model_ports/phi3_mini.json` - is the model-ports track claim, pending identity approval. +- Registered in `artifacts.json`, `ported_models/llama_cpp_et/benchmarks/phi3_mini.json`, + and `.github/ci/benchmark_config.json` (port 18133) -- board-testable now, + independent of the model-ports track claim below. +- `ported_models/submissions/model_ports/phi3_mini.json` is the model-ports + track claim, pending identity approval. - No changes to any protected file or the vendored submodule. - Quantization is Q4 not Q8_0 (source constraint, not a choice) -- flagged honestly since Q8_0 has been this campaign's default elsewhere. diff --git a/ported_models/submissions/model_ports/bitnet_2b.json b/ported_models/submissions/model_ports/bitnet_2b.json deleted file mode 100644 index df76dfeb..00000000 --- a/ported_models/submissions/model_ports/bitnet_2b.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "schema_version": 1, - "track": "most_models_ported", - "benchmark_model": "bitnet_2b", - "identity_id": "bitnet-b1.58", - "source": { - "repo": "microsoft/bitnet-b1.58-2B-4T", - "revision": "04c3b9ad9361b824064a1f25ea60a8be9599b127", - "license": "mit" - }, - "implementation_paths": ["ported_models/bitnet_2b"], - "benchmark_config": ".github/ci/benchmark_config.json", - "recipe": "ported_models/bitnet_2b/docs/RECIPE.md" -} From 793d9c8a520271b80e3e9a68476a08f734e1275e Mon Sep 17 00:00:00 2001 From: DarthCeltic <178664201+DarthCeltic@users.noreply.github.com> Date: Sat, 25 Jul 2026 18:45:12 -0400 Subject: [PATCH 3/4] fix(model-ports): correct benchmark_config claim field for minicpm3_4b, phi3_mini Each claim's benchmark_config must exactly match the model's "config" pointer in .github/ci/benchmark_config.json per effective_model_config() in model_port_claim.py, not the top-level benchmark_config.json path itself. Fixes a mismatch that would fail eligibility validation. --- ported_models/submissions/model_ports/minicpm3_4b.json | 6 ++++-- ported_models/submissions/model_ports/phi3_mini.json | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ported_models/submissions/model_ports/minicpm3_4b.json b/ported_models/submissions/model_ports/minicpm3_4b.json index 52a675bd..097a8296 100644 --- a/ported_models/submissions/model_ports/minicpm3_4b.json +++ b/ported_models/submissions/model_ports/minicpm3_4b.json @@ -8,7 +8,9 @@ "revision": "d6b14ddaefdb11c624dd75c3c779549bc90b08cb", "license": "apache-2.0" }, - "implementation_paths": ["ported_models/minicpm3_4b"], - "benchmark_config": ".github/ci/benchmark_config.json", + "implementation_paths": [ + "ported_models/minicpm3_4b" + ], + "benchmark_config": "ported_models/llama_cpp_et/benchmarks/minicpm3_4b.json", "recipe": "ported_models/minicpm3_4b/docs/RECIPE.md" } diff --git a/ported_models/submissions/model_ports/phi3_mini.json b/ported_models/submissions/model_ports/phi3_mini.json index e60f8957..f32e8e36 100644 --- a/ported_models/submissions/model_ports/phi3_mini.json +++ b/ported_models/submissions/model_ports/phi3_mini.json @@ -8,7 +8,9 @@ "revision": "f39ac1d28e925b323eae81227eaba4464caced4e", "license": "mit" }, - "implementation_paths": ["ported_models/phi3_mini"], - "benchmark_config": ".github/ci/benchmark_config.json", + "implementation_paths": [ + "ported_models/phi3_mini" + ], + "benchmark_config": "ported_models/llama_cpp_et/benchmarks/phi3_mini.json", "recipe": "ported_models/phi3_mini/docs/RECIPE.md" } From 8fd030d11d83d6d65afcf8701962621735213c9e Mon Sep 17 00:00:00 2001 From: DarthCeltic <178664201+DarthCeltic@users.noreply.github.com> Date: Sun, 26 Jul 2026 07:32:41 -0400 Subject: [PATCH 4/4] Add committed deterministic PPL oracle(s) per maintainer review --- .../minicpm3_4b/oracle/perplexity_oracle.json | 25 +++++++++++++++++++ .../phi3_mini/oracle/perplexity_oracle.json | 25 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 ported_models/minicpm3_4b/oracle/perplexity_oracle.json create mode 100644 ported_models/phi3_mini/oracle/perplexity_oracle.json diff --git a/ported_models/minicpm3_4b/oracle/perplexity_oracle.json b/ported_models/minicpm3_4b/oracle/perplexity_oracle.json new file mode 100644 index 00000000..a088cab9 --- /dev/null +++ b/ported_models/minicpm3_4b/oracle/perplexity_oracle.json @@ -0,0 +1,25 @@ +{ + "oracle_type": "perplexity_threshold", + "model_artifact": { + "repo": "QuantFactory/MiniCPM3-4B-GGUF", + "revision": "main", + "filename": "MiniCPM3-4B.Q8_0.gguf", + "sha256": "a540961f131d6ab9616b6cb1c266be86735afe84907a445ad68e1e3e9422d122" + }, + "corpus": { + "artifact": "wikitext2_raw_test", + "sha256": "173c87a53759e0201f33e0ccf978e510c2042d7f2cb78229d9a50d79b9e7dd08" + }, + "command": "llama-perplexity --model MiniCPM3-4B-Q8_0.gguf -f wiki.test.raw -c 128 -b 128 -ub 128 --chunks 4", + "reference_run": { + "final_ppl": 11.8752, + "final_ppl_stderr": 2.29542, + "measured_on": "CPU (ggml-cpu backend, GGML_ET=OFF build)", + "measured_date": "2026-07-25" + }, + "comparison_threshold": { + "metric": "final_ppl", + "max_relative_deviation": 0.2, + "note": "Matches this repo's own leaderboard-gate policy (PPL must stay within 20% of best-seen value). A full-offload ET-SoC1 re-run against this exact command/corpus/artifact should land at final_ppl within [9.50, 14.25] to be considered consistent with this reference run. No ET-SoC1 hardware was available to this session to perform that re-run directly." + } +} diff --git a/ported_models/phi3_mini/oracle/perplexity_oracle.json b/ported_models/phi3_mini/oracle/perplexity_oracle.json new file mode 100644 index 00000000..fffeea92 --- /dev/null +++ b/ported_models/phi3_mini/oracle/perplexity_oracle.json @@ -0,0 +1,25 @@ +{ + "oracle_type": "perplexity_threshold", + "model_artifact": { + "repo": "microsoft/Phi-3-mini-4k-instruct-gguf", + "revision": "main", + "filename": "Phi-3-mini-4k-instruct-q4.gguf", + "sha256": "8a83c7fb9049a9b2e92266fa7ad04933bb53aa1e85136b7b30f1b8000ff2edef" + }, + "corpus": { + "artifact": "wikitext2_raw_test", + "sha256": "173c87a53759e0201f33e0ccf978e510c2042d7f2cb78229d9a50d79b9e7dd08" + }, + "command": "llama-perplexity --model Phi-3-mini-4k-instruct-q4.gguf -f wiki.test.raw -c 128 -b 128 -ub 128 --chunks 4", + "reference_run": { + "final_ppl": 9.485, + "final_ppl_stderr": 1.86142, + "measured_on": "CPU (ggml-cpu backend, GGML_ET=OFF build)", + "measured_date": "2026-07-25" + }, + "comparison_threshold": { + "metric": "final_ppl", + "max_relative_deviation": 0.2, + "note": "Matches this repo's own leaderboard-gate policy (PPL must stay within 20% of best-seen value). A full-offload ET-SoC1 re-run against this exact command/corpus/artifact should land at final_ppl within [7.59, 11.38] to be considered consistent with this reference run. No ET-SoC1 hardware was available to this session to perform that re-run directly." + } +}