From 4fd2ae993ff7c0bd11abaef62e4f73e75fd078f7 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Sun, 1 Nov 2026 12:57:23 +0800 Subject: [PATCH 1/2] fix: docs links point to the generated case-preserved slugs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /docs/libraries 404s live — the Libraries doc generates at /docs/Libraries (loader preserves filename stems). Both hand-written hrefs updated; targets verified against production. --- src/pages/docs/index.astro | 2 +- src/pages/index.astro | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pages/docs/index.astro b/src/pages/docs/index.astro index fbb4327..fb6abf7 100644 --- a/src/pages/docs/index.astro +++ b/src/pages/docs/index.astro @@ -41,7 +41,7 @@ transliterate("bgnpcgn-ukr-Cyrl-Latn-2019", "Антон")

Python

pip install secryst
- All libraries → + All libraries →

Neural models

diff --git a/src/pages/index.astro b/src/pages/index.astro index c9b71d8..e5931e2 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -47,7 +47,7 @@ for (const code of systemCodes) {
From f53f72f4f7df362e9217bf2e66befe813b08ccf1 Mon Sep 17 00:00:00 2001 From: Ronald Tse Date: Sun, 1 Nov 2026 18:50:15 +0800 Subject: [PATCH 2/2] feat: the /ml catalogue generates from the models.yaml registry The page was hand-written and listed 14 of what is now 35 models. scripts/generate-models.mjs reads the registry (same pattern as the maps catalogue generator): id, task, precision, size, split-part count, sha-pinned release link, and ordered metrics per model; ml.astro renders the ledger from that data, split by tier on precision, with every id linking to its release. Prose counts now compute. The maps page test's hardcoded 289 became 318 (the true current total). --- package.json | 3 +- scripts/generate-models.mjs | 72 +++ src/data/models-catalogue.json | 965 +++++++++++++++++++++++++++++++++ src/pages/ml.astro | 167 ++---- test/maps-pages.test.ts | 2 +- 5 files changed, 1088 insertions(+), 121 deletions(-) create mode 100644 scripts/generate-models.mjs create mode 100644 src/data/models-catalogue.json diff --git a/package.json b/package.json index a3b3f1f..4811dcd 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "format:check": "prettier --check .", "test:e2e": "playwright test", "test:e2e:ui": "playwright test --ui", - "generate:catalogue": "tsx scripts/generate-catalogue.mjs" + "generate:catalogue": "tsx scripts/generate-catalogue.mjs", + "generate:models": "tsx scripts/generate-models.mjs" }, "dependencies": { "@asciidoctor/core": "^4.0.6", diff --git a/scripts/generate-models.mjs b/scripts/generate-models.mjs new file mode 100644 index 0000000..95911f0 --- /dev/null +++ b/scripts/generate-models.mjs @@ -0,0 +1,72 @@ +/** + * Regenerate `src/data/models-catalogue.json` from the model registry + * (interscript-models/models.yaml). Run: `npm run generate:models`. + */ + +import { readFileSync, writeFileSync } from "node:fs" +import { join, resolve, dirname } from "node:path" +import { fileURLToPath } from "node:url" +import yaml from "js-yaml" + +const __dirname = dirname(fileURLToPath(import.meta.url)) +const ROOT = resolve(__dirname, "..") +const REGISTRY = resolve(ROOT, "..", "interscript-models", "models.yaml") +const OUT_PATH = join(ROOT, "src", "data", "models-catalogue.json") + +const METRIC_ORDER = [ + "der_total_greedy", "der_morph_greedy", "der_teacher_greedy", + "der_teacher_fullset", "wer_wikinews2024_multiref", "wer_wikinews_multiref", + "cer", "per", "em", +] + +function humanSize(bytes) { + if (!bytes) return "" + const gib = bytes / 2 ** 30 + if (gib >= 1) return `${gib.toFixed(1)} GiB` + return `${(bytes / 2 ** 20).toFixed(0)} MiB` +} + +function releaseTag(entry, id) { + const first = (entry.parts || [])[0] + if (first && first.url) { + const m = first.url.match(/releases\/download\/([^/]+)\//) + if (m) return m[1] + } + const alias = (entry.aliases || [])[0] + return alias || id +} + +function main() { + const registry = yaml.load(readFileSync(REGISTRY, "utf8")) + const out = {} + for (const [id, e] of Object.entries(registry.models || {})) { + const metrics = (e.metrics || []).map((m) => ({ + name: m.name, + value: m.value, + })) + metrics.sort( + (a, b) => + (METRIC_ORDER.indexOf(a.name) + 1 || 99) - + (METRIC_ORDER.indexOf(b.name) + 1 || 99), + ) + out[id] = { + id, + task: e.task || "", + scripts: e.scripts || [], + precision: e.precision || "", + size: e.size || 0, + sizeHuman: humanSize(e.size), + splitParts: (e.parts || []).length || null, + filename: e.filename || "", + releaseTag: releaseTag(e, id), + releaseUrl: `https://github.com/interscript/interscript-models/releases/tag/${releaseTag(e, id)}`, + metrics, + license: e.license || "", + paritySamples: e.parity ? e.parity.samples : null, + } + } + writeFileSync(OUT_PATH, JSON.stringify(out, null, 2) + "\n", "utf8") + console.log(`Generated models catalogue: ${Object.keys(out).length} models → ${OUT_PATH}`) +} + +main() diff --git a/src/data/models-catalogue.json b/src/data/models-catalogue.json new file mode 100644 index 0000000..1cc652d --- /dev/null +++ b/src/data/models-catalogue.json @@ -0,0 +1,965 @@ +{ + "khm-phonemic-1.0": { + "id": "khm-phonemic-1.0", + "task": "g2p", + "scripts": [], + "precision": "fp32", + "size": 1112390964, + "sizeHuman": "1.0 GiB", + "splitParts": null, + "filename": "khm-phonemic-1.0.zip", + "releaseTag": "khm-phonemic-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/khm-phonemic-1.0", + "metrics": [ + { + "name": "cer", + "value": 24.5 + }, + { + "name": "cer_legacy_split", + "value": 24.16 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 600 + }, + "tha-phonemic-1.0": { + "id": "tha-phonemic-1.0", + "task": "g2p", + "scripts": [], + "precision": "fp32", + "size": 1111939721, + "sizeHuman": "1.0 GiB", + "splitParts": null, + "filename": "tha-phonemic-1.0.zip", + "releaseTag": "tha-phonemic-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/tha-phonemic-1.0", + "metrics": [ + { + "name": "per", + "value": 19.29 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 600 + }, + "khm-latn-1.0": { + "id": "khm-latn-1.0", + "task": "translit", + "scripts": [ + "Khmr", + "Latn" + ], + "precision": "fp32", + "size": 1418009977, + "sizeHuman": "1.3 GiB", + "splitParts": null, + "filename": "khm-latn-1.0-fp32.zip", + "releaseTag": "khm-latn-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/khm-latn-1.0", + "metrics": [ + { + "name": "cer", + "value": 27.42 + }, + { + "name": "em", + "value": 59.66 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 895 + }, + "urd-ipa-1.0": { + "id": "urd-ipa-1.0", + "task": "g2p", + "scripts": [ + "Arab", + "IPA" + ], + "precision": "fp32", + "size": 1418039605, + "sizeHuman": "1.3 GiB", + "splitParts": null, + "filename": "urd-g2p-1.0-fp32.zip", + "releaseTag": "urd-ipa-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/urd-ipa-1.0", + "metrics": [ + { + "name": "cer", + "value": 14.77 + }, + { + "name": "em", + "value": 33.6 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 12699 + }, + "urd-vocalized-1.0": { + "id": "urd-vocalized-1.0", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "fp32", + "size": 1417851421, + "sizeHuman": "1.3 GiB", + "splitParts": null, + "filename": "urd-diac-1.0-fp32.zip", + "releaseTag": "urd-vocalized-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/urd-vocalized-1.0", + "metrics": [ + { + "name": "cer", + "value": 3.74 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 11940 + }, + "heb-vocalized-1.0": { + "id": "heb-vocalized-1.0", + "task": "diacritization", + "scripts": [ + "Hebr", + "Hebr" + ], + "precision": "fp32", + "size": 2781139753, + "sizeHuman": "2.6 GiB", + "splitParts": 2, + "filename": "heb-diac-1.0-fp32.zip", + "releaseTag": "heb-diac-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/heb-diac-1.0", + "metrics": [ + { + "name": "der_greedy", + "value": 29 + }, + { + "name": "der_beam4", + "value": 17.46 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 600 + }, + "tha-phonemic-base-1.0": { + "id": "tha-phonemic-base-1.0", + "task": "g2p", + "scripts": [ + "Thai", + "IPA" + ], + "precision": "fp32", + "size": 2781174343, + "sizeHuman": "2.6 GiB", + "splitParts": 2, + "filename": "tha-g2p-base-1.0-fp32.zip", + "releaseTag": "tha-g2p-base-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/tha-g2p-base-1.0", + "metrics": [ + { + "name": "per_teacher", + "value": 1.25 + }, + { + "name": "per_student", + "value": 3.53 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 1219 + }, + "tha-phonemic-small-1.0": { + "id": "tha-phonemic-small-1.0", + "task": "g2p", + "scripts": [ + "Thai", + "IPA" + ], + "precision": "int8", + "size": 257468517, + "sizeHuman": "246 MiB", + "splitParts": null, + "filename": "tha-g2p-small-1.0-int8.zip", + "releaseTag": "tha-phonemic-small-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/tha-phonemic-small-1.0", + "metrics": [ + { + "name": "per_teacher", + "value": 4.43 + }, + { + "name": "per_student_beam4", + "value": 12.06 + }, + { + "name": "per_student", + "value": 2.85 + } + ], + "license": "", + "paritySamples": 1219 + }, + "tha-phonemic-small-1.0-int4": { + "id": "tha-phonemic-small-1.0-int4", + "task": "g2p", + "scripts": [ + "Thai", + "IPA" + ], + "precision": "int4", + "size": 201958073, + "sizeHuman": "193 MiB", + "splitParts": null, + "filename": "tha-phonemic-small-1.0-int4.zip", + "releaseTag": "tha-phonemic-small-1.0-int4", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/tha-phonemic-small-1.0-int4", + "metrics": [ + { + "name": "per_teacher", + "value": 4.43 + }, + { + "name": "per_student_beam4", + "value": 12.06 + }, + { + "name": "per_student", + "value": 2.85 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 600 + }, + "heb-vocalized-small-1.0": { + "id": "heb-vocalized-small-1.0", + "task": "diacritization", + "scripts": [ + "Hebr", + "Hebr" + ], + "precision": "fp32", + "size": 1418663344, + "sizeHuman": "1.3 GiB", + "splitParts": null, + "filename": "heb-diac-small-1.0-fp32.zip", + "releaseTag": "heb-vocalized-small-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/heb-vocalized-small-1.0", + "metrics": [ + { + "name": "der_teacher_greedy", + "value": 24.79 + }, + { + "name": "der_student_greedy", + "value": 30.37 + } + ], + "license": "", + "paritySamples": 1864 + }, + "fas-phonemic-1.0": { + "id": "fas-phonemic-1.0", + "task": "g2p", + "scripts": [ + "Arab", + "Latn" + ], + "precision": "fp32", + "size": 2780254270, + "sizeHuman": "2.6 GiB", + "splitParts": 2, + "filename": "fas-g2p-1.0-fp32.zip", + "releaseTag": "fas-g2p-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/fas-g2p-1.0", + "metrics": [ + { + "name": "cer", + "value": 1.6 + }, + { + "name": "sb_homograph_ezafe_norm", + "value": 77.34 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 1000 + }, + "ara-vocalized-small-1.0": { + "id": "ara-vocalized-small-1.0", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "fp32", + "size": 1418126835, + "sizeHuman": "1.3 GiB", + "splitParts": null, + "filename": "ara-diac-small-1.0-fp32.zip", + "releaseTag": "ara-vocalized-small-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-small-1.0", + "metrics": [ + { + "name": "der_teacher_greedy", + "value": 1.3205 + }, + { + "name": "der_teacher_fullset", + "value": 2.5815 + }, + { + "name": "der_student_greedy", + "value": 3.658 + }, + { + "name": "der_student_fullset", + "value": 8.259 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 800 + }, + "heb-vocalized-1.1": { + "id": "heb-vocalized-1.1", + "task": "diacritization", + "scripts": [ + "Hebr", + "Hebr" + ], + "precision": "fp32", + "size": 2780987905, + "sizeHuman": "2.6 GiB", + "splitParts": 2, + "filename": "heb.zip", + "releaseTag": "heb-diac-1.1", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/heb-diac-1.1", + "metrics": [ + { + "name": "der_greedy", + "value": 16.44 + }, + { + "name": "der_beam4", + "value": 16.43 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 500 + }, + "ara-vocalized-1.0": { + "id": "ara-vocalized-1.0", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "fp32", + "size": 2780311342, + "sizeHuman": "2.6 GiB", + "splitParts": 2, + "filename": "ara-diac-1.0-fp32.zip", + "releaseTag": "ara-diac-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-diac-1.0", + "metrics": [ + { + "name": "der_total_greedy", + "value": 2.5793 + }, + { + "name": "der_morph_greedy", + "value": 1.5317 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 500 + }, + "ara-vocalized-small-1.0-int8": { + "id": "ara-vocalized-small-1.0-int8", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "int8", + "size": 256959713, + "sizeHuman": "245 MiB", + "splitParts": null, + "filename": "ara-vocalized-small-1.0-int8.zip", + "releaseTag": "ara-vocalized-small-1.0-int8", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-small-1.0-int8", + "metrics": [ + { + "name": "der_teacher_greedy", + "value": 1.3205 + }, + { + "name": "der_teacher_fullset", + "value": 2.5815 + }, + { + "name": "der_student_greedy", + "value": 3.658 + }, + { + "name": "der_student_fullset", + "value": 8.259 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 800 + }, + "ara-vocalized-small-2.0": { + "id": "ara-vocalized-small-2.0", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "fp32", + "size": 1418516306, + "sizeHuman": "1.3 GiB", + "splitParts": null, + "filename": "ara-diac-small-2.0-fp32.zip", + "releaseTag": "ara-vocalized-small-2.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-small-2.0", + "metrics": [ + { + "name": "der_teacher_fullset", + "value": 2.289 + }, + { + "name": "der_student_fullset", + "value": 5.0821 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 600 + }, + "ara-vocalized-small-2.0-int8": { + "id": "ara-vocalized-small-2.0-int8", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "int8", + "size": 264043016, + "sizeHuman": "252 MiB", + "splitParts": null, + "filename": "ara-vocalized-small-2.0-int8.zip", + "releaseTag": "ara-vocalized-small-2.0-int8", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-small-2.0-int8", + "metrics": [ + { + "name": "der_teacher_fullset", + "value": 2.289 + }, + { + "name": "der_student_fullset", + "value": 4.8218 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 600 + }, + "ara-vocalized-2.0": { + "id": "ara-vocalized-2.0", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "fp32", + "size": 2780299051, + "sizeHuman": "2.6 GiB", + "splitParts": 2, + "filename": "ara-diac-2.0-fp32.zip", + "releaseTag": "ara-diac-2.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-diac-2.0", + "metrics": [ + { + "name": "der_total_greedy", + "value": 2.2864 + }, + { + "name": "der_morph_greedy", + "value": 1.3343 + }, + { + "name": "wer_wikinews_multiref", + "value": 17.3794 + }, + { + "name": "der_wikinews_multiref", + "value": 11.8273 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 600 + }, + "ara-vocalized-2.0-int8": { + "id": "ara-vocalized-2.0-int8", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "int8", + "size": 519207340, + "sizeHuman": "495 MiB", + "splitParts": null, + "filename": "ara-vocalized-2.0-int8.zip", + "releaseTag": "ara-vocalized-2.0-int8", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-2.0-int8", + "metrics": [ + { + "name": "der_total_greedy", + "value": 2.2864 + }, + { + "name": "der_morph_greedy", + "value": 1.3343 + }, + { + "name": "wer_wikinews_multiref", + "value": 17.3794 + }, + { + "name": "der_wikinews_multiref", + "value": 11.8273 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 600 + }, + "ara-vocalized-small-2.1": { + "id": "ara-vocalized-small-2.1", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "fp32", + "size": 1419756840, + "sizeHuman": "1.3 GiB", + "splitParts": null, + "filename": "ara-diac-small-2.1-fp32.zip", + "releaseTag": "ara-vocalized-small-2.1", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-small-2.1", + "metrics": [ + { + "name": "der_teacher_fullset", + "value": 2.289 + }, + { + "name": "der_student_fullset", + "value": 4.5701 + } + ], + "license": "", + "paritySamples": 2480 + }, + "ara-vocalized-small-2.1-int8": { + "id": "ara-vocalized-small-2.1-int8", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "int8", + "size": 267965657, + "sizeHuman": "256 MiB", + "splitParts": null, + "filename": "ara-vocalized-small-2.1-int8.zip", + "releaseTag": "ara-vocalized-small-2.1-int8", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-small-2.1-int8", + "metrics": [ + { + "name": "der_teacher_fullset", + "value": 2.289 + }, + { + "name": "der_student_fullset", + "value": 4.5701 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 2480 + }, + "ara-vocalized-layerdrop-1.0": { + "id": "ara-vocalized-layerdrop-1.0", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "fp32", + "size": 1015218371, + "sizeHuman": "968 MiB", + "splitParts": null, + "filename": "ara-diac-layerdrop-1.0-fp32.zip", + "releaseTag": "ara-vocalized-layerdrop-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-layerdrop-1.0", + "metrics": [ + { + "name": "der_teacher_fullset", + "value": 2.2921 + }, + { + "name": "der_student_fullset", + "value": 5.784 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 2480 + }, + "ara-vocalized-layerdrop-1.0-int8": { + "id": "ara-vocalized-layerdrop-1.0-int8", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "int8", + "size": 191603048, + "sizeHuman": "183 MiB", + "splitParts": null, + "filename": "ara-vocalized-layerdrop-1.0-int8.zip", + "releaseTag": "ara-vocalized-layerdrop-1.0-int8", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-layerdrop-1.0-int8", + "metrics": [ + { + "name": "der_teacher_fullset", + "value": 2.2921 + }, + { + "name": "der_student_fullset", + "value": 5.784 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 2480 + }, + "ara-vocalized-layerdrop-1.0-int4": { + "id": "ara-vocalized-layerdrop-1.0-int4", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "int4", + "size": 145195702, + "sizeHuman": "138 MiB", + "splitParts": null, + "filename": "ara-vocalized-layerdrop-1.0-int4.zip", + "releaseTag": "ara-vocalized-layerdrop-1.0-int4", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-layerdrop-1.0-int4", + "metrics": [ + { + "name": "der_teacher_fullset", + "value": 2.2921 + }, + { + "name": "der_student_fullset", + "value": 5.784 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 2480 + }, + "ara-vocalized-small-2.1-fp16": { + "id": "ara-vocalized-small-2.1-fp16", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "fp16", + "size": 706351903, + "sizeHuman": "674 MiB", + "splitParts": null, + "filename": "ara-vocalized-small-2.1-fp16.zip", + "releaseTag": "ara-vocalized-small-2.1-fp16", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-small-2.1-fp16", + "metrics": [ + { + "name": "der_teacher_fullset", + "value": 2.289 + }, + { + "name": "der_student_fullset", + "value": 4.5701 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 2480 + }, + "ara-vocalized-small-int8static-2.1": { + "id": "ara-vocalized-small-int8static-2.1", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "int8", + "size": 515362212, + "sizeHuman": "491 MiB", + "splitParts": null, + "filename": "ara-diac-small-int8static-2.1-int8.zip", + "releaseTag": "ara-vocalized-small-int8static-2.1", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-small-int8static-2.1", + "metrics": [ + { + "name": "der_teacher_fullset", + "value": 2.289 + }, + { + "name": "der_student_fullset", + "value": 4.5701 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 2480 + }, + "ara-vocalized-plane-1.0": { + "id": "ara-vocalized-plane-1.0", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "int8", + "size": 219076965, + "sizeHuman": "209 MiB", + "splitParts": null, + "filename": "ara-vocalized-plane-1.0.zip", + "releaseTag": "ara-vocalized-plane-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-plane-1.0", + "metrics": [ + { + "name": "der_total_greedy", + "value": 3.5905 + }, + { + "name": "der_morph_greedy", + "value": 2.2149 + } + ], + "license": "BSD-3-Clause", + "paritySamples": null + }, + "ara-vocalized-plane-large-1.0": { + "id": "ara-vocalized-plane-large-1.0", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "int8", + "size": 866052488, + "sizeHuman": "826 MiB", + "splitParts": null, + "filename": "ara-vocalized-plane-large-1.0.zip", + "releaseTag": "ara-vocalized-plane-large-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-plane-large-1.0", + "metrics": [ + { + "name": "der_total_greedy", + "value": 2.7397 + }, + { + "name": "der_morph_greedy", + "value": 1.6717 + }, + { + "name": "wer_total_greedy", + "value": 8.6083 + } + ], + "license": "BSD-3-Clause", + "paritySamples": null + }, + "ara-vocalized-news-1.0": { + "id": "ara-vocalized-news-1.0", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "int8", + "size": 399018923, + "sizeHuman": "381 MiB", + "splitParts": null, + "filename": "ara-vocalized-news-1.0.zip", + "releaseTag": "ara-vocalized-news-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-vocalized-news-1.0", + "metrics": [ + { + "name": "der_total_greedy", + "value": 5.4814 + }, + { + "name": "wer_wikinews2024_multiref", + "value": 4.0976 + }, + { + "name": "der_wikinews2024_multiref", + "value": 1.5606 + } + ], + "license": "BSD-3-Clause", + "paritySamples": null + }, + "heb-vocalized-plane-1.0": { + "id": "heb-vocalized-plane-1.0", + "task": "diacritization", + "scripts": [ + "Hebr", + "Hebr" + ], + "precision": "int8", + "size": 219322007, + "sizeHuman": "209 MiB", + "splitParts": null, + "filename": "heb-vocalized-plane-1.0.zip", + "releaseTag": "heb-vocalized-plane-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/heb-vocalized-plane-1.0", + "metrics": [ + { + "name": "der_total_greedy", + "value": 12.48 + } + ], + "license": "BSD-3-Clause", + "paritySamples": null + }, + "heb-vocalized-plane-2.0": { + "id": "heb-vocalized-plane-2.0", + "task": "diacritization", + "scripts": [ + "Hebr", + "Hebr" + ], + "precision": "int8", + "size": 415901226, + "sizeHuman": "397 MiB", + "splitParts": null, + "filename": "heb-vocalized-plane-2.0.zip", + "releaseTag": "heb-vocalized-plane-2.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/heb-vocalized-plane-2.0", + "metrics": [ + { + "name": "der_total_greedy", + "value": 8.18 + } + ], + "license": "BSD-3-Clause", + "paritySamples": null + }, + "urd-ipa-base-1.0": { + "id": "urd-ipa-base-1.0", + "task": "g2p", + "scripts": [ + "Arab", + "IPA" + ], + "precision": "fp32", + "size": 2159598918, + "sizeHuman": "2.0 GiB", + "splitParts": 2, + "filename": "urd-g2p-base-1.0-fp32.zip", + "releaseTag": "urd-g2p-base-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/urd-g2p-base-1.0", + "metrics": [ + { + "name": "cer", + "value": 15.65 + }, + { + "name": "cer_normalized", + "value": 10.75 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 500 + }, + "ara-diac-news-1.1": { + "id": "ara-diac-news-1.1", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "fp32", + "size": 2160091218, + "sizeHuman": "2.0 GiB", + "splitParts": null, + "filename": "ara-diac-news-1.1.zip", + "releaseTag": "ara-diac-news-1.1", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/ara-diac-news-1.1", + "metrics": [ + { + "name": "der_total_greedy", + "value": 2.84 + }, + { + "name": "wer_wikinews2024_multiref", + "value": 8.85 + } + ], + "license": "BSD-3-Clause", + "paritySamples": null + }, + "urd-vocalized-base-1.0": { + "id": "urd-vocalized-base-1.0", + "task": "diacritization", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "fp16", + "size": 1347488093, + "sizeHuman": "1.3 GiB", + "splitParts": null, + "filename": "urd-diac-base-1.0-fp16.zip", + "releaseTag": "urd-vocalized-base-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/urd-vocalized-base-1.0", + "metrics": [ + { + "name": "cer", + "value": 3.57 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 500 + }, + "fas-vocalized-base-1.0": { + "id": "fas-vocalized-base-1.0", + "task": "diac", + "scripts": [ + "Arab", + "Arab" + ], + "precision": "fp16", + "size": 711254463, + "sizeHuman": "678 MiB", + "splitParts": null, + "filename": "fas-diac-base-1.0-fp16.zip", + "releaseTag": "fas-vocalized-base-1.0", + "releaseUrl": "https://github.com/interscript/interscript-models/releases/tag/fas-vocalized-base-1.0", + "metrics": [ + { + "name": "cer", + "value": 0.603 + } + ], + "license": "BSD-3-Clause", + "paritySamples": 500 + } +} diff --git a/src/pages/ml.astro b/src/pages/ml.astro index 6fc7a34..5be1ca1 100644 --- a/src/pages/ml.astro +++ b/src/pages/ml.astro @@ -1,123 +1,52 @@ --- import Base from "../layouts/Base.astro" +import models from "../data/models-catalogue.json" with { type: "json" } +const all = Object.values(models) as Array<{ + id: string + task: string + precision: string + sizeHuman: string + splitParts: number | null + metrics: { name: string; value: number }[] + releaseUrl: string +}> -const serverModels = [ - { - id: "ara-diac-2.0", - task: "diacritization", - pair: "Arabic → haraqat", - metric: "DER 2.29 · OOD WER 17.38", - artifact: "fp32 · 2.7 GiB · parts", - status: "released", - }, - { - id: "khm-latn-1.0", - task: "translit", - pair: "Khmer → Latin", - metric: "CER 27.42 · EM 59.66", - artifact: "fp32 · 1.3 GiB", - status: "released", - }, - { - id: "urd-g2p-1.0", - task: "g2p", - pair: "Urdu → IPA", - metric: "CER 14.77 · EM 33.6", - artifact: "fp32 · 1.3 GiB", - status: "released", - }, - { - id: "urd-diac-1.0", - task: "diacritization", - pair: "Urdu → haraqat", - metric: "CER 3.74", - artifact: "fp32 · 1.3 GiB", - status: "released", - }, - { - id: "heb-diac-1.0", - task: "diacritization", - pair: "Hebrew → niqqud", - metric: "DER 29.0 greedy · 17.46 beam-4", - artifact: "fp32 · 2.6 GiB · parts", - status: "released", - }, - { - id: "tha-g2p-base-1.0", - task: "g2p", - pair: "Thai → IPA", - metric: "PER 9.19 (teacher 4.43)", - artifact: "fp32 · 2.6 GiB · parts", - status: "released", - }, -] +const metricLabel = (m: { name: string; value: number }) => { + const names: Record = { + der_total_greedy: "DER", + der_morph_greedy: "morph DER", + der_teacher_greedy: "DER (teacher)", + der_teacher_fullset: "DER (teacher)", + wer_wikinews2024_multiref: "OOD WER", + wer_wikinews_multiref: "OOD WER", + cer: "CER", + per: "PER", + em: "EM", + } + return `${names[m.name] ?? m.name} ${m.value}` +} -const clientModels = [ - { - id: "ara-diac-plane-large-1.0", - task: "diacritization · plane", - pair: "Arabic → haraqat", - metric: "DER 2.74 full-set — dedicated #2, ahead of Gemini-Flash", - artifact: "int8 · 866 MiB · one graph", - status: "released", - }, - { - id: "ara-diac-plane-1.0", - task: "diacritization · plane", - pair: "Arabic → haraqat", - metric: "DER 3.59 · −45% size · −67% CPU latency vs seq2seq student", - artifact: "int8 · 219 MiB · K-pass decode", - status: "released", - }, - { - id: "ara-diac-small-2.1", - task: "diacritization", - pair: "Arabic → haraqat", - metric: "DER 4.57 [1.91, 2.35] vs teacher (1.0 was 8.26)", - artifact: "int8 · 264 MiB · fp16 · 674 MiB", - status: "released", - }, - { - id: "ara-diac-layerdrop-1.0", - task: "diacritization", - pair: "Arabic → haraqat", - metric: "DER 5.78 · 63% of the parameters", - artifact: "int4 · 95 MiB · browser-native", - status: "released", - }, - { - id: "tha-g2p-small-1.0", - task: "g2p", - pair: "Thai → IPA", - metric: "PER 2.85 greedy (12.06 beam-4)", - artifact: "int8 · 246 MiB", - status: "released", - }, - { - id: "tha-g2p-small-1.0-int4", - task: "g2p", - pair: "Thai → IPA", - metric: "same student · 4-bit", - artifact: "int4 · 193 MiB", - status: "released", - }, - { - id: "heb-diac-small-1.0", - task: "diacritization", - pair: "Hebrew → niqqud", - metric: "DER 30.37 (teacher 24.79)", - artifact: "fp32 · 1.3 GiB", - status: "released", - }, - { - id: "fas-g2p-1.0", - task: "g2p", - pair: "Persian → IPA", - metric: "CER ≈1.6 · homograph 77.34%", - artifact: "fp32 · 2.6 GiB · parts", - status: "released", - }, -] +const row = (m: (typeof all)[number]) => ({ + id: m.id, + task: m.task, + metric: m.metrics.map(metricLabel).slice(0, 2).join(" · ") || "see RESULTS.md", + artifact: + `${m.precision} · ${m.sizeHuman}` + + (m.splitParts ? ` · ${m.splitParts} parts` : ""), + releaseUrl: m.releaseUrl, +}) + +const serverModels = all + .filter((m) => m.precision === "fp32") + .sort((a, b) => a.id.localeCompare(b.id)) + .map(row) + +const clientModels = all + .filter((m) => m.precision !== "fp32") + .sort((a, b) => a.id.localeCompare(b.id)) + .map(row) + +const modelCount = all.length --- The catalogue

Every model, with its measured score.

- The index (v8) resolves 26 models across five languages. No model is published without a + The models.yaml registry resolves {modelCount} models across six languages. No model is published without a measured metric next to its teacher's, on the same harness, in the open. Students are distilled from frozen teachers and gated at a pre-agreed error budget. Each entry resolves from the models.yaml index; artifacts above GitHub's 2 GiB cap ship as @@ -173,7 +102,7 @@ const clientModels = [ {m.task} - {m.id} + {m.id} {m.pair} {m.metric} @@ -194,7 +123,7 @@ const clientModels = [ {m.task} - {m.id} + {m.id} {m.pair} {m.metric} diff --git a/test/maps-pages.test.ts b/test/maps-pages.test.ts index c5f3fde..63b9620 100644 --- a/test/maps-pages.test.ts +++ b/test/maps-pages.test.ts @@ -24,7 +24,7 @@ describe("maps catalogue page", () => { }) it("mentions the catalogue total", () => { - expect(html).toMatch(/289 maps/) + expect(html).toMatch(/318 maps/) }) it("mentions authority count", () => {