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

Add intermediate size to hf_olmo #747

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions hf_olmo/configuration_olmo.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ def num_hidden_layers(self):
def hidden_size(self):
return self.d_model

@property
def intermediate_size(self):
if hasattr(self, "mlp_hidden_size") and self.mlp_hidden_size is not None:
return self.mlp_hidden_size // 2
else:
return (self.mlp_ratio * self.d_model) // 2

@property
def effective_n_kv_heads(self) -> int:
if self.n_kv_heads is None:
Expand Down
Loading