Spaces:
Running
Running
Sync from GitHub
Browse files
classic/engines/gemma4_moe_ssd.js
CHANGED
|
@@ -850,7 +850,7 @@ export class Gemma4MoeSsd extends Qwen3MoeSsd {
|
|
| 850 |
tables(ls, null, this.b.ropeS); tables(lf, this.ropeFreqs, this.b.ropeF);
|
| 851 |
const selBytes = T * 2 * K * 4;
|
| 852 |
let enc = dev.createCommandEncoder(), pass = enc.beginComputePass();
|
| 853 |
-
this.dispatch(pass, 'embedQ6KB', this.gB.embed, Math.ceil(H / 256), T);
|
| 854 |
this.encodeTrunkB(pass, 0, T, S);
|
| 855 |
pass.end();
|
| 856 |
enc.copyBufferToBuffer(this.b.sel, 0, this.rbSelB, 0, selBytes);
|
|
@@ -923,7 +923,7 @@ export class Gemma4MoeSsd extends Qwen3MoeSsd {
|
|
| 923 |
return r;
|
| 924 |
}
|
| 925 |
|
| 926 |
-
encodeEmbed(pass) { this.dispatch(pass, 'embedQ6K', this.g.embed, Math.ceil(this.cfg.hidden / 256)); }
|
| 927 |
encodeHead(pass, want) {
|
| 928 |
const c = this.cfg;
|
| 929 |
this.dispatch(pass, 'rmsnorm', this.g.rmsOut, 1);
|
|
|
|
| 850 |
tables(ls, null, this.b.ropeS); tables(lf, this.ropeFreqs, this.b.ropeF);
|
| 851 |
const selBytes = T * 2 * K * 4;
|
| 852 |
let enc = dev.createCommandEncoder(), pass = enc.beginComputePass();
|
| 853 |
+
this.dispatch(pass, this.embedKernelB || 'embedQ6KB', this.gB.embed, Math.ceil(H / 256), T); // embedKernelB: an engine with another table type (hy_v3 Q8_0)
|
| 854 |
this.encodeTrunkB(pass, 0, T, S);
|
| 855 |
pass.end();
|
| 856 |
enc.copyBufferToBuffer(this.b.sel, 0, this.rbSelB, 0, selBytes);
|
|
|
|
| 923 |
return r;
|
| 924 |
}
|
| 925 |
|
| 926 |
+
encodeEmbed(pass) { this.dispatch(pass, this.embedKernel || 'embedQ6K', this.g.embed, Math.ceil(this.cfg.hidden / 256)); }
|
| 927 |
encodeHead(pass, want) {
|
| 928 |
const c = this.cfg;
|
| 929 |
this.dispatch(pass, 'rmsnorm', this.g.rmsOut, 1);
|