File tree Expand file tree Collapse file tree 4 files changed +8
-0
lines changed
vllm/model_executor/models Expand file tree Collapse file tree 4 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 55from torch import nn
66
77from vllm .attention import Attention , AttentionMetadata
8+ from vllm .compilation .decorators import support_torch_compile
89from vllm .config import CacheConfig
910from vllm .distributed import (get_pp_group , get_tensor_model_parallel_rank ,
1011 get_tensor_model_parallel_world_size ,
@@ -360,6 +361,7 @@ def forward(
360361 return hidden_states
361362
362363
364+ @support_torch_compile
363365class ArcticModel (nn .Module ):
364366
365367 def __init__ (
Original file line number Diff line number Diff line change 2828from transformers import MixtralConfig
2929
3030from vllm .attention import Attention , AttentionMetadata
31+ from vllm .compilation .decorators import support_torch_compile
3132from vllm .config import CacheConfig , LoRAConfig
3233from vllm .distributed import get_pp_group , get_tensor_model_parallel_world_size
3334from vllm .model_executor .layers .fused_moe import FusedMoE
@@ -245,6 +246,7 @@ def forward(
245246 return hidden_states , residual
246247
247248
249+ @support_torch_compile
248250class MixtralModel (nn .Module ):
249251
250252 def __init__ (
Original file line number Diff line number Diff line change 1717from transformers import PretrainedConfig
1818
1919from vllm .attention import Attention , AttentionMetadata
20+ from vllm .compilation .decorators import support_torch_compile
2021from vllm .config import CacheConfig
2122from vllm .distributed import get_pp_group , get_tensor_model_parallel_world_size
2223from vllm .model_executor .layers .fused_moe import FusedMoE
@@ -239,6 +240,7 @@ def forward(
239240 return hidden_states , residual
240241
241242
243+ @support_torch_compile
242244class OlmoeModel (nn .Module ):
243245
244246 def __init__ (
Original file line number Diff line number Diff line change 2828from transformers .configuration_utils import PretrainedConfig
2929
3030from vllm .attention import Attention , AttentionMetadata
31+ from vllm .compilation .decorators import support_torch_compile
3132from vllm .config import CacheConfig , LoRAConfig
3233from vllm .distributed import get_pp_group , get_tensor_model_parallel_world_size
3334from vllm .model_executor .layers .fused_moe import FusedMoE
@@ -429,6 +430,7 @@ def forward(
429430 return hidden_states , residual
430431
431432
433+ @support_torch_compile
432434class PhiMoEModel (nn .Module ):
433435
434436 def __init__ (
You can’t perform that action at this time.
0 commit comments