vllm.model_executor.models.interns1_vit
¶
Classes:
-
InternS1VisionEmbeddings– -
InternSdpaAttention–Multi-headed attention from 'Attention Is All You Need' paper.
InternS1VisionEmbeddings
¶
Bases: Module
Methods:
-
interpolate_pos_encoding–This method allows to interpolate the pre-trained position encodings, to be able to use the model on higher resolution
interpolate_pos_encoding(embeddings, height, width)
¶
This method allows to interpolate the pre-trained position encodings, to be able to use the model on higher resolution images. This method is also adapted to support torch.jit tracing.
Adapted from: - https://github.com/facebookresearch/dino/blob/de9ee3df6cf39fac952ab558447af1fa1365362a/vision_transformer.py#L174-L194, and - https://github.com/facebookresearch/dinov2/blob/e1277af2ba9496fbadf7aec6eba56e8d882d1e35/dinov2/models/vision_transformer.py#L179-L211