Spaces:
Running
Running
Upload qvac-gpu.js with huggingface_hub
Browse files- qvac-gpu.js +4 -1
qvac-gpu.js
CHANGED
|
@@ -980,7 +980,10 @@ export async function createQvacGPU(manifest, fetchTensor, cap = 64, eos = 2, st
|
|
| 980 |
const P_mmQ3B = bits === 3 && q3f ? pipe(mmQ3BigKernel(), "mmQ3B") : null; // big q3f (lm_head)
|
| 981 |
const P_mmT2B = hasT2 ? pipe(mmT2Kernel(false, 16, 16, 4), "mmT2B") : null, P_mmT2Badd = hasT2 ? pipe(mmT2Kernel(true, 16, 16, 4), "mmT2Badd") : null;
|
| 982 |
const P_mmT2RB = hasT2R ? pipe(mmT2RKernel(false, 16, 16, 4), "mmT2RB") : null, P_mmT2RBadd = hasT2R ? pipe(mmT2RKernel(true, 16, 16, 4), "mmT2RBadd") : null;
|
| 983 |
-
|
|
|
|
|
|
|
|
|
|
| 984 |
// fused ternary layer (resident only): qkv 3→1 pass, gate/up 2→1, both ropes 1, act⊕sub-norm 1
|
| 985 |
// measured policy (A/B walls, 5-run medians): fusion wins on the sub-norm (BitNet) family
|
| 986 |
// (12.3 vs 13.2 ms/tok on bitnet-2b) and LOSES on llama-arch ternary (24.5 vs 19.5 on
|
|
|
|
| 980 |
const P_mmQ3B = bits === 3 && q3f ? pipe(mmQ3BigKernel(), "mmQ3B") : null; // big q3f (lm_head)
|
| 981 |
const P_mmT2B = hasT2 ? pipe(mmT2Kernel(false, 16, 16, 4), "mmT2B") : null, P_mmT2Badd = hasT2 ? pipe(mmT2Kernel(true, 16, 16, 4), "mmT2Badd") : null;
|
| 982 |
const P_mmT2RB = hasT2R ? pipe(mmT2RKernel(false, 16, 16, 4), "mmT2RB") : null, P_mmT2RBadd = hasT2R ? pipe(mmT2RKernel(true, 16, 16, 4), "mmT2RBadd") : null;
|
| 983 |
+
// DRAFT: dense sub-norm (BitNet) STREAMING is enabled — the unfused layerBody applies attn/ffn sub-norm
|
| 984 |
+
// (rms over the resident Nrm weights) with ws(role) from R[role], and mmW dispatches t2 (Falcon-E proves it);
|
| 985 |
+
// combined with the t2 stream packing (t2stream), dense sub-norm streams. MoE sub-norm stays resident-only.
|
| 986 |
+
if (subNorm && manifest.moe) throw new Error("bitnet sub-norm MoE path is resident-only for now");
|
| 987 |
// fused ternary layer (resident only): qkv 3→1 pass, gate/up 2→1, both ropes 1, act⊕sub-norm 1
|
| 988 |
// measured policy (A/B walls, 5-run medians): fusion wins on the sub-norm (BitNet) family
|
| 989 |
// (12.3 vs 13.2 ms/tok on bitnet-2b) and LOSES on llama-arch ternary (24.5 vs 19.5 on
|