@matchbox-ai/train 0.1.0 → 0.2.1
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/CHANGELOG.md +36 -0
- package/README.md +1 -1
- package/THIRD-PARTY-NOTICES.md +1 -1
- package/dist/define-pipeline-D6I-jAE_.js +20 -0
- package/dist/define-pipeline-D6I-jAE_.js.map +1 -0
- package/dist/encoders/index.d.ts +0 -1
- package/dist/encoders/index.d.ts.map +1 -1
- package/dist/evaluate-sequence-ZCwyomzQ.js.map +1 -1
- package/dist/evaluation/evaluate-sequence.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -11
- package/dist/index.js.map +1 -1
- package/dist/load-project.d.ts +0 -4
- package/dist/load-project.d.ts.map +1 -1
- package/dist/models/presets.d.ts +6 -6
- package/dist/models/presets.d.ts.map +1 -1
- package/dist/models/record/fit.d.ts +6 -99
- package/dist/models/record/fit.d.ts.map +1 -1
- package/dist/models/record/run.d.ts +1 -57
- package/dist/models/record/run.d.ts.map +1 -1
- package/dist/models/record/verify-export.d.ts +1 -2
- package/dist/models/record/verify-export.d.ts.map +1 -1
- package/dist/models/sequence/fit-sequence.d.ts +9 -116
- package/dist/models/sequence/fit-sequence.d.ts.map +1 -1
- package/dist/models/sequence/prepare-supervision.d.ts +10 -0
- package/dist/models/sequence/prepare-supervision.d.ts.map +1 -0
- package/dist/models/sequence/run-sequence.d.ts +3 -71
- package/dist/models/sequence/run-sequence.d.ts.map +1 -1
- package/dist/models/sequence/types.d.ts +4 -0
- package/dist/models/sequence/types.d.ts.map +1 -1
- package/dist/native/fit.d.ts +15 -0
- package/dist/native/fit.d.ts.map +1 -0
- package/dist/native/index.d.ts +3 -0
- package/dist/native/index.d.ts.map +1 -0
- package/dist/native/record.d.ts +12 -0
- package/dist/native/record.d.ts.map +1 -0
- package/dist/package-model-CPj0qnQs.js.map +1 -1
- package/dist/packaging/package-model.d.ts.map +1 -1
- package/dist/pipeline/define-pipeline.d.ts +2 -5
- package/dist/pipeline/define-pipeline.d.ts.map +1 -1
- package/dist/project/artifact.d.ts +21 -67
- package/dist/project/artifact.d.ts.map +1 -1
- package/dist/project/config.d.ts +1 -4
- package/dist/project/config.d.ts.map +1 -1
- package/dist/project/discover.d.ts +2 -0
- package/dist/project/discover.d.ts.map +1 -1
- package/dist/project/entry.d.ts +5 -0
- package/dist/project/entry.d.ts.map +1 -0
- package/dist/project/index.d.ts +1 -1
- package/dist/project/index.d.ts.map +1 -1
- package/dist/project/index.js +2 -2
- package/dist/{project-BP331m20.js → project-BR13wXHr.js} +51 -18
- package/dist/project-BR13wXHr.js.map +1 -0
- package/dist/{record-BTZ5LWHF.js → record-MCYVi9O6.js} +60 -114
- package/dist/record-MCYVi9O6.js.map +1 -0
- package/dist/{run-Cwa7vD_T.js → run-PB_jiKnw.js} +4 -6
- package/dist/run-PB_jiKnw.js.map +1 -0
- package/dist/run.d.ts +4 -128
- package/dist/run.d.ts.map +1 -1
- package/dist/sequence-DGoGU7kG.js +219 -0
- package/dist/sequence-DGoGU7kG.js.map +1 -0
- package/dist/train.d.ts +4 -128
- package/dist/train.d.ts.map +1 -1
- package/dist/types.d.ts +0 -2
- package/dist/types.d.ts.map +1 -1
- package/docs/README.md +12 -7
- package/docs/agent-skill.md +8 -4
- package/docs/cli.md +85 -28
- package/docs/contributing.md +43 -0
- package/docs/dataset-format.md +4 -2
- package/docs/evaluation.md +66 -5
- package/docs/example-evaluation.md +47 -0
- package/docs/example-results.json +280 -0
- package/docs/examples/money.md +19 -0
- package/docs/examples/time.md +43 -0
- package/docs/getting-started.md +48 -54
- package/docs/native-packages.md +31 -0
- package/docs/neural-training.md +1 -1
- package/docs/parser-api.md +16 -16
- package/docs/pipelines.md +5 -6
- package/docs/primitives/README.md +12 -11
- package/docs/project-structure.md +17 -3
- package/docs/react.md +49 -7
- package/docs/reference/README.md +25 -0
- package/docs/reference/configuration.md +43 -0
- package/docs/reference/evaluation.md +21 -0
- package/docs/reference/pipeline.md +43 -0
- package/docs/reference/runtime.md +56 -0
- package/docs/reference/supervision.md +87 -0
- package/docs/reference/training.md +26 -0
- package/docs/reference/vite.md +20 -0
- package/docs/releases.md +6 -16
- package/docs/repository-design.md +2 -2
- package/docs/runtime-backends.md +8 -11
- package/docs/training.md +73 -0
- package/docs/website-deployment.md +11 -0
- package/native.cjs +1 -0
- package/package.json +10 -5
- package/prebuilds/darwin-arm64/node.napi.node +0 -0
- package/prebuilds/darwin-x64/node.napi.node +0 -0
- package/prebuilds/linux-arm64/node.napi.glibc.node +0 -0
- package/prebuilds/linux-arm64/node.napi.musl.node +0 -0
- package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
- package/prebuilds/linux-x64/node.napi.musl.node +0 -0
- package/prebuilds/win32-arm64/node.napi.node +0 -0
- package/prebuilds/win32-x64/node.napi.node +0 -0
- package/dist/define-pipeline-Colvwt7u.js +0 -32
- package/dist/define-pipeline-Colvwt7u.js.map +0 -1
- package/dist/encoders/word-tokens.d.ts +0 -5
- package/dist/encoders/word-tokens.d.ts.map +0 -1
- package/dist/models/sequence/create-network.d.ts +0 -3
- package/dist/models/sequence/create-network.d.ts.map +0 -1
- package/dist/project-BP331m20.js.map +0 -1
- package/dist/record-BTZ5LWHF.js.map +0 -1
- package/dist/run-Cwa7vD_T.js.map +0 -1
- package/dist/sequence-C_WfVGO1.js +0 -251
- package/dist/sequence-C_WfVGO1.js.map +0 -1
- package/docs/filter-research.md +0 -63
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,41 @@
|
|
|
1
1
|
# @matchbox-ai/train
|
|
2
2
|
|
|
3
|
+
## 0.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3351f13: Allow sequence training datasets larger than one million token windows. Keep the inference batch limit and report an explicit error when it is exceeded. Training still uses the existing Burn minibatches and validates window shape, vocabulary IDs and labels.
|
|
8
|
+
- Updated dependencies [3351f13]
|
|
9
|
+
- @matchbox-ai/core@0.2.1
|
|
10
|
+
|
|
11
|
+
## 0.2.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- 471f07c: Prototype Burn native training and WebAssembly inference for sequence parsers and record classifiers while preserving the TypeScript API. Earlier artifacts require retraining. TensorFlow dependencies are removed. Native distribution bundles prebuilds verified by the release matrix.
|
|
16
|
+
|
|
17
|
+
Expand the examples with explicit training-language variations and retain measured accuracy limitations. Keep workbench model revisions isolated during reloads.
|
|
18
|
+
|
|
19
|
+
Remove the single-choice `wordTokens()` pipeline setting and task config `formatVersion`. Training report format 2 replaces duplicate `float` and `quantized` results with `evaluation`. Report parameter counts from Burn and derive the wasm-bindgen installer version from its Cargo dependency pin.
|
|
20
|
+
|
|
21
|
+
Remove untrained and shuffled-label control runs from training and the example UI. Retain task evaluations and serialization checks. Expand authored money, time and filter training coverage without adding runtime parsing rules.
|
|
22
|
+
|
|
23
|
+
- fb1a77f: Bundle native training binaries for macOS, Windows and Linux glibc/musl on x64 and ARM64. Select the installed binary automatically without postinstall downloads or compilation. Verify packed installations and require the complete platform matrix before releasing.
|
|
24
|
+
|
|
25
|
+
### Patch Changes
|
|
26
|
+
|
|
27
|
+
- 0c54a55: Add explicit rejection supervision and optional unknown-token masking to sequence recipes. Improve training order, synchronize the money scaffold, and document independent example evaluations and uncalibrated recognition scores.
|
|
28
|
+
- a08991e: Support named task entry points as X.ts or X/X.ts. Token classifiers discover recipe and decode modules by convention while preserving explicit path overrides. Update CLI scaffolding, examples, and documentation to keep task contracts and their helpers out of generic lib folders.
|
|
29
|
+
- 54bb6a1: Refactor conditional logic and control-flow bodies to meet stricter readability lint rules across the runtime, training code and CLI. Preserve existing parsing and training behavior.
|
|
30
|
+
- 535cf49: Remove automatic baseline discovery, configuration and scoring, and remove rule parsers from the money scaffold. Model correctness, uncertainty and export checks remain in place.
|
|
31
|
+
- 4846b0b: Rewrite the bundled getting-started guide and add public API, configuration, token supervision, and complete CLI references.
|
|
32
|
+
- Updated dependencies [471f07c]
|
|
33
|
+
- Updated dependencies [0c54a55]
|
|
34
|
+
- Updated dependencies [a08991e]
|
|
35
|
+
- Updated dependencies [54bb6a1]
|
|
36
|
+
- Updated dependencies [4846b0b]
|
|
37
|
+
- @matchbox-ai/core@0.2.0
|
|
38
|
+
|
|
3
39
|
## 0.1.0
|
|
4
40
|
|
|
5
41
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
# @matchbox-ai/train
|
|
2
2
|
|
|
3
|
-
Read [the bundled documentation](docs/README.md) for the installed version. Train exports explicit pipeline primitives and programmatic training. Install matchbox-ai for the matchbox-ai command and browser workbench. Native
|
|
3
|
+
Read [the bundled documentation](docs/README.md) for the installed version. Train exports explicit pipeline primitives and programmatic training. Install matchbox-ai for the matchbox-ai command and browser workbench. Native Burn loads for training; these modules must not enter browser bundles.
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -14,4 +14,4 @@ The Inter variable font is supplied by `@fontsource-variable/inter`; its license
|
|
|
14
14
|
|
|
15
15
|
## Country reference data
|
|
16
16
|
|
|
17
|
-
The country names and English demonyms in `examples/filters/matchbox/filters/
|
|
17
|
+
The country names and English demonyms in `examples/filters/matchbox/filters/countries/countries.json` are derived from [mledoze/countries](https://github.com/mledoze/countries), retrieved 2026-09-13. The derived database is provided under ODbL 1.0; the license is included alongside the data. Shared demonyms prefer a unique independent country; unresolved ambiguous aliases and empty aliases are omitted.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/pipeline/define-pipeline.ts
|
|
3
|
+
const pipelineSchema = z.strictObject({
|
|
4
|
+
prediction: z.discriminatedUnion("kind", [z.strictObject({ kind: z.literal("field-classifier") }), z.strictObject({
|
|
5
|
+
kind: z.literal("token-classifier"),
|
|
6
|
+
recipe: z.string().min(1).default("./recipe"),
|
|
7
|
+
decode: z.string().min(1).default("./decode")
|
|
8
|
+
})]),
|
|
9
|
+
acceptance: z.strictObject({
|
|
10
|
+
minAccuracy: z.number().min(0).max(1).optional(),
|
|
11
|
+
maxBytes: z.number().positive().optional()
|
|
12
|
+
}).optional()
|
|
13
|
+
});
|
|
14
|
+
function definePipeline(pipeline) {
|
|
15
|
+
return pipelineSchema.parse(pipeline);
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { pipelineSchema as n, definePipeline as t };
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=define-pipeline-D6I-jAE_.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"define-pipeline-D6I-jAE_.js","names":[],"sources":["../src/pipeline/define-pipeline.ts"],"sourcesContent":["import { z } from \"zod\";\nexport const pipelineSchema = z.strictObject({\n prediction: z.discriminatedUnion(\"kind\", [\n z.strictObject({ kind: z.literal(\"field-classifier\") }),\n z.strictObject({\n kind: z.literal(\"token-classifier\"),\n recipe: z.string().min(1).default(\"./recipe\"),\n decode: z.string().min(1).default(\"./decode\"),\n }),\n ]),\n acceptance: z\n .strictObject({\n minAccuracy: z.number().min(0).max(1).optional(),\n maxBytes: z.number().positive().optional(),\n })\n .optional(),\n});\nexport type Pipeline = z.infer<typeof pipelineSchema>;\nexport function definePipeline(pipeline: Pipeline): Pipeline {\n return pipelineSchema.parse(pipeline);\n}\n"],"mappings":";;AACA,MAAa,iBAAiB,EAAE,aAAa;CAC3C,YAAY,EAAE,mBAAmB,QAAQ,CACvC,EAAE,aAAa,EAAE,MAAM,EAAE,QAAQ,kBAAkB,EAAE,CAAC,GACtD,EAAE,aAAa;EACb,MAAM,EAAE,QAAQ,kBAAkB;EAClC,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,UAAU;EAC5C,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,UAAU;CAC9C,CAAC,CACH,CAAC;CACD,YAAY,EACT,aAAa;EACZ,aAAa,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;EAC/C,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3C,CAAC,CAAC,CACD,SAAS;AACd,CAAC;AAED,SAAgB,eAAe,UAA8B;CAC3D,OAAO,eAAe,MAAM,QAAQ;AACtC"}
|
package/dist/encoders/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/encoders/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/encoders/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate-sequence-ZCwyomzQ.js","names":[],"sources":["../src/evaluation/same-output.ts","../src/evaluation/evaluate-sequence.ts"],"sourcesContent":["export function sameOutput(left: unknown, right: unknown): boolean {\n const canonical = (value: unknown) =>\n JSON.stringify(value, (_key, item: unknown) =>\n item !== null && typeof item === \"object\" && !Array.isArray(item)\n ? Object.fromEntries(Object.entries(item).sort(([a], [b]) => a.localeCompare(b)))\n : item,\n );\n return canonical(left) === canonical(right);\n}\n","import { sameOutput } from \"./same-output.js\";\nimport type { DatasetExample } from \"@matchbox-ai/core\";\nimport type { MatchboxParser } from \"@matchbox-ai/core/runtime\";\nexport async function evaluateSequence(\n parser: MatchboxParser<unknown>,\n examples: readonly DatasetExample<unknown>[],\n validate: (value: unknown) => boolean,\n) {\n let exact = 0,\n accepted = 0,\n correctAccepted = 0,\n correctAbstentions = 0;\n let invalidOutputs = 0;\n const failures: { input: string; expected: unknown; actual: unknown }[] = [];\n for (const row of examples) {\n const result = await parser.parse(row.input);\n const actual = result.status === \"ok\" ? result.value : null;\n if (result.status === \"ok\" && !validate(result.value)) invalidOutputs++;\n const correct = sameOutput(actual, row.output);\n if (correct) exact++;\n if (result.status === \"ok\") {\n accepted++;\n if (correct) correctAccepted++;\n } else if (row.output === null) correctAbstentions++;\n if (!correct) failures.push({ input: row.input, expected: row.output, actual });\n }\n return {\n examples: examples.length,\n invalidOutputRate: invalidOutputs / examples.length,\n exactAccuracy: exact / examples.length,\n accepted,\n acceptedAccuracy: accepted ? correctAccepted / accepted : null,\n abstentionRate: 1 - accepted / examples.length,\n correctAbstentions,\n failures,\n };\n}\n"],"mappings":";AAAA,SAAgB,WAAW,MAAe,OAAyB;CACjE,MAAM,aAAa,UACjB,KAAK,UAAU,QAAQ,MAAM,SAC3B,SAAS,QAAQ,OAAO,SAAS,YAAY,CAAC,MAAM,QAAQ,IAAI,IAC5D,OAAO,YAAY,OAAO,QAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,IAC9E,IACN;CACF,OAAO,UAAU,IAAI,MAAM,UAAU,KAAK;AAC5C;;;ACLA,eAAsB,iBACpB,QACA,UACA,UACA;CACA,IAAI,QAAQ,GACV,WAAW,GACX,kBAAkB,GAClB,qBAAqB;CACvB,IAAI,iBAAiB;CACrB,MAAM,WAAoE,CAAC;CAC3E,KAAK,MAAM,OAAO,UAAU;EAC1B,MAAM,SAAS,MAAM,OAAO,MAAM,IAAI,KAAK;EAC3C,MAAM,SAAS,OAAO,WAAW,OAAO,OAAO,QAAQ;EACvD,IAAI,OAAO,WAAW,QAAQ,CAAC,SAAS,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"evaluate-sequence-ZCwyomzQ.js","names":[],"sources":["../src/evaluation/same-output.ts","../src/evaluation/evaluate-sequence.ts"],"sourcesContent":["export function sameOutput(left: unknown, right: unknown): boolean {\n const canonical = (value: unknown) =>\n JSON.stringify(value, (_key, item: unknown) =>\n item !== null && typeof item === \"object\" && !Array.isArray(item)\n ? Object.fromEntries(Object.entries(item).sort(([a], [b]) => a.localeCompare(b)))\n : item,\n );\n return canonical(left) === canonical(right);\n}\n","import { sameOutput } from \"./same-output.js\";\nimport type { DatasetExample } from \"@matchbox-ai/core\";\nimport type { MatchboxParser } from \"@matchbox-ai/core/runtime\";\nexport async function evaluateSequence(\n parser: MatchboxParser<unknown>,\n examples: readonly DatasetExample<unknown>[],\n validate: (value: unknown) => boolean,\n) {\n let exact = 0,\n accepted = 0,\n correctAccepted = 0,\n correctAbstentions = 0;\n let invalidOutputs = 0;\n const failures: { input: string; expected: unknown; actual: unknown }[] = [];\n for (const row of examples) {\n const result = await parser.parse(row.input);\n const actual = result.status === \"ok\" ? result.value : null;\n if (result.status === \"ok\" && !validate(result.value)) {\n invalidOutputs++;\n }\n const correct = sameOutput(actual, row.output);\n if (correct) {\n exact++;\n }\n if (result.status === \"ok\") {\n accepted++;\n if (correct) {\n correctAccepted++;\n }\n } else if (row.output === null) {\n correctAbstentions++;\n }\n if (!correct) {\n failures.push({ input: row.input, expected: row.output, actual });\n }\n }\n return {\n examples: examples.length,\n invalidOutputRate: invalidOutputs / examples.length,\n exactAccuracy: exact / examples.length,\n accepted,\n acceptedAccuracy: accepted ? correctAccepted / accepted : null,\n abstentionRate: 1 - accepted / examples.length,\n correctAbstentions,\n failures,\n };\n}\n"],"mappings":";AAAA,SAAgB,WAAW,MAAe,OAAyB;CACjE,MAAM,aAAa,UACjB,KAAK,UAAU,QAAQ,MAAM,SAC3B,SAAS,QAAQ,OAAO,SAAS,YAAY,CAAC,MAAM,QAAQ,IAAI,IAC5D,OAAO,YAAY,OAAO,QAAQ,IAAI,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC,CAAC,IAC9E,IACN;CACF,OAAO,UAAU,IAAI,MAAM,UAAU,KAAK;AAC5C;;;ACLA,eAAsB,iBACpB,QACA,UACA,UACA;CACA,IAAI,QAAQ,GACV,WAAW,GACX,kBAAkB,GAClB,qBAAqB;CACvB,IAAI,iBAAiB;CACrB,MAAM,WAAoE,CAAC;CAC3E,KAAK,MAAM,OAAO,UAAU;EAC1B,MAAM,SAAS,MAAM,OAAO,MAAM,IAAI,KAAK;EAC3C,MAAM,SAAS,OAAO,WAAW,OAAO,OAAO,QAAQ;EACvD,IAAI,OAAO,WAAW,QAAQ,CAAC,SAAS,OAAO,KAAK,GAClD;EAEF,MAAM,UAAU,WAAW,QAAQ,IAAI,MAAM;EAC7C,IAAI,SACF;EAEF,IAAI,OAAO,WAAW,MAAM;GAC1B;GACA,IAAI,SACF;EAEJ,OAAO,IAAI,IAAI,WAAW,MACxB;EAEF,IAAI,CAAC,SACH,SAAS,KAAK;GAAE,OAAO,IAAI;GAAO,UAAU,IAAI;GAAQ;EAAO,CAAC;CAEpE;CACA,OAAO;EACL,UAAU,SAAS;EACnB,mBAAmB,iBAAiB,SAAS;EAC7C,eAAe,QAAQ,SAAS;EAChC;EACA,kBAAkB,WAAW,kBAAkB,WAAW;EAC1D,gBAAgB,IAAI,WAAW,SAAS;EACxC;EACA;CACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluate-sequence.d.ts","sourceRoot":"","sources":["../../src/evaluation/evaluate-sequence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,cAAc,CAAC,OAAO,CAAC,EAC/B,QAAQ,EAAE,SAAS,cAAc,CAAC,OAAO,CAAC,EAAE,EAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO;;;;;;;;;eAOZ,MAAM;kBAAY,OAAO;gBAAU,OAAO;;
|
|
1
|
+
{"version":3,"file":"evaluate-sequence.d.ts","sourceRoot":"","sources":["../../src/evaluation/evaluate-sequence.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,wBAAsB,gBAAgB,CACpC,MAAM,EAAE,cAAc,CAAC,OAAO,CAAC,EAC/B,QAAQ,EAAE,SAAS,cAAc,CAAC,OAAO,CAAC,EAAE,EAC5C,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO;;;;;;;;;eAOZ,MAAM;kBAAY,OAAO;gBAAU,OAAO;;GAiCpE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { definePipeline } from "./pipeline/index.js";
|
|
2
2
|
export type { Pipeline } from "./pipeline/index.js";
|
|
3
|
-
export {
|
|
3
|
+
export { tokenize } from "./encoders/index.js";
|
|
4
4
|
export { fieldClassifier, tokenClassifier } from "./models/index.js";
|
|
5
5
|
export type { OutputDecoder } from "./codecs/index.js";
|
|
6
6
|
export { train } from "./train.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACrE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,gBAAgB,IAAI,QAAQ,EAAE,MAAM,mCAAmC,CAAC;AACjF,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,YAAY,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
import { t as definePipeline } from "./define-pipeline-
|
|
1
|
+
import { t as definePipeline } from "./define-pipeline-D6I-jAE_.js";
|
|
2
2
|
import { t as evaluateSequence } from "./evaluate-sequence-ZCwyomzQ.js";
|
|
3
3
|
import { tokenize } from "@matchbox-ai/core/internal";
|
|
4
|
-
//#region src/encoders/word-tokens.ts
|
|
5
|
-
/** Literal word tokens. Unseen vocabulary causes abstention. */
|
|
6
|
-
function wordTokens() {
|
|
7
|
-
return { kind: "words" };
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
4
|
//#region src/models/presets.ts
|
|
11
5
|
/** Independent field classification over training values. Numeric outputs are finite classes. */
|
|
12
6
|
function fieldClassifier() {
|
|
13
7
|
return { kind: "field-classifier" };
|
|
14
8
|
}
|
|
15
|
-
/** Application-owned span supervision and deterministic decoding. Paths are relative to
|
|
16
|
-
function tokenClassifier(options) {
|
|
9
|
+
/** Application-owned span supervision and deterministic decoding. Paths are relative to the task directory. */
|
|
10
|
+
function tokenClassifier(options = {}) {
|
|
17
11
|
return {
|
|
18
12
|
kind: "token-classifier",
|
|
13
|
+
recipe: "./recipe",
|
|
14
|
+
decode: "./decode",
|
|
19
15
|
...options
|
|
20
16
|
};
|
|
21
17
|
}
|
|
@@ -24,10 +20,10 @@ function tokenClassifier(options) {
|
|
|
24
20
|
/** Runs the same validation, selection, and packaging pipeline as the CLI. */
|
|
25
21
|
async function train(target, options = {}) {
|
|
26
22
|
const { discover } = await import("./project/index.js");
|
|
27
|
-
const { run } = await import("./run-
|
|
23
|
+
const { run } = await import("./run-PB_jiKnw.js");
|
|
28
24
|
return run("train", await discover(target), options.onProgress);
|
|
29
25
|
}
|
|
30
26
|
//#endregion
|
|
31
|
-
export { definePipeline, evaluateSequence as evaluate, fieldClassifier, tokenClassifier, tokenize, train
|
|
27
|
+
export { definePipeline, evaluateSequence as evaluate, fieldClassifier, tokenClassifier, tokenize, train };
|
|
32
28
|
|
|
33
29
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../src/models/presets.ts","../src/train.ts"],"sourcesContent":["/** Independent field classification over training values. Numeric outputs are finite classes. */\nexport function fieldClassifier() {\n return { kind: \"field-classifier\" } as const;\n}\n/** Application-owned span supervision and deterministic decoding. Paths are relative to the task directory. */\nexport function tokenClassifier(options: { recipe?: string; decode?: string } = {}) {\n return { kind: \"token-classifier\", recipe: \"./recipe\", decode: \"./decode\", ...options } as const;\n}\n","/** Runs the same validation, selection, and packaging pipeline as the CLI. */\nexport async function train(\n target: string,\n options: { onProgress?: (epoch: number, loss: number) => void } = {},\n) {\n const { discover } = await import(\"./project/index.js\");\n const { run } = await import(\"./run.js\");\n return run(\"train\", await discover(target), options.onProgress);\n}\n"],"mappings":";;;;;AACA,SAAgB,kBAAkB;CAChC,OAAO,EAAE,MAAM,mBAAmB;AACpC;;AAEA,SAAgB,gBAAgB,UAAgD,CAAC,GAAG;CAClF,OAAO;EAAE,MAAM;EAAoB,QAAQ;EAAY,QAAQ;EAAY,GAAG;CAAQ;AACxF;;;;ACNA,eAAsB,MACpB,QACA,UAAkE,CAAC,GACnE;CACA,MAAM,EAAE,aAAa,MAAM,OAAO;CAClC,MAAM,EAAE,QAAQ,MAAM,OAAO;CAC7B,OAAO,IAAI,SAAS,MAAM,SAAS,MAAM,GAAG,QAAQ,UAAU;AAChE"}
|
package/dist/load-project.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import type { ParserDefinition } from "@matchbox-ai/core";
|
|
3
|
-
import type { MatchboxParser } from "@matchbox-ai/core/runtime";
|
|
4
3
|
export declare function loadProject(path: string): Promise<{
|
|
5
4
|
root: string;
|
|
6
5
|
config: {
|
|
7
|
-
formatVersion: 1;
|
|
8
6
|
task: string;
|
|
9
7
|
train: string;
|
|
10
8
|
validation: string;
|
|
@@ -16,11 +14,9 @@ export declare function loadProject(path: string): Promise<{
|
|
|
16
14
|
recipe: string;
|
|
17
15
|
decoder: string;
|
|
18
16
|
} | undefined;
|
|
19
|
-
baseline?: string | undefined;
|
|
20
17
|
challenges?: string | undefined;
|
|
21
18
|
};
|
|
22
19
|
task: ParserDefinition<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
|
|
23
|
-
baseline: MatchboxParser<unknown> | null;
|
|
24
20
|
taskPath: string;
|
|
25
21
|
output: string;
|
|
26
22
|
sources: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"load-project.d.ts","sourceRoot":"","sources":["../src/load-project.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,
|
|
1
|
+
{"version":3,"file":"load-project.d.ts","sourceRoot":"","sources":["../src/load-project.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;GAkD7C"}
|
package/dist/models/presets.d.ts
CHANGED
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
export declare function fieldClassifier(): {
|
|
3
3
|
readonly kind: "field-classifier";
|
|
4
4
|
};
|
|
5
|
-
/** Application-owned span supervision and deterministic decoding. Paths are relative to
|
|
6
|
-
export declare function tokenClassifier(options
|
|
7
|
-
recipe
|
|
8
|
-
decode
|
|
5
|
+
/** Application-owned span supervision and deterministic decoding. Paths are relative to the task directory. */
|
|
6
|
+
export declare function tokenClassifier(options?: {
|
|
7
|
+
recipe?: string;
|
|
8
|
+
decode?: string;
|
|
9
9
|
}): {
|
|
10
|
-
readonly recipe: string;
|
|
11
|
-
readonly decode: string;
|
|
12
10
|
readonly kind: "token-classifier";
|
|
11
|
+
recipe: string;
|
|
12
|
+
decode: string;
|
|
13
13
|
};
|
|
14
14
|
//# sourceMappingURL=presets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../src/models/presets.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,wBAAgB,eAAe;aACpB,IAAI,EAAE,kBAAkB;EAClC;AACD
|
|
1
|
+
{"version":3,"file":"presets.d.ts","sourceRoot":"","sources":["../../src/models/presets.ts"],"names":[],"mappings":"AAAA,iGAAiG;AACjG,wBAAgB,eAAe;aACpB,IAAI,EAAE,kBAAkB;EAClC;AACD,+GAA+G;AAC/G,wBAAgB,eAAe,CAAC,OAAO,GAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAO;mBACjE,kBAAkB;;;EAClC"}
|
|
@@ -3,9 +3,9 @@ export declare function fitRecord(examples: readonly DatasetExample<unknown>[],
|
|
|
3
3
|
taskModule: string;
|
|
4
4
|
taskMetadata: ParserMetadata;
|
|
5
5
|
}, probes: readonly string[], progress?: (epoch: number, loss: number) => void): Promise<{
|
|
6
|
-
|
|
7
|
-
formatVersion:
|
|
8
|
-
|
|
6
|
+
model: {
|
|
7
|
+
formatVersion: 3;
|
|
8
|
+
engine: "burn-0.21";
|
|
9
9
|
kind: "record-parser";
|
|
10
10
|
architecture: "bag-of-words-mlp";
|
|
11
11
|
taskModule: string;
|
|
@@ -17,103 +17,10 @@ export declare function fitRecord(examples: readonly DatasetExample<unknown>[],
|
|
|
17
17
|
values: (string | number | boolean | null)[];
|
|
18
18
|
}[];
|
|
19
19
|
threshold: number;
|
|
20
|
-
precision: "float32"
|
|
21
|
-
weights:
|
|
22
|
-
name: string;
|
|
23
|
-
shape: number[];
|
|
24
|
-
values: number[];
|
|
25
|
-
scale: number;
|
|
26
|
-
}, {
|
|
27
|
-
name: string;
|
|
28
|
-
shape: number[];
|
|
29
|
-
values: number[];
|
|
30
|
-
scale: number;
|
|
31
|
-
}, {
|
|
32
|
-
name: string;
|
|
33
|
-
shape: number[];
|
|
34
|
-
values: number[];
|
|
35
|
-
scale: number;
|
|
36
|
-
}, {
|
|
37
|
-
name: string;
|
|
38
|
-
shape: number[];
|
|
39
|
-
values: number[];
|
|
40
|
-
scale: number;
|
|
41
|
-
}];
|
|
42
|
-
};
|
|
43
|
-
quantized: {
|
|
44
|
-
formatVersion: 2;
|
|
45
|
-
modelTopology: Record<string, unknown>;
|
|
46
|
-
kind: "record-parser";
|
|
47
|
-
architecture: "bag-of-words-mlp";
|
|
48
|
-
taskModule: string;
|
|
49
|
-
decoderModule: null;
|
|
50
|
-
taskMetadata: unknown;
|
|
51
|
-
vocabulary: string[];
|
|
52
|
-
fields: {
|
|
53
|
-
name: string;
|
|
54
|
-
values: (string | number | boolean | null)[];
|
|
55
|
-
}[];
|
|
56
|
-
threshold: number;
|
|
57
|
-
precision: "float32" | "int8";
|
|
58
|
-
weights: [{
|
|
59
|
-
name: string;
|
|
60
|
-
shape: number[];
|
|
61
|
-
values: number[];
|
|
62
|
-
scale: number;
|
|
63
|
-
}, {
|
|
64
|
-
name: string;
|
|
65
|
-
shape: number[];
|
|
66
|
-
values: number[];
|
|
67
|
-
scale: number;
|
|
68
|
-
}, {
|
|
69
|
-
name: string;
|
|
70
|
-
shape: number[];
|
|
71
|
-
values: number[];
|
|
72
|
-
scale: number;
|
|
73
|
-
}, {
|
|
74
|
-
name: string;
|
|
75
|
-
shape: number[];
|
|
76
|
-
values: number[];
|
|
77
|
-
scale: number;
|
|
78
|
-
}];
|
|
79
|
-
};
|
|
80
|
-
untrained: {
|
|
81
|
-
formatVersion: 2;
|
|
82
|
-
modelTopology: Record<string, unknown>;
|
|
83
|
-
kind: "record-parser";
|
|
84
|
-
architecture: "bag-of-words-mlp";
|
|
85
|
-
taskModule: string;
|
|
86
|
-
decoderModule: null;
|
|
87
|
-
taskMetadata: unknown;
|
|
88
|
-
vocabulary: string[];
|
|
89
|
-
fields: {
|
|
90
|
-
name: string;
|
|
91
|
-
values: (string | number | boolean | null)[];
|
|
92
|
-
}[];
|
|
93
|
-
threshold: number;
|
|
94
|
-
precision: "float32" | "int8";
|
|
95
|
-
weights: [{
|
|
96
|
-
name: string;
|
|
97
|
-
shape: number[];
|
|
98
|
-
values: number[];
|
|
99
|
-
scale: number;
|
|
100
|
-
}, {
|
|
101
|
-
name: string;
|
|
102
|
-
shape: number[];
|
|
103
|
-
values: number[];
|
|
104
|
-
scale: number;
|
|
105
|
-
}, {
|
|
106
|
-
name: string;
|
|
107
|
-
shape: number[];
|
|
108
|
-
values: number[];
|
|
109
|
-
scale: number;
|
|
110
|
-
}, {
|
|
111
|
-
name: string;
|
|
112
|
-
shape: number[];
|
|
113
|
-
values: number[];
|
|
114
|
-
scale: number;
|
|
115
|
-
}];
|
|
20
|
+
precision: "float32";
|
|
21
|
+
weights: string;
|
|
116
22
|
};
|
|
23
|
+
parameters: number;
|
|
117
24
|
history: number[];
|
|
118
25
|
parity: {
|
|
119
26
|
examples: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit.d.ts","sourceRoot":"","sources":["../../../src/models/record/fit.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxE,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,SAAS,cAAc,CAAC,OAAO,CAAC,EAAE,EAC5C,QAAQ,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,cAAc,CAAA;CAAE,EAC9D,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI
|
|
1
|
+
{"version":3,"file":"fit.d.ts","sourceRoot":"","sources":["../../../src/models/record/fit.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxE,wBAAsB,SAAS,CAC7B,QAAQ,EAAE,SAAS,cAAc,CAAC,OAAO,CAAC,EAAE,EAC5C,QAAQ,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,cAAc,CAAA;CAAE,EAC9D,MAAM,EAAE,SAAS,MAAM,EAAE,EACzB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;GAwEjD"}
|
|
@@ -37,7 +37,7 @@ export declare function runRecord(project: Awaited<ReturnType<typeof loadProject
|
|
|
37
37
|
actual: unknown;
|
|
38
38
|
}[];
|
|
39
39
|
};
|
|
40
|
-
|
|
40
|
+
evaluation: {
|
|
41
41
|
examples: number;
|
|
42
42
|
invalidOutputRate: number;
|
|
43
43
|
exactAccuracy: number;
|
|
@@ -51,62 +51,6 @@ export declare function runRecord(project: Awaited<ReturnType<typeof loadProject
|
|
|
51
51
|
actual: unknown;
|
|
52
52
|
}[];
|
|
53
53
|
};
|
|
54
|
-
float: {
|
|
55
|
-
examples: number;
|
|
56
|
-
invalidOutputRate: number;
|
|
57
|
-
exactAccuracy: number;
|
|
58
|
-
accepted: number;
|
|
59
|
-
acceptedAccuracy: number | null;
|
|
60
|
-
abstentionRate: number;
|
|
61
|
-
correctAbstentions: number;
|
|
62
|
-
failures: {
|
|
63
|
-
input: string;
|
|
64
|
-
expected: unknown;
|
|
65
|
-
actual: unknown;
|
|
66
|
-
}[];
|
|
67
|
-
};
|
|
68
|
-
untrained: {
|
|
69
|
-
examples: number;
|
|
70
|
-
invalidOutputRate: number;
|
|
71
|
-
exactAccuracy: number;
|
|
72
|
-
accepted: number;
|
|
73
|
-
acceptedAccuracy: number | null;
|
|
74
|
-
abstentionRate: number;
|
|
75
|
-
correctAbstentions: number;
|
|
76
|
-
failures: {
|
|
77
|
-
input: string;
|
|
78
|
-
expected: unknown;
|
|
79
|
-
actual: unknown;
|
|
80
|
-
}[];
|
|
81
|
-
};
|
|
82
|
-
untrainedUngated: {
|
|
83
|
-
examples: number;
|
|
84
|
-
invalidOutputRate: number;
|
|
85
|
-
exactAccuracy: number;
|
|
86
|
-
accepted: number;
|
|
87
|
-
acceptedAccuracy: number | null;
|
|
88
|
-
abstentionRate: number;
|
|
89
|
-
correctAbstentions: number;
|
|
90
|
-
failures: {
|
|
91
|
-
input: string;
|
|
92
|
-
expected: unknown;
|
|
93
|
-
actual: unknown;
|
|
94
|
-
}[];
|
|
95
|
-
};
|
|
96
|
-
baseline: {
|
|
97
|
-
examples: number;
|
|
98
|
-
invalidOutputRate: number;
|
|
99
|
-
exactAccuracy: number;
|
|
100
|
-
accepted: number;
|
|
101
|
-
acceptedAccuracy: number | null;
|
|
102
|
-
abstentionRate: number;
|
|
103
|
-
correctAbstentions: number;
|
|
104
|
-
failures: {
|
|
105
|
-
input: string;
|
|
106
|
-
expected: unknown;
|
|
107
|
-
actual: unknown;
|
|
108
|
-
}[];
|
|
109
|
-
} | null;
|
|
110
54
|
trainingMs: number;
|
|
111
55
|
notes: string;
|
|
112
56
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/models/record/run.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,wBAAsB,SAAS,CAC7B,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,EAChD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../src/models/record/run.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,wBAAsB,SAAS,CAC7B,OAAO,EAAE,OAAO,CAAC,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC,EAChD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI;;;;;;;;;;;;;;YA6C5C,KAAK;YACL,UAAU;YACV,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAYT"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as tf from "@tensorflow/tfjs-node";
|
|
2
1
|
import type { RecordArtifact } from "@matchbox-ai/core/internal";
|
|
3
|
-
export declare function verifyExport(
|
|
2
|
+
export declare function verifyExport(weights: Uint8Array, artifact: RecordArtifact, probes: readonly string[]): Promise<{
|
|
4
3
|
examples: number;
|
|
5
4
|
labelDisagreements: number;
|
|
6
5
|
maxConfidenceError: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"verify-export.d.ts","sourceRoot":"","sources":["../../../src/models/record/verify-export.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"verify-export.d.ts","sourceRoot":"","sources":["../../../src/models/record/verify-export.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AACjE,wBAAsB,YAAY,CAChC,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,cAAc,EACxB,MAAM,EAAE,SAAS,MAAM,EAAE;;;;GAsC1B"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { SequenceArtifact } from "@matchbox-ai/core/internal";
|
|
2
2
|
import type { DatasetExample } from "@matchbox-ai/core";
|
|
3
3
|
import type { SequenceRecipe } from "./types.js";
|
|
4
|
-
export declare function fitSequence(examples: readonly DatasetExample<unknown>[], recipe: SequenceRecipe, metadata: Pick<SequenceArtifact, "taskModule" | "taskMetadata" | "decoderModule">, probes?: readonly string[],
|
|
5
|
-
|
|
6
|
-
formatVersion:
|
|
7
|
-
|
|
4
|
+
export declare function fitSequence(examples: readonly DatasetExample<unknown>[], recipe: SequenceRecipe, metadata: Pick<SequenceArtifact, "taskModule" | "taskMetadata" | "decoderModule">, probes?: readonly string[], progress?: (epoch: number, loss: number) => void): Promise<{
|
|
5
|
+
model: {
|
|
6
|
+
formatVersion: 3;
|
|
7
|
+
engine: "burn-0.21";
|
|
8
8
|
kind: "sequence-parser";
|
|
9
9
|
architecture: "embedding-window-mlp";
|
|
10
10
|
taskModule: string;
|
|
@@ -14,120 +14,13 @@ export declare function fitSequence(examples: readonly DatasetExample<unknown>[]
|
|
|
14
14
|
tokenizer: "characters" | "words";
|
|
15
15
|
vocabulary: string[];
|
|
16
16
|
labels: string[];
|
|
17
|
-
radius:
|
|
17
|
+
radius: 1;
|
|
18
|
+
unknownTokens: "abstain" | "predict";
|
|
18
19
|
threshold: number;
|
|
19
|
-
precision: "float32"
|
|
20
|
-
weights:
|
|
21
|
-
name: string;
|
|
22
|
-
shape: number[];
|
|
23
|
-
values: number[];
|
|
24
|
-
scale: number;
|
|
25
|
-
}, {
|
|
26
|
-
name: string;
|
|
27
|
-
shape: number[];
|
|
28
|
-
values: number[];
|
|
29
|
-
scale: number;
|
|
30
|
-
}, {
|
|
31
|
-
name: string;
|
|
32
|
-
shape: number[];
|
|
33
|
-
values: number[];
|
|
34
|
-
scale: number;
|
|
35
|
-
}, {
|
|
36
|
-
name: string;
|
|
37
|
-
shape: number[];
|
|
38
|
-
values: number[];
|
|
39
|
-
scale: number;
|
|
40
|
-
}, {
|
|
41
|
-
name: string;
|
|
42
|
-
shape: number[];
|
|
43
|
-
values: number[];
|
|
44
|
-
scale: number;
|
|
45
|
-
}];
|
|
46
|
-
};
|
|
47
|
-
float: {
|
|
48
|
-
formatVersion: 2;
|
|
49
|
-
modelTopology: Record<string, unknown>;
|
|
50
|
-
kind: "sequence-parser";
|
|
51
|
-
architecture: "embedding-window-mlp";
|
|
52
|
-
taskModule: string;
|
|
53
|
-
decoderModule: string;
|
|
54
|
-
taskMetadata: unknown;
|
|
55
|
-
readout: "all" | "last";
|
|
56
|
-
tokenizer: "characters" | "words";
|
|
57
|
-
vocabulary: string[];
|
|
58
|
-
labels: string[];
|
|
59
|
-
radius: number;
|
|
60
|
-
threshold: number;
|
|
61
|
-
precision: "float32" | "int8";
|
|
62
|
-
weights: [{
|
|
63
|
-
name: string;
|
|
64
|
-
shape: number[];
|
|
65
|
-
values: number[];
|
|
66
|
-
scale: number;
|
|
67
|
-
}, {
|
|
68
|
-
name: string;
|
|
69
|
-
shape: number[];
|
|
70
|
-
values: number[];
|
|
71
|
-
scale: number;
|
|
72
|
-
}, {
|
|
73
|
-
name: string;
|
|
74
|
-
shape: number[];
|
|
75
|
-
values: number[];
|
|
76
|
-
scale: number;
|
|
77
|
-
}, {
|
|
78
|
-
name: string;
|
|
79
|
-
shape: number[];
|
|
80
|
-
values: number[];
|
|
81
|
-
scale: number;
|
|
82
|
-
}, {
|
|
83
|
-
name: string;
|
|
84
|
-
shape: number[];
|
|
85
|
-
values: number[];
|
|
86
|
-
scale: number;
|
|
87
|
-
}];
|
|
88
|
-
};
|
|
89
|
-
quantized: {
|
|
90
|
-
formatVersion: 2;
|
|
91
|
-
modelTopology: Record<string, unknown>;
|
|
92
|
-
kind: "sequence-parser";
|
|
93
|
-
architecture: "embedding-window-mlp";
|
|
94
|
-
taskModule: string;
|
|
95
|
-
decoderModule: string;
|
|
96
|
-
taskMetadata: unknown;
|
|
97
|
-
readout: "all" | "last";
|
|
98
|
-
tokenizer: "characters" | "words";
|
|
99
|
-
vocabulary: string[];
|
|
100
|
-
labels: string[];
|
|
101
|
-
radius: number;
|
|
102
|
-
threshold: number;
|
|
103
|
-
precision: "float32" | "int8";
|
|
104
|
-
weights: [{
|
|
105
|
-
name: string;
|
|
106
|
-
shape: number[];
|
|
107
|
-
values: number[];
|
|
108
|
-
scale: number;
|
|
109
|
-
}, {
|
|
110
|
-
name: string;
|
|
111
|
-
shape: number[];
|
|
112
|
-
values: number[];
|
|
113
|
-
scale: number;
|
|
114
|
-
}, {
|
|
115
|
-
name: string;
|
|
116
|
-
shape: number[];
|
|
117
|
-
values: number[];
|
|
118
|
-
scale: number;
|
|
119
|
-
}, {
|
|
120
|
-
name: string;
|
|
121
|
-
shape: number[];
|
|
122
|
-
values: number[];
|
|
123
|
-
scale: number;
|
|
124
|
-
}, {
|
|
125
|
-
name: string;
|
|
126
|
-
shape: number[];
|
|
127
|
-
values: number[];
|
|
128
|
-
scale: number;
|
|
129
|
-
}];
|
|
20
|
+
precision: "float32";
|
|
21
|
+
weights: string;
|
|
130
22
|
};
|
|
23
|
+
parameters: number;
|
|
131
24
|
history: number[];
|
|
132
25
|
parity: {
|
|
133
26
|
examples: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fit-sequence.d.ts","sourceRoot":"","sources":["../../../src/models/sequence/fit-sequence.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,SAAS,cAAc,CAAC,OAAO,CAAC,EAAE,EAC5C,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,cAAc,GAAG,eAAe,CAAC,EACjF,MAAM,GAAE,SAAS,MAAM,EAAO,EAC9B,
|
|
1
|
+
{"version":3,"file":"fit-sequence.d.ts","sourceRoot":"","sources":["../../../src/models/sequence/fit-sequence.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,wBAAsB,WAAW,CAC/B,QAAQ,EAAE,SAAS,cAAc,CAAC,OAAO,CAAC,EAAE,EAC5C,MAAM,EAAE,cAAc,EACtB,QAAQ,EAAE,IAAI,CAAC,gBAAgB,EAAE,YAAY,GAAG,cAAc,GAAG,eAAe,CAAC,EACjF,MAAM,GAAE,SAAS,MAAM,EAAO,EAC9B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DjD"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DatasetExample } from "@matchbox-ai/core";
|
|
2
|
+
import type { SequenceRecipe } from "./types.js";
|
|
3
|
+
export declare function prepareSupervision(examples: readonly DatasetExample<unknown>[], recipe: SequenceRecipe): {
|
|
4
|
+
vocabulary: string[];
|
|
5
|
+
radius: number;
|
|
6
|
+
dropout: number;
|
|
7
|
+
inputs: number[][];
|
|
8
|
+
labels: number[];
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=prepare-supervision.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"prepare-supervision.d.ts","sourceRoot":"","sources":["../../../src/models/sequence/prepare-supervision.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,wBAAgB,kBAAkB,CAChC,QAAQ,EAAE,SAAS,cAAc,CAAC,OAAO,CAAC,EAAE,EAC5C,MAAM,EAAE,cAAc;;;;;;EAqDvB"}
|