@genai-fi/nanogpt 0.15.11 → 0.15.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Generator.js +5 -3
- package/package.json +1 -1
package/dist/Generator.js
CHANGED
|
@@ -11757,9 +11757,11 @@ class AS extends Ui {
|
|
|
11757
11757
|
const C = Vd(g, r);
|
|
11758
11758
|
n?.includeProbabilities && (d = g), p = Wd(C, h);
|
|
11759
11759
|
} else if (o) {
|
|
11760
|
-
const { values: x, indices: g } = Bc(l, o)
|
|
11760
|
+
const { values: x, indices: g } = Bc(l, o);
|
|
11761
|
+
console.warn("Using broken multinomial");
|
|
11762
|
+
const C = Fn(x, 1);
|
|
11761
11763
|
p = Bd(g, C, 1), x.dispose(), g.dispose(), C.dispose();
|
|
11762
|
-
} else if (p = Fn(l, 1), n?.includeProbabilities) {
|
|
11764
|
+
} else if (console.warn("Using broken multinomial"), p = Fn(l, 1), n?.includeProbabilities) {
|
|
11763
11765
|
const x = gs(l);
|
|
11764
11766
|
d = await x.array(), x.dispose();
|
|
11765
11767
|
}
|
|
@@ -11837,7 +11839,7 @@ class AS extends Ui {
|
|
|
11837
11839
|
}
|
|
11838
11840
|
resetCache(t) {
|
|
11839
11841
|
this.cache && (this.cache.forEach((e) => {
|
|
11840
|
-
e && (e.k && e.k.dispose(), e.v && e.v.dispose(), e.k = void 0, e.v = void 0);
|
|
11842
|
+
e && (e.k && e.k.dispose(), e.v && e.v.dispose(), e.k = void 0, e.v = void 0, e.cumulativeLength = 0, e.length = 0);
|
|
11841
11843
|
}), t || (this.cache = null)), this.lastToken = -1;
|
|
11842
11844
|
}
|
|
11843
11845
|
reset() {
|