diff --git a/nemo/collections/common/tokenizers/sentencepiece_tokenizer.py b/nemo/collections/common/tokenizers/sentencepiece_tokenizer.py index 3e83587871ff..b22cc7f6b393 100644 --- a/nemo/collections/common/tokenizers/sentencepiece_tokenizer.py +++ b/nemo/collections/common/tokenizers/sentencepiece_tokenizer.py @@ -261,8 +261,8 @@ def vocab(self): class SentencePieceSpeechLLMTTSTokenizer(SentencePieceTokenizer): - """ Used in T5TTS to add phoneme tokens - """ + """Used in T5TTS to add phoneme tokens""" + def add_phone_tokens_to_special_tokens(self): for i, word in enumerate(self.vocab): if word.startswith("p{"): diff --git a/nemo/collections/nlp/modules/common/megatron/token_level_encoder_decoder.py b/nemo/collections/nlp/modules/common/megatron/token_level_encoder_decoder.py index 58d568e636e5..1177839cdfae 100644 --- a/nemo/collections/nlp/modules/common/megatron/token_level_encoder_decoder.py +++ b/nemo/collections/nlp/modules/common/megatron/token_level_encoder_decoder.py @@ -723,8 +723,8 @@ def load_state_dict(self, state_dict, strict=True): class MegatronTokenLevelEncoderDecoderSpeechLLMModule(MegatronTokenLevelEncoderDecoderModule): - """ A subclass of MegatronTokenLevelEncoderDecoderModule that adds support for speech token input and output - """ + """A subclass of MegatronTokenLevelEncoderDecoderModule that adds support for speech token input and output""" + def __init__(self, *args, **kwargs): super(MegatronTokenLevelEncoderDecoderSpeechLLMModule, self).__init__(*args, **kwargs) # Overridden in MegatronT5SpeechLMModel constructor