mstar.model.vjepa2.components.rope_utils#
3D rotary position embedding helpers for V-JEPA 2.
Ported verbatim from HuggingFace transformers/models/vjepa2/modeling_vjepa2.py
and upstream vjepa2/src/models/utils/modules.py. Both copies share the
same frequency schedule and the same “duplicate then rotate adjacent pair”
construction noted in the upstream comment as a pretraining-compatibility
quirk. Do not “fix” the .repeat(…, 2) to .repeat_interleave(2) — it
would break the pretrained weights.
Functions
|
Apply rotary embeddings along the last |
|