Spaces:
Runtime error
Runtime error
File size: 2,240 Bytes
0c8d55e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
from transformers.models.qwen2_5_vl import modeling_qwen2_5_vl
import torch
class CompiledQwen2_5_VLVisionBlock(modeling_qwen2_5_vl.Qwen2_5_VLVisionBlock):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@torch.compile
def forward(self, *args, **kwargs):
return super().forward(*args, **kwargs)
class CompiledQwen2_5_VLPatchMerger(modeling_qwen2_5_vl.Qwen2_5_VLPatchMerger):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@torch.compile
def forward(self, *args, **kwargs):
return super().forward(*args, **kwargs)
class CompiledQwen2_5_VLDecoderLayer(modeling_qwen2_5_vl.Qwen2_5_VLDecoderLayer):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@torch.compile
def forward(self, *args, **kwargs):
return super().forward(*args, **kwargs)
class CompiledQwen2_5_VLRotaryEmbedding(modeling_qwen2_5_vl.Qwen2_5_VLRotaryEmbedding):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@torch.compile
def forward(self, *args, **kwargs):
return super().forward(*args, **kwargs)
class CompiledQwen2_5_VisionRotaryEmbedding(modeling_qwen2_5_vl.Qwen2_5_VisionRotaryEmbedding):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@torch.compile
def forward(self, *args, **kwargs):
return super().forward(*args, **kwargs)
class CompiledQwen2_5_VisionPatchEmbed(modeling_qwen2_5_vl.Qwen2_5_VisionPatchEmbed):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
@torch.compile
def forward(self, *args, **kwargs):
return super().forward(*args, **kwargs)
modeling_qwen2_5_vl.Qwen2_5_VLVisionBlock = CompiledQwen2_5_VLVisionBlock
modeling_qwen2_5_vl.Qwen2_5_VLPatchMerger = CompiledQwen2_5_VLPatchMerger
modeling_qwen2_5_vl.Qwen2_5_VLDecoderLayer = CompiledQwen2_5_VLDecoderLayer
modeling_qwen2_5_vl.Qwen2_5_VLRotaryEmbedding = CompiledQwen2_5_VLRotaryEmbedding
modeling_qwen2_5_vl.Qwen2_5_VisionRotaryEmbedding = CompiledQwen2_5_VisionRotaryEmbedding
modeling_qwen2_5_vl.Qwen2_5_VisionPatchEmbed = CompiledQwen2_5_VisionPatchEmbed |