You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9703140
Browse filesBrowse the repository at this point in the historyBrowse files
## Summary
- restore PLaMo2's published `1e4` local RoPE base for the legacy public
GGUF profile whose metadata incorrectly declares `1e6`
- preserve `A_log` and evaluate `-exp(A_log)` in the ONNX graph,
including correct HF/GGUF and effectively-tied weight loading
- align PLaMo2's public recurrent state ABI with ORT GenAI 0.15.2 and
add durable real-model L4/L5 evidence
## Root cause
The pinned GGUF declares `plamo2.rope.freq_base=1e6`, while the pinned
HF architecture has `full_attention_idx=[]` and uses
`rope_local_theta=1e4` for every attention layer. Trusting the
contradictory GGUF field caused the first divergence in layer 1
attention during cached decode; later recurrent layers amplified it.
Mamba state update, convolution orientation, attention QKV/QK norm,
residual ordering, cache indexing, fusion, and rollback/replay were not
the source.
## Real-model validation
Pinned revisions:
- HF `pfnet/plamo-2-1b`: `92c75fd6eea9018bcb9c33ee8921589febe071fa`
- F32 GGUF: `184326afcef7232d94df09a33279598255890325`
Raw ORT 1.29 CPU after the fix:
- prefill max abs error: `5.34057617e-05`
- first cached decode max abs error: `2.47955322e-05`
- maximum over 19 cached steps: `4.62532043e-05`
- exact 20/20 greedy token match
- rollback/replay exact
ORT GenAI 0.15.2 source independently discovers sparse KV indices and
sparse `conv_state` indices, then derives the paired `recurrent_state`
names. After renaming PLaMo2's semantic SSM state to that public ABI, a
CPU-specialized package with all eight attention layers lowered to GQA
loaded and generated the exact verified 20-token continuation from
prompt IDs `[1, 6721]`. Unspecialized `Attention` plus recurrent state
is still rejected during package config generation.
The immutable tokenizer source was audited against the GGUF: all 100,000
ordered tokens, token types, float32 scores, and special IDs match
exactly, with no normalizer or pre-tokenizer. Text tokenization remains
deferred because ORT GenAI requires `tokenizer.json`, and standard
Unigram byte fallback is not identity-preserving: the official tokenizer
encodes literal `<0xFA>` as `[60, 48, 120, 5109, 62]`, while the
standard tokenizer emits byte token `[250]`.
## Branch reconstruction
Parent #617 was admin squash-merged as
`79efe2c4512a40900ac5af5e794d057ea39c8f5b`. This branch was
reconstructed directly on that commit and retains only the two reviewed
#620 commits, preserving #617 as the explicit parent while removing its
duplicated pre-squash history.
## Tests
- focused PLaMo2 raw ORT state/rollback, GGUF, OGA metadata, evidence,
tokenizer, and graph tests: 53 passed
- PLaMo2 synthetic parity/weight selection: 2 passed, 1 expected skip
- YAML model-case schema validation: 252 passed
- broad non-integration suite: 7,525 passed, 54 skipped, 1 subtest
passed
- initialized pinned lintrunner tools; formatting and lint clean
- GPT-5.6-sol medium post-rebase review: no actionable findings
- durable real-model L4 passed and L5 matched 20/20 tokens; the removed
19 GB validation cache was not redownloaded
---------
Signed-off-by: Justin Chu <[email protected]>
Co-authored-by: Copilot App <[email protected]>
0 commit comments