Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
lm-evaluation-harness
Commits
6f76522a
Commit
6f76522a
authored
May 30, 2024
by
Konrad
Browse files
property name fix
parent
d7b8fd9c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
lm_eval/api/model.py
lm_eval/api/model.py
+1
-1
lm_eval/api/task.py
lm_eval/api/task.py
+1
-1
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+1
-1
No files found.
lm_eval/api/model.py
View file @
6f76522a
...
...
@@ -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."
)
...
...
lm_eval/api/task.py
View file @
6f76522a
...
...
@@ -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
)
...
...
lm_eval/models/huggingface.py
View file @
6f76522a
...
...
@@ -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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment