@genai-fi/nanogpt 0.20.2 → 0.20.3

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 CHANGED
@@ -1,2 +1,2 @@
1
- import { c as e, s as t } from "./main-D5CbfCiV.js";
1
+ import { c as e, s as t } from "./main-BqRjvJ8B.js";
2
2
  export { t as default, e as isConversation };
@@ -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);
@@ -1,2 +1,2 @@
1
- import { i as e } from "./main-D5CbfCiV.js";
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-D5CbfCiV.js";
1
+ import { a as e } from "./main-BqRjvJ8B.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { d as e, u as t } from "../main-D5CbfCiV.js";
1
+ import { d as e, u as t } from "../main-BqRjvJ8B.js";
2
2
  export { t as VERSION, e as loadModel };
@@ -1,2 +1,2 @@
1
- import { f as e } from "../main-D5CbfCiV.js";
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-D5CbfCiV.js";
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-D5CbfCiV.js";
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-D5CbfCiV.js";
1
+ import { g as e } from "../main-BqRjvJ8B.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { l as e } from "../main-D5CbfCiV.js";
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-D5CbfCiV.js";
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";
@@ -1,2 +1,2 @@
1
- import { y as e } from "../main-D5CbfCiV.js";
1
+ import { y as e } from "../main-BqRjvJ8B.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { v as e } from "../main-D5CbfCiV.js";
1
+ import { v as e } from "../main-BqRjvJ8B.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { _ as e } from "../main-D5CbfCiV.js";
1
+ import { _ as e } from "../main-BqRjvJ8B.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { b as e } from "../main-D5CbfCiV.js";
1
+ import { b as e } from "../main-BqRjvJ8B.js";
2
2
  export { e as default };
@@ -1,2 +1,2 @@
1
- import { o as e } from "../main-D5CbfCiV.js";
1
+ import { o as e } from "../main-BqRjvJ8B.js";
2
2
  export { e as createTrainValidationSplit };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genai-fi/nanogpt",
3
- "version": "0.20.2",
3
+ "version": "0.20.3",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",