@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.
- package/dist/TeachableLLM.js +6 -4
- package/dist/data/docx.d.ts +1 -0
- package/dist/data/docx.js +15 -0
- package/dist/data/parquet.js +7 -5
- package/dist/data/pdf.d.ts +1 -0
- package/dist/data/pdf.js +14 -0
- package/dist/data/textLoader.js +24 -14
- package/dist/index-D5v913EJ.js +4 -0
- package/dist/{index-B8nyc6IR.js → index-DcaSvB38.js} +462 -506
- package/dist/index-Tf7vU29b.js +1023 -0
- package/dist/index-xuotMAFm.js +118 -0
- package/dist/{jszip.min-pMIn3RZH.js → jszip.min-CjP2V1VV.js} +42 -52
- package/dist/layers/TiedEmbedding.js +1 -1
- package/dist/parquet-BRl5lE_I.js +44956 -0
- package/dist/pdf-kJD-f258.js +19481 -0
- package/dist/training/AdamExt.js +1 -1
- package/dist/utilities/load.js +5 -5
- package/dist/utilities/save.js +1 -1
- package/package.json +4 -2
- package/dist/parquet-DpcqBLb0.js +0 -39727
package/dist/training/AdamExt.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as r, m as c, s as h, a as g, e as o } from "../index-
|
|
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;
|
package/dist/utilities/load.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import {
|
|
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
|
|
6
|
-
async function
|
|
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
|
|
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
|
|
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 {
|
package/dist/utilities/save.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genai-fi/nanogpt",
|
|
3
|
-
"version": "0.2.
|
|
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
|
}
|