Skip to content

feat: constrain Nemotron automatic language detection - #168

Open
luantak wants to merge 1 commit into
handy-computer:mainfrom
luantak:feat/nemotron-language-allowlist
Open

luantak wants to merge 1 commit into
handy-computer:mainfrom
luantak:feat/nemotron-language-allowlist

Conversation

@luantak

@luantak luantak commented Sep 23, 2026 •

Copy link
Copy Markdown

Summary

Add a generic allowed_languages run option for automatic Nemotron language detection. The RNNT decoder masks language-control token IDs outside the allowlist at every selection step, including later streaming steps. An empty list leaves automatic detection unrestricted; an explicit language keeps the existing forced-language path.

Scope

  • Append the option to the public C run parameters and regenerate ABI declarations for Rust, Python, and TypeScript.
  • Resolve advertised language codes to token IDs and apply the mask only to language-control tokens.
  • Pass the option through the safe Rust wrapper and preserve streaming parameter lifetimes.
  • Add focused decoder, API, stream validation, and optional real-model streaming tests.
  • Dependent Handy integration: feat: constrain automatic language detection from the language picker cjpais/Handy#2138.

AI Assistance

Codex assisted with the implementation. I tested this e2e with my handy app checkout locally.

Validation

  • scripts/ci/clang-format.sh --check passed.
  • Focused CTest targets passed: API smoke, language-mask unit, and Parakeet stream validation.
  • transcribe_nemotron_allowlist_real_stream passed with the Nemotron 3.5 ASR Streaming Q8_0 GGUF.
  • Rust safe-wrapper library and no-model tests passed against the local native build.
  • Binding generators and ABI checks passed.
  • The complete CTest suite still needs to run after all test targets are built; the current local build contains only the targeted binaries.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant