Commit 6f76522a authored by Konrad's avatar Konrad
Browse files

property name fix

parent d7b8fd9c
......@@ -184,7 +184,7 @@ class LM(abc.ABC):
return self._world_size
@property
def get_tokenizer_name(self) -> str:
def tokenizer_name(self) -> str:
raise NotImplementedError(
"To use this model with chat templates, please implement the 'get_tokenizer_name' property."
)
......
......@@ -391,7 +391,7 @@ class Task(abc.ABC):
if system_instruction is not None
else ""
)
cache_key += f"-tokenizer{lm.get_tokenizer_name}" if apply_chat_template else ""
cache_key += f"-tokenizer{lm.tokenizer_name}" if apply_chat_template else ""
cached_instances = load_from_cache(file_name=cache_key)
......
......@@ -416,7 +416,7 @@ class HFLM(TemplateLM):
return self._world_size
@property
def get_tokenizer_name(self) -> str:
def tokenizer_name(self) -> str:
return self.tokenizer.name_or_path.replace("/", "__")
def _get_backend(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment