Skip to content

Commit

Permalink
fix typo of olmo
Browse files Browse the repository at this point in the history
  • Loading branch information
tlopex authored Dec 17, 2024
1 parent 286c33e commit 1f3004a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/mlc_llm/model/olmo/olmo_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def __post_init__(self): # pylint: disable=too-many-branches
raise ValueError(f"'clip_qkv'({self.clip_qkv}) should be non-negative")


class OLMoEebedding(nn.Embedding):
class OLMoEmbedding(nn.Embedding):
"""The embedding module that can be shared with the final lm_head. From Qwen2Embedding."""

def lm_head_forward(self, x: nn.Tensor):
Expand Down Expand Up @@ -248,7 +248,7 @@ def forward( # pylint: disable=missing-function-docstring
class OLMoModel(nn.Module): # pylint: disable=missing-class-docstring
def __init__(self, config: OLMoConfig):
assert config.hidden_size % config.num_attention_heads == 0
self.embed_tokens = OLMoEebedding(config.vocab_size, config.hidden_size)
self.embed_tokens = OLMoEmbedding(config.vocab_size, config.hidden_size)
self.layers = nn.ModuleList(
[OLMoDecoderLayer(config) for _ in range(config.num_hidden_layers)]
)
Expand Down

0 comments on commit 1f3004a

Please sign in to comment.