mirror of
https://github.com/huggingface/transformers.git
synced 2025-07-31 10:12:23 +06:00
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:
parent
6a5fd0c6d2
commit
910355a010
@ -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(
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user