Skip to content

Commit

Permalink
Address comments 1
Browse files Browse the repository at this point in the history
  • Loading branch information
milocress authored Jul 24, 2024
1 parent ef6c8c2 commit dd1de37
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions llmfoundry/models/mpt/modeling_mpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,13 @@ class InvalidConfigAccessError(KeyError):


class PartialLlamaConfig(LlamaConfig):
"""Holds the rope config for Llama models and throws
an `InvalidConfigAccessError` if any other config elements
are read. This class is necessary because the
`LlamaRotaryEmbedding` class takes a full `LlamaConfig` now
instead of the old keyword arguments.
"""

def __getattribute__(self, key: str):
if key not in _ALLOWED_LLAMA_CONFIG_KEYS:
Expand All @@ -129,9 +136,6 @@ def __getitem__(self, key: str):

return super().__getitem__(key)

def _get_generation_defaults(self):
return {}


def gen_rotary_embedding(
rope_impl: str,
Expand Down

0 comments on commit dd1de37

Please sign in to comment.