bonsai_27b_1bit_HNPU / v81 /bonsai-27b-1024.json
sanmonga22's picture
Bonsai-27B 1-bit v81 bundle (4 decode shards + 1-bit lmhead + fp16 embed + tokenizer + op-package stub)
e49b028 verified
Raw
History Blame Contribute Delete
2.88 kB
{
"schema_version": 1,
"_comment": "Bonsai-27B (prism-ml) qwen3_5 GatedDeltaNet hybrid TEXT decoder at TRUE 1-BIT (Q1_0_g128, 1.125 bit/weight) for v81. 48 recurrent gated delta-rule linear-attn layers (+ short conv state) + 16 full gated softmax-attn layers (partial-rotary M-RoPE rot 64, output gate). Every Linear is the device-verified BonsaiBitnetOpPkg::BitnetLinear 1-bit op; norms/conv/SSM stay native. Weights come from the Q1_0 GGUF (dequant is the oracle). Decode is sharded (decode_shards) to fit the per-context cDSP memory wall; the qwen3_5_generate host-op (device-validated on qwen3.5-0.8b @ 25 tok/s) threads conv/SSM/KV state + drives the decode loop unchanged.",
"model": {
"name": "bonsai-27b-1bit",
"family": "llm",
"dsp_arch": "v81",
"tokenizer_pre": "qwen2"
},
"chat": {
"system": {
"prefix": "<|im_start|>system\n",
"suffix": "<|im_end|>\n"
},
"user": {
"prefix": "<|im_start|>user\n",
"suffix": "<|im_end|>\n"
},
"assistant": {
"prefix": "<|im_start|>assistant\n",
"suffix": "<|im_end|>\n"
}
},
"params": {
"hidden": 5120,
"vocab": 248320,
"n_layers": 64,
"max_ctx": 2048,
"kv_dim": 1024,
"head_dim": 256,
"rope_theta": 10000000.0,
"eos_token_id": 248044,
"gated_delta": {
"q_heads": 24,
"kv_heads": 4,
"lin_k_heads": 16,
"lin_v_heads": 48,
"lin_k_dim": 128,
"lin_v_dim": 128,
"conv_kernel": 4,
"full_every": 4,
"rot_dim": 64,
"attn_gate": true,
"full_attn_idx": [
3,
7,
11,
15,
19,
23,
27,
31,
35,
39,
43,
47,
51,
55,
59,
63
]
}
},
"artifacts": {
"contexts": {
"decode_s0": {
"bin": "bonsai27b_decode_s0_bitnet.bin",
"op_packages": [
{
"path": "libQnnBonsaiBitnet.so",
"interface": "exampleInterfaceProvider",
"targets": [
"CPU",
"HTP"
]
}
]
},
"decode_s1": {
"bin": "bonsai27b_decode_s1_bitnet.bin"
},
"decode_s2": {
"bin": "bonsai27b_decode_s2_bitnet.bin"
},
"decode_s3": {
"bin": "bonsai27b_decode_s3_bitnet.bin"
},
"lmhead": {
"bin": "bonsai27b_lmhead_bitnet.bin"
}
},
"embed": "bonsai27b_embed_f16.bin",
"tokenizer": "tokenizer.json"
},
"plan": {
"steps": [
{
"host": "qwen3_5_generate",
"params": {
"decode": "bonsai27b_decode_s0_bitnet,bonsai27b_decode_s1_bitnet,bonsai27b_decode_s2_bitnet,bonsai27b_decode_s3_bitnet",
"lmhead": "bonsai27b_lmhead_bitnet",
"max_new": 64,
"neg": -50000
}
}
]
}
}