[Bugfix][Model] Enable torch.compile for StableLM (#54969)
Signed-off-by: Djordje Ramic <djoramic@amd.com>
This commit is contained in:
@@ -29,6 +29,7 @@ import torch
|
||||
from torch import nn
|
||||
from transformers import StableLmConfig
|
||||
|
||||
from vllm.compilation.decorators import support_torch_compile
|
||||
from vllm.config import CacheConfig, VllmConfig
|
||||
from vllm.distributed import get_pp_group, get_tensor_model_parallel_world_size
|
||||
from vllm.model_executor.layers.activation import SiluAndMul
|
||||
@@ -213,6 +214,7 @@ class StablelmDecoderLayer(nn.Module):
|
||||
return hidden_states, residual
|
||||
|
||||
|
||||
@support_torch_compile
|
||||
class StableLMEpochModel(nn.Module):
|
||||
def __init__(self, *, vllm_config: VllmConfig, prefix: str = ""):
|
||||
super().__init__()
|
||||
|
||||
Reference in New Issue
Block a user