Skip to content

Commit 129dbb9

Browse files
ml0mbardiecharlaixnikita-savelyevv
authored
Fix typos (#1508)
* chore: Fix typos * Update optimum/intel/openvino/modeling_visual_language.py Co-authored-by: Nikita Savelyev <[email protected]> --------- Co-authored-by: Ella Charlaix <[email protected]> Co-authored-by: Nikita Savelyev <[email protected]>
1 parent d8ec306 commit 129dbb9

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

optimum/exporters/openvino/model_patcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def _update_causal_mask_patched(
117117

118118
dtype, device = input_tensor.dtype, input_tensor.device
119119
# difference with original modeling
120-
# using minimum from dtype with larger bandwith (floa32) may lead to overflow
120+
# using minimum from dtype with larger bandwidth (float32) may lead to overflow
121121
# during execution on platforms with default lower precision (bfloat16, float16)
122122
min_dtype = torch.finfo(torch.float16).min
123123

@@ -2097,7 +2097,7 @@ def _dbrx_update_causal_mask(
20972097

20982098
dtype, device = input_tensor.dtype, input_tensor.device
20992099
# difference with original modeling
2100-
# using minimum from dtype with larger bandwith (floa32) may lead to overflow
2100+
# using minimum from dtype with larger bandwidth (float32) may lead to overflow
21012101
# during execution on platforms with default lower precision (bfloat16, float16)
21022102
min_dtype = torch.finfo(torch.float16).min
21032103
sequence_length = input_tensor.shape[1]

optimum/intel/openvino/modeling_visual_language.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ def prepare_inputs_for_generation(
916916
"image_grid_thw": kwargs.get("image_grid_thw"),
917917
"video_grid_thw": kwargs.get("video_grid_thw"),
918918
"token_type_ids": kwargs.get("token_type_ids"),
919-
"pixel_attetion_mask": kwargs.get("pixle_attetion_mask"),
919+
"pixel_attention_mask": kwargs.get("pixel_attention_mask"),
920920
"image_attention_mask": kwargs.get("image_attention_mask"),
921921
"input_audio_embeds": kwargs.get("input_audio_embeds", kwargs.get("audio_input_features")),
922922
"audio_embed_sizes": kwargs.get("audio_embed_sizes"),
@@ -1850,7 +1850,7 @@ def load_image(image, input_size=448, max_num=12):
18501850
inputs.update(tokenizer(text, return_tensors="pt"))
18511851
return inputs
18521852

1853-
# internvl has issue with check _get_non_default_parameters, as wrkaraund overide _prepare_generation_config
1853+
# internvl has issue with check _get_non_default_parameters, as wrkaraund override _prepare_generation_config
18541854
def _prepare_generation_config(
18551855
self, generation_config: Optional[GenerationConfig], use_model_defaults: Optional[bool] = None, **kwargs: Dict
18561856
) -> Tuple[GenerationConfig, Dict]:

optimum/intel/utils/modeling_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ def get_model_device(model: torch.nn.Module) -> torch.device:
6565

6666
def recursive_to_device(value, device):
6767
"""
68-
Recursivley move the tensor element in `value` to `device`
68+
Recursively move the tensor element in `value` to `device`
6969
"""
7070
if isinstance(value, (tuple, list)):
7171
return type(value)(recursive_to_device(v, device) for v in value)

0 commit comments

Comments
 (0)