vllm_gaudi.models.pixtral
¶
HPUAttention
¶
Bases: Attention
Source code in vllm_gaudi/models/pixtral.py
__init__
¶
Source code in vllm_gaudi/models/pixtral.py
forward
¶
Source code in vllm_gaudi/models/pixtral.py
HPUPixtralForConditionalGeneration
¶
Bases: PixtralForConditionalGeneration
Source code in vllm_gaudi/models/pixtral.py
HPUTransformer
¶
Bases: Module
Source code in vllm_gaudi/models/pixtral.py
HPUTransformerBlock
¶
Bases: TransformerBlock
Source code in vllm_gaudi/models/pixtral.py
HPUVisionTransformer
¶
Bases: VisionTransformer
Source code in vllm_gaudi/models/pixtral.py
__init__
¶
forward
¶
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
images
|
list[Tensor]
|
list of N_img images of variable sizes, each of shape (C, H, W) |
required |
Returns: image_features: tensor of token features for all tokens of all images of shape (N_toks, D)
Source code in vllm_gaudi/models/pixtral.py
apply_hpu_rotary_emb_vit
¶
apply_hpu_rotary_emb_vit(
query: Tensor, key: Tensor, cos_sin_cache: Tensor
) -> tuple[Tensor, Tensor]
Source code in vllm_gaudi/models/pixtral.py
precompute_freqs_real_2d
¶
2D complex tensor of shape (height, width, dim // 2)
to be indexed by (height, width) position tuples