Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Draft] Nemotron in Nemo-UX #10138

Merged
merged 13 commits into from
Aug 22, 2024
14 changes: 14 additions & 0 deletions nemo/collections/llm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@
MixtralConfig8x7B,
MixtralConfig8x22B,
MixtralModel,
Nemotron3Config4B,
Nemotron3Config8B,
Nemotron4Config15B,
Nemotron4Config22B,
Nemotron4Config340B,
NemotronConfig,
NemotronModel,
gpt_data_step,
gpt_forward_step,
)
Expand All @@ -73,6 +80,13 @@
"MixtralConfig8x7B",
"MixtralConfig8x22B",
"MixtralModel",
"NemotronModel",
"Nemotron3Config4B",
"Nemotron3Config8B",
"Nemotron4Config15B",
"Nemotron4Config22B",
"Nemotron4Config340B",
"NemotronConfig",
"LlamaConfig",
"Llama2Config7B",
"Llama2Config13B",
Expand Down
6 changes: 6 additions & 0 deletions nemo/collections/llm/fn/activation.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,9 @@ def gelu_impl(x):

def openai_gelu(x):
return gelu_impl(x)


@torch.jit.script
def squared_relu(x):
"""Squared ReLU activation function."""
return torch.pow(torch.nn.functional.relu(x), 2)
16 changes: 16 additions & 0 deletions nemo/collections/llm/gpt/model/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@
MixtralConfig8x22B,
MixtralModel,
)
from nemo.collections.llm.gpt.model.nemotron import (
Nemotron3Config4B,
Nemotron3Config8B,
Nemotron4Config15B,
Nemotron4Config22B,
Nemotron4Config340B,
NemotronConfig,
NemotronModel,
)

__all__ = [
"GPTConfig",
Expand All @@ -52,6 +61,13 @@
"Llama2Config70B",
"Llama3Config8B",
"Llama3Config70B",
"NemotronConfig",
"Nemotron3Config4B",
Fixed Show fixed Hide fixed
"Nemotron3Config8B",
"Nemotron4Config15B",
Fixed Show fixed Hide fixed
"Nemotron4Config22B",
"Nemotron4Config340B",
Fixed Show fixed Hide fixed
"NemotronModel",
"CodeLlamaConfig7B",
"CodeLlamaConfig13B",
"CodeLlamaConfig34B",
Expand Down
Loading
Loading