Video-Text-to-Text
Transformers
Safetensors
English
videollama3_qwen2
text-generation
multi-modal
large-language-model
video-language-model
custom_code
Instructions to use cbipok/VideoLLaMA3-2B-fork with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cbipok/VideoLLaMA3-2B-fork with Transformers:
# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("cbipok/VideoLLaMA3-2B-fork", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_videollama3.py
Browse files- modeling_videollama3.py +1 -1
modeling_videollama3.py
CHANGED
|
@@ -286,7 +286,7 @@ class Videollama3MetaForCausalLM(ABC):
|
|
| 286 |
|
| 287 |
# 2. embed visual tokens
|
| 288 |
batched_num_patches = grid_sizes.prod(dim=1).div(merge_sizes ** 2).long()
|
| 289 |
-
mm_features = self.encode_images(pixel_values, grid_sizes, merge_sizes)
|
| 290 |
mm_features = self._get_valid_visual_tokens(mm_features, batched_num_patches, modals)
|
| 291 |
|
| 292 |
compression_mask = self._get_compression_mask(
|
|
|
|
| 286 |
|
| 287 |
# 2. embed visual tokens
|
| 288 |
batched_num_patches = grid_sizes.prod(dim=1).div(merge_sizes ** 2).long()
|
| 289 |
+
mm_features = self.encode_images(pixel_values, grid_sizes, merge_sizes).to(input_ids.device)
|
| 290 |
mm_features = self._get_valid_visual_tokens(mm_features, batched_num_patches, modals)
|
| 291 |
|
| 292 |
compression_mask = self._get_compression_mask(
|