@genai-fi/nanogpt 0.20.2 → 0.20.4
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 +1 -1
- package/dist/TeachableLLM.d.ts +1 -1
- package/dist/TeachableLLM.js +1 -1
- package/dist/Trainer.js +1 -1
- package/dist/loader/load.js +1 -1
- package/dist/loader/loadHF.js +1 -1
- package/dist/loader/loadTransformers.js +1 -1
- package/dist/loader/newZipLoad.js +1 -1
- package/dist/loader/oldZipLoad.js +1 -1
- package/dist/loader/save.js +1 -1
- package/dist/{main-D5CbfCiV.js → main-BqRjvJ8B.js} +1 -1
- package/dist/main.js +1 -1
- package/dist/models/NanoGPTV1.js +1 -1
- package/dist/models/NanoGPTV2.js +1 -1
- package/dist/models/factory.js +1 -1
- package/dist/models/model.js +1 -1
- package/dist/training/tasks/Task.js +3 -3
- package/dist/training/validation.js +1 -1
- package/package.json +1 -1
package/dist/Generator.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { c as e, s as t } from "./main-
|
|
1
|
+
import { c as e, s as t } from "./main-BqRjvJ8B.js";
|
|
2
2
|
export { t as default, e as isConversation };
|
package/dist/TeachableLLM.d.ts
CHANGED
|
@@ -44,7 +44,7 @@ export default class TeachableLLM {
|
|
|
44
44
|
private setStatus;
|
|
45
45
|
saveModel(options?: SaveOptions): Promise<Blob>;
|
|
46
46
|
static loadModel(data: Blob | Buffer | string, options?: LoadModelOptions): TeachableLLM;
|
|
47
|
-
static create(tokeniserType: 'char' | 'bpe', config: GPTConfig): TeachableLLM;
|
|
47
|
+
static create(tokeniserType: 'char' | 'bpe' | ITokeniser, config: GPTConfig): TeachableLLM;
|
|
48
48
|
getProfiler(): MemoryProfiler | undefined;
|
|
49
49
|
get enableProfiler(): boolean;
|
|
50
50
|
set enableProfiler(value: boolean);
|
package/dist/TeachableLLM.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as e } from "./main-
|
|
1
|
+
import { i as e } from "./main-BqRjvJ8B.js";
|
|
2
2
|
export { e as default };
|
package/dist/Trainer.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as e } from "./main-
|
|
1
|
+
import { a as e } from "./main-BqRjvJ8B.js";
|
|
2
2
|
export { e as default };
|
package/dist/loader/load.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { d as e, u as t } from "../main-
|
|
1
|
+
import { d as e, u as t } from "../main-BqRjvJ8B.js";
|
|
2
2
|
export { t as VERSION, e as loadModel };
|
package/dist/loader/loadHF.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { f as e } from "../main-
|
|
1
|
+
import { f as e } from "../main-BqRjvJ8B.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { h as e, m as t } from "../main-
|
|
1
|
+
import { h as e, m as t } from "../main-BqRjvJ8B.js";
|
|
2
2
|
export { t as default, e as mapTransformersConfigToGPTConfig };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { p as e } from "../main-
|
|
1
|
+
import { p as e } from "../main-BqRjvJ8B.js";
|
|
2
2
|
export { e as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { g as e } from "../main-
|
|
1
|
+
import { g as e } from "../main-BqRjvJ8B.js";
|
|
2
2
|
export { e as default };
|
package/dist/loader/save.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { l as e } from "../main-
|
|
1
|
+
import { l as e } from "../main-BqRjvJ8B.js";
|
|
2
2
|
export { e as saveModel };
|
|
@@ -13414,7 +13414,7 @@ var DS = class e extends hc {
|
|
|
13414
13414
|
}
|
|
13415
13415
|
static create(t, n) {
|
|
13416
13416
|
pc(n);
|
|
13417
|
-
let r = n, i = t === "char" ? new gc(r.vocabSize) : new Sc(r.vocabSize), a = nS(r), o = new e(i, a);
|
|
13417
|
+
let r = n, i = t === "char" ? new gc(r.vocabSize) : t === "bpe" ? new Sc(r.vocabSize) : t, a = nS(r), o = new e(i, a);
|
|
13418
13418
|
return o.setStatus("warmup"), xc(a).then((e) => {
|
|
13419
13419
|
o._memoryRequirements = e, o.tokeniser.trained ? (o.setStatus("ready"), o.ee.emit("loaded"), o.ee.emit("mode", o.mode)) : (o.setStatus("awaitingTokens"), o.ee.emit("loaded"), o.ee.emit("mode", o.mode), o.tokeniser.once("trainStatus", (e) => {
|
|
13420
13420
|
e === "trained" && o.setStatus("ready");
|
package/dist/main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, b as t, i as n, n as r, r as i, s as a, t as o, y as s } from "./main-
|
|
1
|
+
import { a as e, b as t, i as n, n as r, r as i, s as a, t as o, y as s } from "./main-BqRjvJ8B.js";
|
|
2
2
|
import c from "./tokeniser/CharTokeniser.js";
|
|
3
3
|
import l from "./tokeniser/bpe.js";
|
|
4
4
|
import { AdamWOptimizer as u } from "./training/AdamW.js";
|
package/dist/models/NanoGPTV1.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { y as e } from "../main-
|
|
1
|
+
import { y as e } from "../main-BqRjvJ8B.js";
|
|
2
2
|
export { e as default };
|
package/dist/models/NanoGPTV2.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { v as e } from "../main-
|
|
1
|
+
import { v as e } from "../main-BqRjvJ8B.js";
|
|
2
2
|
export { e as default };
|
package/dist/models/factory.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as e } from "../main-
|
|
1
|
+
import { _ as e } from "../main-BqRjvJ8B.js";
|
|
2
2
|
export { e as default };
|
package/dist/models/model.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { b as e } from "../main-
|
|
1
|
+
import { b as e } from "../main-BqRjvJ8B.js";
|
|
2
2
|
export { e as default };
|
|
@@ -11,10 +11,10 @@ function n(e, t, n, r, i, a) {
|
|
|
11
11
|
if (r.offset + n.length > o.length) {
|
|
12
12
|
let c = o.length - r.offset;
|
|
13
13
|
o.set(n.slice(0, c), r.offset);
|
|
14
|
-
let l = new Uint16Array(Math.floor(i * .1) + 100);
|
|
15
|
-
if (
|
|
14
|
+
let l = n.length - c, u = new Uint16Array(Math.max(Math.floor(i * .1) + 100, l));
|
|
15
|
+
if (u.set(n.slice(c), 0), t.push(u), a && s && !Array.isArray(e)) {
|
|
16
16
|
s.set(e.mask.slice(0, c).map((e) => +!!e), r.offset);
|
|
17
|
-
let t = new Uint8Array(
|
|
17
|
+
let t = new Uint8Array(u.length);
|
|
18
18
|
t.set(e.mask.slice(c).map((e) => +!!e), 0), a.push(t);
|
|
19
19
|
}
|
|
20
20
|
r.offset = n.length - c;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { o as e } from "../main-
|
|
1
|
+
import { o as e } from "../main-BqRjvJ8B.js";
|
|
2
2
|
export { e as createTrainValidationSplit };
|