From 281977bd6eccade50be461f5a22cc51b74006976 Mon Sep 17 00:00:00 2001 From: Michael Goin Date: Fri, 26 Jul 2024 17:32:44 -0400 Subject: [PATCH] [Doc] Add Nemotron to supported model docs (#6843) --- docs/source/models/supported_models.rst | 4 ++++ vllm/model_executor/layers/activation.py | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/source/models/supported_models.rst b/docs/source/models/supported_models.rst index dc8bd6fb245df..483f552bba238 100644 --- a/docs/source/models/supported_models.rst +++ b/docs/source/models/supported_models.rst @@ -113,6 +113,10 @@ Decoder-only Language Models - MPT, MPT-Instruct, MPT-Chat, MPT-StoryWriter - :code:`mosaicml/mpt-7b`, :code:`mosaicml/mpt-7b-storywriter`, :code:`mosaicml/mpt-30b`, etc. - + * - :code:`NemotronForCausalLM` + - Nemotron-3, Nemotron-4, Minitron + - :code:`nvidia/Minitron-8B-Base`, :code:`mgoin/Nemotron-4-340B-Base-hf-FP8`, etc. + - ✅︎ * - :code:`OLMoForCausalLM` - OLMo - :code:`allenai/OLMo-1B-hf`, :code:`allenai/OLMo-7B-hf`, etc. diff --git a/vllm/model_executor/layers/activation.py b/vllm/model_executor/layers/activation.py index 6578193a31597..4c14fe476ee4a 100644 --- a/vllm/model_executor/layers/activation.py +++ b/vllm/model_executor/layers/activation.py @@ -166,9 +166,7 @@ class ReLUSquaredActivation(CustomOp): def forward_native(self, x: torch.Tensor) -> torch.Tensor: """PyTorch-native implementation equivalent to forward().""" - relu_applied = nn.functional.relu(x) - squared = torch.square(relu_applied) - return squared + return torch.square(F.relu(x)) def forward_cuda(self, x: torch.Tensor) -> torch.Tensor: return self.forward_native(x)