From 01c58302d36755e4f9750b26a9ee3ed4000b29b0 Mon Sep 17 00:00:00 2001 From: Albert Villanova del Moral <8515462+albertvillanova@users.noreply.github.com> Date: Wed, 25 Nov 2026 17:45:46 +0000 Subject: [PATCH] Draw the fused LM head VLM test labels within the head's output size --- tests/test_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_utils.py b/tests/test_utils.py index 58514739fea..fae5dbaefda 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -2072,7 +2072,8 @@ def _setup_vlm(self, model_id): add_fused_lm_head(chunked_model) B, S = 2, 16 - vocab_size = ref_model.config.text_config.vocab_size + # Inkling 2's head outputs unpadded_vocab_size < vocab_size logits (#8590) + vocab_size = ref_model.get_output_embeddings().out_features input_ids = torch.randint(0, vocab_size, (B, S), device=torch_device) labels = input_ids.clone() labels[:, :4] = -100