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
52df595f
"src/vscode:/vscode.git/clone" did not exist on "d5e6af27bcf58111fcd75c376e0e744d327a1586"
Commit
52df595f
authored
May 30, 2024
by
Konrad
Browse files
apply chat template method fix
parent
f8771d26
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
lm_eval/api/model.py
lm_eval/api/model.py
+3
-2
No files found.
lm_eval/api/model.py
View file @
52df595f
...
@@ -114,7 +114,6 @@ class LM(abc.ABC):
...
@@ -114,7 +114,6 @@ class LM(abc.ABC):
"""
"""
pass
pass
@
abc
.
abstractmethod
def
apply_chat_template
(
self
,
chat_history
:
list
[
dict
[
str
,
str
]])
->
str
:
def
apply_chat_template
(
self
,
chat_history
:
list
[
dict
[
str
,
str
]])
->
str
:
"""
"""
Defines how to transform few-shot examples provided as chat history into a format that can be used as input to the LM.
Defines how to transform few-shot examples provided as chat history into a format that can be used as input to the LM.
...
@@ -125,7 +124,9 @@ class LM(abc.ABC):
...
@@ -125,7 +124,9 @@ class LM(abc.ABC):
:return: str
:return: str
A string representing the chat history in a format that can be used as input to the LM.
A string representing the chat history in a format that can be used as input to the LM.
"""
"""
pass
raise
NotImplementedError
(
"To use this model with chat templates, please implement the 'apply_chat_template' method."
)
@
classmethod
@
classmethod
def
create_from_arg_string
(
def
create_from_arg_string
(
...
...
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