Merge feat/danish-models: Danish fine-tune catalog entries (spec 001 workstream 6)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

# Conflicts:
#	docs/Decisions.md
#	docs/WorkBreakdown.md
This commit is contained in:
Lucas Winther committed 2026-10-30 01:27:45 +01:00
commit 439d099279
4 files changed
+202 -1

No files matched your search

+69
View File
@@ -173,6 +173,38 @@ const ACCEL_Q4: DtypeDefault = {
note: "q4: the medium fp16 conversions fail to load / overflow (D-022).",
};
// ---------------------------------------------------------------------------
// Danish fine-tunes (D-WS6a)
// ---------------------------------------------------------------------------
/**
* Hugging Face account that hosts our conversions of the Danish Whisper
* fine-tunes (D-WS6a). Both the ONNX repos (browser engine) and the
* CTranslate2 int8 repos (server engine) hang off this one value, so
* publishing under the owner's account is a one-line change here. Until the
* owner confirms the account and the repos exist, it stays a placeholder.
*/
export const DANISH_MODELS_HF_OWNER = "PENDING-OWNER";
/**
* WASM default for the Danish conversions (D-WS6a): measured on our own files
* (da_festuge, onnxruntime-node CPU), q4 matched or beat q8 on WER and was
* faster for all three — small included, unlike the stock small (q8).
*/
const DANISH_WASM_Q4: DtypeDefault = {
dtype: "q4",
verified: false,
note: "q4: best measured WER and fastest of q8/q4 on our Danish conversions (D-WS6a).",
};
/** Catalog id + matching faster-whisper repo for one published conversion. */
function danishRepos(name: string): Pick<WhisperModel, "id" | "fasterWhisperModel"> {
return {
id: `${DANISH_MODELS_HF_OWNER}/${name}-ONNX`,
fasterWhisperModel: `${DANISH_MODELS_HF_OWNER}/${name}-ct2-int8`,
};
}
// ---------------------------------------------------------------------------
// The catalog (D-006: curated, not exhaustive)
// ---------------------------------------------------------------------------
@@ -279,6 +311,43 @@ export const MODELS: readonly WhisperModel[] = [
decoderParamsM: 174,
defaults: { wasm: WASM_Q4, webgpu: WEBGPU_FP16_Q4, webnn: WEBNN_FP16 },
},
// Danish fine-tunes (D-WS6a): unchanged Whisper architectures, so the
// parameter counts are their base models'. Conversions by us, weights by
// the original authors (credited in each published repo's model card).
{
// thorhojhus/whisper-small-danish (MIT), fine-tune of whisper-small.
...danishRepos("whisper-small-danish"),
displayName: "Whisper Small (Danish)",
multilingual: true,
// Translation untested on these fine-tunes (spec 001, D-WS4a).
canTranslate: false,
encoderParamsM: 88,
decoderParamsM: 156,
defaults: { wasm: DANISH_WASM_Q4, webgpu: WEBGPU_FP16_Q4, webnn: WEBNN_FP16 },
},
{
// thorhojhus/whisper-large-v3-turbo-danish (MIT).
...danishRepos("whisper-large-v3-turbo-danish"),
displayName: "Whisper Large v3 Turbo (Danish)",
multilingual: true,
// Translation untested on these fine-tunes (spec 001, D-WS4a).
canTranslate: false,
encoderParamsM: 635,
decoderParamsM: 174,
defaults: { wasm: DANISH_WASM_Q4, webgpu: WEBGPU_FP16_Q4, webnn: WEBNN_FP16 },
},
{
// danish-foundation-models/edda-v0.2 (Apache-2.0, Alexandra Institute),
// fine-tune of whisper-large-v3-turbo.
...danishRepos("edda-v0.2"),
displayName: "Edda v0.2 (Danish)",
multilingual: true,
// Translation untested on these fine-tunes (spec 001, D-WS4a).
canTranslate: false,
encoderParamsM: 635,
decoderParamsM: 174,
defaults: { wasm: DANISH_WASM_Q4, webgpu: WEBGPU_FP16_Q4, webnn: WEBNN_FP16 },
},
];
export function getModel(id: string): WhisperModel | undefined {