@genai-fi/nanogpt 0.2.3 → 0.2.5

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.
@@ -1,4 +1,4 @@
1
- import { A as r, m as c, s as h, a as g, e as o } from "../index-B8nyc6IR.js";
1
+ import { A as r, m as c, s as h, a as g, e as o } from "../index-DcaSvB38.js";
2
2
  class u extends r {
3
3
  constructor(t, e, s, a, i) {
4
4
  super(t, e, s, a), this.config = i, this.startLearningRate = t;
@@ -1,16 +1,16 @@
1
- import { z as u } from "../jszip.min-pMIn3RZH.js";
1
+ import { j as u } from "../jszip.min-CjP2V1VV.js";
2
2
  import { importWeights as F } from "./weights.js";
3
3
  import k from "../tokeniser/CharTokeniser.js";
4
4
  import j from "../NanoGPTModel.js";
5
- import { dummyPassAsync as z } from "./dummy.js";
6
- async function A(o) {
5
+ import { dummyPassAsync as A } from "./dummy.js";
6
+ async function E(o) {
7
7
  const e = await fetch(o);
8
8
  if (!e.ok)
9
9
  throw new Error(`Failed to fetch ${o}: ${e.statusText}`);
10
10
  return e.arrayBuffer();
11
11
  }
12
12
  async function T(o, e) {
13
- const m = typeof e == "string" ? await A(e) : e, n = await u.loadAsync(m), s = /* @__PURE__ */ new Map(), c = await n.file("manifest.json")?.async("string");
13
+ const m = typeof e == "string" ? await E(e) : e, n = await u.loadAsync(m), s = /* @__PURE__ */ new Map(), c = await n.file("manifest.json")?.async("string");
14
14
  if (!c)
15
15
  throw new Error("Manifest file not found in the zip archive");
16
16
  const f = JSON.parse(c);
@@ -29,7 +29,7 @@ async function T(o, e) {
29
29
  }
30
30
  o.disposeVariables();
31
31
  const a = new j(o, f.config);
32
- await z(a), a.loadWeights(p);
32
+ await A(a), a.loadWeights(p);
33
33
  const w = await n.file("log.json")?.async("string");
34
34
  if (w)
35
35
  try {
@@ -1,4 +1,4 @@
1
- import { z as g } from "../jszip.min-pMIn3RZH.js";
1
+ import { j as g } from "../jszip.min-CjP2V1VV.js";
2
2
  import { exportWeights as l } from "./weights.js";
3
3
  const b = "1.0.0";
4
4
  async function p(t, s, i) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genai-fi/nanogpt",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "type": "module",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",
@@ -48,6 +48,7 @@
48
48
  "typescript-eslint": "^8.38.0",
49
49
  "vite": "^7.0.6",
50
50
  "vite-plugin-dts": "^4.5.4",
51
+ "vite-plugin-node-polyfills": "^0.24.0",
51
52
  "vitest": "^3.2.4",
52
53
  "yargs": "^18.0.0"
53
54
  },
@@ -55,6 +56,7 @@
55
56
  "@dsnp/parquetjs": "^1.8.7",
56
57
  "eventemitter3": "^5.0.1",
57
58
  "jszip": "^3.10.1",
58
- "papaparse": "^5.5.3"
59
+ "papaparse": "^5.5.3",
60
+ "pdfjs-dist": "^5.4.149"
59
61
  }
60
62
  }