Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions examples/speechlm2/conf/duplex_eartts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ model:
pretrained_audio_codec: ??? # to be released
pretrained_tts_model: null
scoring_asr: stt_en_fastconformer_transducer_large # used only in validation/evaluation
trust_remote_code: true

# Regexp (re.compile) patterns matching parameters to be frozen.
freeze_params:
Expand Down
1 change: 1 addition & 0 deletions examples/speechlm2/conf/duplex_stt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ model:
scoring_asr: stt_en_fastconformer_transducer_large # used only in validation/evaluation

pretrained_weights: True # When False, we use pretrained_name to load the architecture, but with random init
trust_remote_code: true

prevent_freeze_params: [] # Use to make specific submodules trainable; overrides freeze_params

Expand Down
2 changes: 1 addition & 1 deletion nemo/collections/speechlm2/models/duplex_ear_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def __init__(self, cfg: dict) -> None:
self.tokenizer = AutoTokenizer(
self.cfg.pretrained_lm_name,
use_fast=True,
trust_remote_code=True,
trust_remote_code=self.cfg.get("trust_remote_code", False),
bos_token=self.cfg.get("bos_token", None),
eos_token=self.cfg.get("eos_token", None),
pad_token=self.cfg.get("pad_token", None),
Expand Down
2 changes: 1 addition & 1 deletion nemo/collections/speechlm2/models/duplex_stt_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def __init__(self, cfg: dict) -> None:
llm = load_pretrained_hf(
self.cfg.pretrained_llm,
pretrained_weights=self.cfg.pretrained_weights,
trust_remote_code=self.cfg.get("trust_remote_code", True),
trust_remote_code=self.cfg.get("trust_remote_code", False),
).train()

# Initialize tokenizer with optional special tokens from config
Expand Down
1 change: 1 addition & 0 deletions tests/collections/speechlm2/test_duplex_eartts.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"pretrained_lm_name": "nvidia/NVIDIA-Nemotron-Nano-9B-v2",
"pretrained_ae_dir": None,
"pretrained_tts_model": None,
"trust_remote_code": True,
"scoring_asr": "stt_en_fastconformer_transducer_large",
"freeze_params": [
r"^audio_codec\..+$", # Keep audio codec frozen as it only provides supervision for training.
Expand Down
1 change: 1 addition & 0 deletions tests/collections/speechlm2/test_duplex_stt.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def create_model(
"model": {
**resolve_pretrained_models(),
"pretrained_weights": False,
"trust_remote_code": True,
"audio_loss_weight": 1,
"text_loss_weight": 3,
"source_sample_rate": 16000,
Expand Down
Loading