Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ae5779e
feat(parakeet): add Parakeet TDT support
JiaxinD Aug 27, 2026
c222ee2
fix(parakeet): harden checkpoint and runtime contracts
JiaxinD Aug 31, 2026
a1f10df
style(parakeet): apply runtime formatting
JiaxinD Aug 31, 2026
a11829d
fix(parakeet): validate mel geometry and platform support
JiaxinD Aug 31, 2026
de2aa6e
test(catalog): refresh aggregate inventory counts
JiaxinD Sep 1, 2026
07b2b34
test(perf): refresh release row counts
JiaxinD Sep 1, 2026
5ea38bc
test(parakeet): isolate release reference contract
JiaxinD Sep 17, 2026
3c8931e
refactor(parakeet): port family builder contracts
JiaxinD Sep 18, 2026
764c8dc
refactor(parakeet): port native audio contracts
JiaxinD Sep 18, 2026
e975783
Merge remote-tracking branch 'upstream/main' into wip/parakeet-family…
JiaxinD Sep 18, 2026
1b5e004
refactor(parakeet): port native transcription
JiaxinD Sep 19, 2026
f4bbc2e
Merge remote-tracking branch 'upstream/main' into wip/parakeet-family…
JiaxinD Sep 19, 2026
816b0a7
fix(parakeet): validate native tokenizer contract
JiaxinD Sep 20, 2026
1c69155
test(parakeet): migrate public SDK parity workflow
JiaxinD Sep 20, 2026
9a8e09f
refactor(parakeet): integrate family-local runtime
JiaxinD Sep 20, 2026
c4fff4d
fix(parakeet): satisfy current family contracts
JiaxinD Sep 20, 2026
119c879
fix(parakeet): declare performance qualification gap
JiaxinD Sep 20, 2026
d1b28ee
fix(parakeet): build SDK consumer in GPU E2E
JiaxinD Sep 21, 2026
30f56f6
chore: integrate upstream qualification migration
JiaxinD Sep 24, 2026
12060d4
fix(parakeet): generate probes outside source tree
JiaxinD Sep 25, 2026
eb973bc
Merge remote-tracking branch 'upstream/main' into feat/parakeet-tdt-0…
JiaxinD Sep 30, 2026
d31e224
chore(parakeet): integrate upstream embedding profile
JiaxinD Oct 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions families/parakeet_tdt/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Parakeet TDT 0.6B v3

This family targets the native Hugging Face Transformers checkpoint
`nvidia/parakeet-tdt-0.6b-v3` at revision
`541d1f99c6b0c3cd0b11a95167540bb8edefd82b` (publisher license: CC BY 4.0).
It exposes the public `SpeechTranscription` Task for one audio request at a time,
with FP16 or FP32 TensorRT engines and a fixed 30-second input window. Runtime
input accepts interleaved PCM, downmixes channels, and resamples to 16 kHz.
Longer audio, language controls, streaming, quantization and multi-GPU execution
are rejected or not exposed. NeMo archives are not a build input for this port.

The migration has CPU contract coverage; GPU conversion and transcript parity
remain unverified. Do not interpret the presence of the manifest as qualification.

## Validation

Install this family's `requirements.txt` in its isolated build/reference
environment. The pinned Transformers version provides `AutoModelForTDT`, which
is not available in the repository's base Transformers 5.2.0 environment.

Build with `TRTMC_BUILD_TESTS=ON` to produce `test_parakeet_tdt_sdk_cpp`.
After caching the pinned Hugging Face snapshot, select the E2E explicitly:

```sh
TRTMC_RUNTIME_ROOT=/path/to/runtime \
TRTMC_NATIVE_BUILD_DIR=/path/to/native/build \
PYTHONPATH=core/builder:. python -m pytest families/parakeet_tdt/tests/test_e2e.py \
--e2e-testcase parakeet-tdt-0.6b-v3 -v
```

`--e2e-model parakeet_tdt` selects all eight audio cases. An explicit selection
fails when dependencies, artifacts or CUDA are unavailable; an ordinary CPU
test run reports these E2Es as skipped. The test invokes the public C++ SDK
consumer, records native/reference evidence, and requires exact transcript
agreement after the original case/whitespace normalization. It does not relax
the old PR's exact-transcript gate to a shape-only or approximate comparison.

`TRTMC_PARAKEET_TDT_MODEL_DIR` may point to a prepared copy of that same pinned
snapshot. Record its provenance when using the override. The tests do not
download model weights automatically. Audio fixture generation is family-local.
4 changes: 4 additions & 0 deletions families/parakeet_tdt/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

"""Family-owned Parakeet TDT implementation."""
31 changes: 31 additions & 0 deletions families/parakeet_tdt/checkpoint.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

"""Checkpoint readers and tensor normalization for Parakeet TDT."""

from __future__ import annotations

import numpy as np


class WeightDict(dict):
"""Normalized family-owned build tensors."""


def _array(value) -> np.ndarray:
if hasattr(value, "detach"):
value = value.detach().cpu().numpy()
return np.ascontiguousarray(np.asarray(value, dtype=np.float32))


def _transpose(value) -> np.ndarray:
array = _array(value)
if array.ndim != 2:
raise ValueError(f"expected rank-2 weight, got {array.shape}")
return np.ascontiguousarray(array.T)


def _transpose_2d(value, name: str, precision: str = "fp32") -> np.ndarray:
"""Family graph-builder adapter with the repository's mapper signature."""
del name, precision
return _transpose(value)
97 changes: 97 additions & 0 deletions families/parakeet_tdt/config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

"""Typed configuration for the pinned Parakeet TDT checkpoint contract."""

from __future__ import annotations

import json
from dataclasses import dataclass
from pathlib import Path


@dataclass(frozen=True)
class ParakeetTDTConfig:
model_type: str
architectures: tuple[str, ...]
vocab_size: int
blank_id: int
pad_id: int
durations: tuple[int, ...]
max_symbols_per_step: int
encoder_hidden_size: int
encoder_layers: int
encoder_heads: int
encoder_ffn_size: int
encoder_conv_kernel_size: int
encoder_max_positions: int
num_mel_bins: int
subsampling_channels: int
subsampling_factor: int
decoder_hidden_size: int
decoder_layers: int
joint_activation: str
raw: dict

@classmethod
def from_json(cls, text: str) -> "ParakeetTDTConfig":
raw = json.loads(text)
enc = raw.get("encoder_config") or {}
return cls(
model_type=str(raw.get("model_type", "")),
architectures=tuple(str(item) for item in raw.get("architectures", ())),
vocab_size=int(raw.get("vocab_size", 0)),
blank_id=int(raw.get("blank_token_id", -1)),
pad_id=int(raw.get("pad_token_id", -1)),
durations=tuple(int(item) for item in raw.get("durations", ())),
max_symbols_per_step=int(raw.get("max_symbols_per_step", 0)),
encoder_hidden_size=int(enc.get("hidden_size", 0)),
encoder_layers=int(enc.get("num_hidden_layers", 0)),
encoder_heads=int(enc.get("num_attention_heads", 0)),
encoder_ffn_size=int(enc.get("intermediate_size", 0)),
encoder_conv_kernel_size=int(enc.get("conv_kernel_size", 0)),
encoder_max_positions=int(enc.get("max_position_embeddings", 0)),
num_mel_bins=int(enc.get("num_mel_bins", 0)),
subsampling_channels=int(enc.get("subsampling_conv_channels", 0)),
subsampling_factor=int(enc.get("subsampling_factor", 0)),
decoder_hidden_size=int(raw.get("decoder_hidden_size", 0)),
decoder_layers=int(raw.get("num_decoder_layers", 0)),
joint_activation=str(raw.get("hidden_act", "")),
raw=raw,
)

@classmethod
def from_dir(cls, model_dir: str | Path) -> "ParakeetTDTConfig":
config_path = Path(model_dir) / "config.json"
if not config_path.is_file():
raise FileNotFoundError(
f"Parakeet TDT model directory is missing config.json: {config_path}"
)
return cls.from_json(config_path.read_text(encoding="utf-8"))

def validate_supported_checkpoint(self) -> None:
expected = {
"model_type": (self.model_type, "parakeet_tdt"),
"architecture": (self.architectures, ("ParakeetForTDT",)),
"vocab_size": (self.vocab_size, 8193),
"blank_token_id": (self.blank_id, 8192),
"durations": (self.durations, (0, 1, 2, 3, 4)),
"encoder_hidden_size": (self.encoder_hidden_size, 1024),
"encoder_layers": (self.encoder_layers, 24),
"encoder_heads": (self.encoder_heads, 8),
"encoder_ffn_size": (self.encoder_ffn_size, 4096),
"encoder_conv_kernel_size": (self.encoder_conv_kernel_size, 9),
"num_mel_bins": (self.num_mel_bins, 128),
"subsampling_factor": (self.subsampling_factor, 8),
"decoder_hidden_size": (self.decoder_hidden_size, 640),
"decoder_layers": (self.decoder_layers, 2),
"joint_activation": (self.joint_activation, "relu"),
"max_symbols_per_step": (self.max_symbols_per_step, 10),
}
mismatches = [
f"{name}={actual!r}, expected {wanted!r}"
for name, (actual, wanted) in expected.items()
if actual != wanted
]
if mismatches:
raise ValueError("Unsupported Parakeet TDT checkpoint contract: " + "; ".join(mismatches))
Loading
Loading