Repository: open-compass/VLMEvalKit
Issue: Llama4 potential inference bug
Root cause: Algorithmic Error

```
Traceback (most recent call last):
  File "/opt/hpcaas/.mounts/fs-0663e2d3c38211883/home/hoangpv/VLMEvalKit/run.py", line 375, in main
    model = infer_data_job(
  File "/opt/hpcaas/.mounts/fs-0663e2d3c38211883/home/hoangpv/VLMEvalKit/vlmeval/inference.py", line 206, in infer_data_job
    model = infer_data(
  File "/opt/hpcaas/.mounts/fs-0663e2d3c38211883/home/hoangpv/VLMEvalKit/vlmeval/inference.py", line 169, in infer_data
    response = model.generate(message=struct, dataset=dataset_name)
  File "/opt/hpcaas/.mounts/fs-0663e2d3c38211883/home/hoangpv/VLMEvalKit/vlmeval/vlm/base.py", line 116, in generate
    return self.generate_inner(message, dataset)
  File "/opt/hpcaas/.mounts/fs-0663e2d3c38211883/home/hoangpv/VLMEvalKit/vlmeval/vlm/llama4.py", line 282, in generate_inner
    return self.generate_inner_transformers(message, dataset=dataset)
  File "/opt/hpcaas/.mounts/fs-0663e2d3c38211883/home/hoangpv/VLMEvalKit/vlmeval/vlm/llama4.py", line 192, in generate_inner_transformers
    outputs = self.model.generate(**inputs, max_new_tokens=max_new_tokens)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
    return func(*args, **kwargs)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/transformers/generation/utils.py", line 2597, in generate
    result = self._sample(
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/transformers/generation/utils.py", line 3557, in _sample
    outputs = self(**model_inputs, return_dict=True)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/accelerate/hooks.py", line 175, in new_forward
    output = module._old_forward(*args, **kwargs)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/transformers/models/llama4/modeling_llama4.py", line 1652, in forward
    outputs = self.language_model(
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/transformers/utils/generic.py", line 969, in wrapper
    output = func(self, *args, **kwargs)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/transformers/models/llama4/modeling_llama4.py", line 936, in forward
    outputs = self.model(
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1751, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1762, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/transformers/utils/generic.py", line 969, in wrapper
    output = func(self, *args, **kwargs)
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/transformers/models/llama4/modeling_llama4.py", line 578, in forward
    causal_mask, chunk_causal_mask = self._update_causal_mask(
  File "/home/hoangpv/miniconda3/envs/torch/lib/python3.10/site-packages/transformers/models/llama4/modeling_llama4.py", line 739, in _update_causal_mask
    chunked_attention_mask = chunked_attention_mask * local_attention_mask[:, None, None, :]
RuntimeError: The size of tensor a (8192) must match the size of tensor b (8693) at non-singleton dimension 5
```