Fix Typos in Comments: "quantitation" → "quantization", "averege" → "average" (#38766)

* Update convert_llama4_weights_to_hf.py

* Update modeling_visual_bert.py
This commit is contained in:
leopardracer 2025-06-12 17:04:39 +03:00 committed by GitHub
parent 6a5fd0c6d2
commit 910355a010
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -421,7 +421,7 @@ def write_model(
tqdm.write(f"Processing: {key.ljust(50)} ->\t {v}, {values.shape}")
state_dict[v] = values
elif _OFFLINE_QUANT_COMPATIBLE and "feed_forward.experts." in new_key:
# for experts, we need to split expert for offline quantiation purpose and don't need to fuse
# for experts, we need to split expert for offline quantization purpose and don't need to fuse
expert_lists = []
for k in current_parameter:
expert_lists.append(

View File

@ -131,7 +131,7 @@ class VisualBertEmbeddings(nn.Module):
visual_position_embeddings *= image_text_alignment_mask.to(dtype=dtype).unsqueeze(-1)
visual_position_embeddings = visual_position_embeddings.sum(2)
# We want to averge along the alignment_number dimension.
# We want to average along the alignment_number dimension.
image_text_alignment_mask = image_text_alignment_mask.to(dtype=dtype).sum(2)
if (image_text_alignment_mask == 0).sum() != 0: