llama4 video support - #2942
Conversation
|
@awasthiabhijeet has exported this pull request. If you are a Meta employee, you can view the originating Diff in D89577119. |
|
@awasthiabhijeet has imported this pull request. If you are a Meta employee, you can view this in D89577119. |
Summary: Adds video processing support to the Llama4 model by extending the existing vision encoder infrastructure to handle video content. It introduces video-specific special tokens (<|video|>, <|vid_start|>, <|vid_end|>, <|vid_frame_separator|>) in the tokenizer, implements a new transform_video() method that processes video clips as sequences of frames through the existing image transform pipeline, and registers a "video" encoder in the EarlyFusionModel that reuses the vision encoder while maintaining separate tokenization paths for images and videos. (Used HF implementation as a reference to ensure consistent changes in _tokenizer.py) Reviewed By: felipemello1 Differential Revision: D89577119 Pulled By: awasthiabhijeet
1b95438 to
3a2b526
Compare
|
Hi @awasthiabhijeet! Thank you for your pull request. We require contributors to sign our Contributor License Agreement, and yours needs attention. You currently have a record in our system, but the CLA is no longer valid, and will need to be resubmitted. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks! |
Summary:
Adds video processing support to the Llama4 model by extending the existing vision encoder infrastructure to handle video content. It introduces video-specific special tokens (<|video|>, <|vid_start|>, <|vid_end|>, <|vid_frame_separator|>) in the tokenizer, implements a new transform_video() method that processes video clips as sequences of frames through the existing image transform pipeline, and registers a "video" encoder in the EarlyFusionModel that reuses the vision encoder while maintaining separate tokenization paths for images and videos.
(Used HF implementation as a reference to ensure consistent changes in _tokenizer.py)
Differential Revision: D89577119