{
  "schema_version": "transcribe-intake-v1",
  "family": "canary",
  "hf_repo": "nvidia/canary-180m-flash",
  "hf_revision": "b12ab418510d093e83890178fd0e8b0d0f7918a6",
  "sources": {
    "config": {
      "kind": "hf_file",
      "path": "config.json",
      "status": "missing",
      "detail": "NeMo ships canary-180m-flash as a single .nemo tar archive (canary-180m-flash.nemo, 0.74 GB). config.json is not on the HF repo root; values below come from the NVIDIA model card and from peer variant nvidia/canary-1b-flash whose HF Transformers shim exposes the encoder shape and frontend (canary-180m-flash uses a smaller 17-layer encoder + 4 transformer-decoder layers and is expected to use the same FastConformer mel contract)."
    },
    "preprocessor": {
      "kind": "hf_file",
      "path": "preprocessor_config.json|feature_extractor_config.json",
      "status": "missing",
      "detail": "no preprocessor_config.json on the HF repo root; preprocessor lives inside the .nemo archive (model_config.yaml -> preprocessor, NeMo AudioToMelSpectrogramPreprocessor / FilterbankFeatures). Frontend values below are inherited from canary-1b-flash's preprocessor_config.json — Stage 2 will confirm against the .nemo archive's model.cfg.preprocessor."
    },
    "tokenizer_config": {
      "kind": "hf_file",
      "path": "tokenizer_config.json",
      "status": "missing",
      "detail": "no tokenizer_config.json; tokenizer is concatenated SentencePiece (one SP per language for en/de/es/fr) embedded in the .nemo archive."
    },
    "tokenizer_json": {
      "kind": "hf_file",
      "path": "tokenizer.json",
      "status": "missing",
      "detail": "no fast-tokenizer JSON; concatenated SentencePiece protos only"
    },
    "generation_config": {
      "kind": "hf_file",
      "path": "generation_config.json",
      "status": "missing",
      "detail": "decoding config (default beam_size=1 per model card example, length_penalty, prompt format) lives in the .nemo archive under model.cfg.decoding"
    },
    "safetensors_metadata": {
      "kind": "hf_api",
      "path": "HfApi.get_safetensors_metadata",
      "status": "missing",
      "detail": "weights are PyTorch state_dict inside the .nemo tarball, not safetensors; dtype filled manually from NeMo defaults — peer variant canary-1b-flash's safetensors header is uniformly F32"
    },
    "model_card": {
      "kind": "hf_api",
      "path": "https://huggingface.co/nvidia/canary-180m-flash",
      "status": "found",
      "detail": "languages (4), capability flags (timestamps experimental / translation EN<->{de,es,fr} / streaming no), Open ASR Leaderboard per-dataset numbers and FLEURS BLEU/COMET scores read from the model card"
    },
    "reference_modeling_code": {
      "kind": "reference_code",
      "path": "https://github.com/NVIDIA/NeMo (nemo.collections.asr.models.EncDecMultiTaskModel) and the .nemo archive's model_config.yaml; cross-check: nvidia/canary-1b-flash HF Transformers FastConformerModel shim (encoder only, 32 layers d_model=1024) — sizing differs but mel contract is shared",
      "status": "found",
      "detail": "NeMo source is authoritative. The 17-layer encoder + 4-decoder layout is unique to 180m-flash and is the most parameter-constrained variant in the family; encoder d_model is expected to be smaller than 1024 to fit 182M total params (Stage 2 will confirm)."
    }
  },
  "variants": [
    {
      "name": "canary-180m-flash",
      "memory_gb": 0.75,
      "files": ["canary-180m-flash.nemo"]
    }
  ],
  "config": {
    "architecture_candidates": ["encoder-decoder"],
    "key_fields": {
      "architectures": ["EncDecMultiTaskModel"],
      "model_type": "canary",
      "nemo_class": "nemo.collections.asr.models.EncDecMultiTaskModel",
      "encoder.type": "FastConformerEncoder",
      "encoder.n_layers": 17,
      "encoder.subsampling_factor": 8,
      "encoder.self_attention_model": "rel_pos",
      "decoder.type": "TransformerDecoder",
      "decoder.n_layers": 4,
      "tokenizer.type": "concatenated_sentencepiece",
      "task_tokens": ["<source_lang>", "<target_lang>", "<task>", "<pnc>", "<toggle_timestamps>"],
      "params_total": "182M",
      "max_audio_seconds": 40,
      "min_audio_seconds": 1
    },
    "varying_across_variants": [
      "encoder.n_layers",
      "encoder.d_model",
      "decoder.n_layers",
      "decoder.type",
      "tokenizer.vocab_size",
      "capabilities.languages",
      "capabilities.timestamps",
      "license"
    ]
  },
  "dtype": {
    "expected": "float32",
    "source": "manual",
    "evidence": "NeMo .nemo archive ships canary-180m-flash as float32 PyTorch state_dict (no safetensors). Peer variant canary-1b-flash's HF Transformers shim has config.torch_dtype=float32 and a safetensors header distribution F32=1260, I64=32 (zero non-F32 floating tensors); the family is consistently F32. Per project policy 2 the converter preserves storage dtype, so the first accuracy GGUF will be canary-180m-flash-F32.gguf.",
    "details": {
      "config_declared": null,
      "header_distribution": {}
    },
    "expected_f32_tensors": []
  },
  "frontend": {
    "sample_rate": 16000,
    "n_mels": 128,
    "hop_length": 160,
    "fft_size": 512,
    "window": "hann_periodic",
    "normalization": "per_feature",
    "preemphasis": 0.97,
    "dither": 0.0,
    "center": true,
    "padding_mode": "reflect",
    "mel_filterbank_norm": "slaney"
  },
  "tokenizer": {
    "type": "sentencepiece",
    "vocab_size": 0,
    "special_tokens": {},
    "has_language_tokens": true,
    "vocab_sha256": null
  },
  "capabilities": {
    "languages": ["en", "de", "es", "fr"],
    "language_detection": false,
    "translation": true,
    "timestamps": ["word", "segment"],
    "streaming": false,
    "speaker_diarization": false
  },
  "upstream_benchmarks": [
    {
      "dataset": "LibriSpeech test-clean",
      "language": "en",
      "metric": "wer",
      "score": 1.87,
      "score_unit": "percent",
      "source": "https://huggingface.co/nvidia/canary-180m-flash",
      "notes": "Open ASR Leaderboard, RTFx 1233 on A100"
    },
    {
      "dataset": "LibriSpeech test-other",
      "language": "en",
      "metric": "wer",
      "score": 3.83,
      "score_unit": "percent",
      "source": "https://huggingface.co/nvidia/canary-180m-flash",
      "notes": "Open ASR Leaderboard"
    },
    {
      "dataset": "MLS de",
      "language": "de",
      "metric": "wer",
      "score": 4.81,
      "score_unit": "percent",
      "source": "https://huggingface.co/nvidia/canary-180m-flash"
    },
    {
      "dataset": "MLS es",
      "language": "es",
      "metric": "wer",
      "score": 3.17,
      "score_unit": "percent",
      "source": "https://huggingface.co/nvidia/canary-180m-flash"
    },
    {
      "dataset": "MLS fr",
      "language": "fr",
      "metric": "wer",
      "score": 4.75,
      "score_unit": "percent",
      "source": "https://huggingface.co/nvidia/canary-180m-flash"
    },
    {
      "dataset": "FLEURS En->De",
      "language": null,
      "metric": "bleu",
      "score": 28.18,
      "score_unit": null,
      "source": "https://huggingface.co/nvidia/canary-180m-flash",
      "notes": "AST En->De"
    },
    {
      "dataset": "FLEURS De->En",
      "language": null,
      "metric": "bleu",
      "score": 32.08,
      "score_unit": null,
      "source": "https://huggingface.co/nvidia/canary-180m-flash",
      "notes": "AST De->En"
    },
    {
      "dataset": "FLEURS En->Fr",
      "language": null,
      "metric": "bleu",
      "score": 36.66,
      "score_unit": null,
      "source": "https://huggingface.co/nvidia/canary-180m-flash",
      "notes": "AST En->Fr"
    },
    {
      "dataset": "FLEURS En->Es",
      "language": null,
      "metric": "bleu",
      "score": 20.47,
      "score_unit": null,
      "source": "https://huggingface.co/nvidia/canary-180m-flash",
      "notes": "AST En->Es"
    }
  ],
  "reference_framework": "nemo",
  "reference_rationale": "NeMo (`nvidia/NeMo`) is NVIDIA's first-party training and inference framework for the Canary family. The HF repo for canary-180m-flash ships only a `.nemo` tar archive consumable by `nemo.collections.asr.models.EncDecMultiTaskModel.from_pretrained`; there is no Transformers modeling class (no config.json / preprocessor_config.json / safetensors on this repo). The full multitask AED with task-token decoder lives only in NeMo, and NeMo is the only framework that exposes the multitask prompt protocol consistently with how the model was trained.",
  "architecture_pattern": "encoder-decoder",
  "known_risks": [
    "Multitask AED with a task-token prompt fed into the transformer decoder before the BOS. The prompt sequence (`<source_lang>`, `<target_lang>`, `<task>` for asr/s2t_translation, `<pnc>`, `<toggle_timestamps>`) is not vocabulary tokens in the LM-head sense — they live inside the SentencePiece vocabulary at fixed IDs, but the *interpretation* by the decoder is positional. Mismatched prompt format silently swaps task semantics with no shape error.",
    "Concatenated SentencePiece tokenizers — one SP model per language is concatenated into a unified vocabulary. The SP IDs of language-specific pieces depend on the concatenation order. The converter must preserve the exact concatenation order or every multilingual transcription decodes to wrong piece IDs.",
    "FastConformer encoder uses depth-wise striding subsampling (factor 8). The 17-layer / smaller-d_model encoder of 180m-flash is the most parameter-constrained variant — exact d_model and ffn_dim must come from the .nemo archive at Stage 2 to size the C++ tensors correctly.",
    "Relative-position attention (`rel_pos`) with untied biases. Same risk as Parakeet — ggml has no first-class op; the existing parakeet port materialises the relative-shift host-side per layer. Canary can likely reuse that code path.",
    "NeMo FilterbankFeatures applies preemph=0.97 BEFORE windowing/STFT. Skipping this silently shifts the spectral tilt and degrades WER without changing shape.",
    "Per-feature normalization (mean/std across time, per mel band). Distinct from per-utterance global-mean-var; mismatch with reference is a common bring-up bug.",
    "Cross-attention from transformer decoder to encoder hidden states. Padding mask on the cross-attn keys must propagate from encoder input lengths after the FastConformer subsampling (factor 8).",
    "Greedy decoding (beam=1) is the model card example default. The first port should use beam=1 by default to match upstream's measured-config.",
    "Long-form audio (>40 s) is handled by a chunked inference script with 10-second chunks for 180m-flash. Not native streaming. Out of scope for the v1 port.",
    "Audio <1 s is symmetrically zero-padded to 1 s in the reference. The first port must replicate this padding floor or short clips drop off silently.",
    "Timestamps for canary-180m-flash are explicitly experimental (model card; F1=93.48% on LS test-clean at 200 ms collar). Out of scope for the v1 port.",
    ".nemo archive distribution — no `safetensors_index.json` / `config.json` / `preprocessor_config.json` to lean on. Loader needs to read NeMo's `model_config.yaml` from the tar; converter mirrors the parakeet pattern of unpacking the .nemo before extraction."
  ],
  "intake_gaps": [
    {
      "field": "config.key_fields",
      "reason": "encoder dimensions (d_model, n_heads, ffn_dim) for canary-180m-flash are not stated in the model card and the HF repo carries no config.json. Sizing must come from the .nemo archive's model_config.yaml at Stage 2; we can only assert encoder.n_layers=17 and decoder.n_layers=4 from the model card."
    },
    {
      "field": "tokenizer.vocab_size",
      "reason": "concatenated SP vocab size for the 4-language tokenizer is not on the model card; will be filled at Stage 2 from the .nemo reference dump."
    },
    {
      "field": "tokenizer.special_tokens",
      "reason": "BOS/EOS/PAD and task-token IDs (source_lang, target_lang, task, pnc, toggle_timestamps) live inside the .nemo archive's SP models + decoding cfg; will be filled at Stage 2."
    },
    {
      "field": "tokenizer.vocab_sha256",
      "reason": "concatenated SP models live inside .nemo at convert time; SHA can be computed during conversion but not yet recorded here."
    },
    {
      "field": "frontend.dither",
      "reason": "dither=0.0 is the NeMo inference default; training default is 1e-5. Stage 2 will confirm against model_config.yaml's preprocessor block."
    },
    {
      "field": "frontend.window",
      "reason": "hann_periodic is the NeMo FilterbankFeatures default (matches Parakeet and canary-1b-flash); .nemo cfg should be checked at Stage 2 for explicit window_type."
    },
    {
      "field": "frontend.n_mels",
      "reason": "n_mels=128 inherited from canary-1b-flash's preprocessor_config.json; the smaller 180m-flash variant *might* use a different n_mels — confirm at Stage 2."
    },
    {
      "field": "variants[].memory_gb",
      "reason": "estimated from .nemo file size (0.74 GB); not measured against actual peak inference memory."
    }
  ]
}
