Repository: huggingface/transformers
Pull request: Fix spelling typos in comments and code

Fixes several spelling typos found in comments and code:

- 'paramter' → 'parameter' in qwen2_5_omni (2 files)
- 'patterms' → 'patterns' in core_model_loading
- 'actualy' → 'actually' in generation/utils
- 'orignal' → 'original' in xcodec
- 'wether' → 'whether' in xcodec

Changed files:
filename: src/transformers/core_model_loading.py
patch: @@ -145,7 +145,7 @@ def convert(
     ) -> dict[str, torch.Tensor]:
         target_pattern = self.get_target_pattern(target_patterns)
         all_tensors = []
-        # Very important to keep the relative order of the source patterms here, so we iterate over them not the
+        # Very important to keep the relative order of the source patterns here, so we iterate over them not the
         # input directly as it's unordered!
         for source_pattern in source_patterns:
             tensors = input_dict[source_pattern]

filename: src/transformers/generation/utils.py
patch: @@ -2415,7 +2415,7 @@ def generate(
                 raise NotImplementedError(
                     f"assistant_model is not supported for continuous batching. Got {assistant_model = }"
                 )
-            if streamer is not None:  # TODO: actualy this could be supported
+            if streamer is not None:  # TODO: actually this could be supported
                 raise NotImplementedError(f"streaming is not supported for continuous batching. Got {streamer = }")
             if negative_prompt_ids is not None:
                 raise NotImplementedError(

filename: src/transformers/models/qwen2_5_omni/modeling_qwen2_5_omni.py
patch: @@ -3937,7 +3937,7 @@ def generate(
                 - **Text** (`torch.Tensor`): Generated text token sequence.
                 - **Audio waveform** (`torch.Tensor`): Generated audio waveform.
         """
-        # check `False` on purpose because the paramter can be `str/bool`. This is needed for BC
+        # check `False` on purpose because the parameter can be `str/bool`. This is needed for BC
         generation_mode = kwargs.pop("generation_mode", None)
         return_audio = generation_mode != "text" and generation_mode is not False
 

filename: src/transformers/models/qwen2_5_omni/modular_qwen2_5_omni.py
patch: @@ -4096,7 +4096,7 @@ def generate(
                 - **Text** (`torch.Tensor`): Generated text token sequence.
                 - **Audio waveform** (`torch.Tensor`): Generated audio waveform.
         """
-        # check `False` on purpose because the paramter can be `str/bool`. This is needed for BC
+        # check `False` on purpose because the parameter can be `str/bool`. This is needed for BC
         generation_mode = kwargs.pop("generation_mode", None)
         return_audio = generation_mode != "text" and generation_mode is not False
 

filename: src/transformers/models/xcodec/modeling_xcodec.py
patch: @@ -516,7 +516,7 @@ def encode(
         e_semantic_input = self._extract_semantic_features(input_values).detach()
         e_semantic = self.encoder_semantic(e_semantic_input.transpose(1, 2))
 
-        # orignal codebase infer to get the output length, but we can directly infer it
+        # original codebase infer to get the output length, but we can directly infer it
         # from the model and know whether we should pad
         if self._get_conv1d_output_lengths(input_values.shape[2], self.acoustic_encoder) != e_semantic.shape[2]:
             e_acoustic = self.acoustic_encoder(F.pad(input_values, (self.pad, self.pad)))