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
49f43f9f
Commit
49f43f9f
authored
Jan 09, 2024
by
daniel-furman
Browse files
first stab at wrap_chat_template, various
parent
2d3c835c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+8
-0
No files found.
lm_eval/models/huggingface.py
View file @
49f43f9f
...
...
@@ -734,6 +734,14 @@ class HFLM(LM):
stopping_criteria
=
stop_sequences_criteria
(
self
.
tokenizer
,
stop
,
1
,
context
.
shape
[
0
]
)
print
(
self
.
model
.
generate
(
input_ids
=
context
,
max_length
=
max_length
,
stopping_criteria
=
stopping_criteria
,
pad_token_id
=
self
.
tokenizer
.
pad_token_id
,
use_cache
=
True
,
**
generation_kwargs
,
))
return
self
.
model
.
generate
(
input_ids
=
context
,
max_length
=
max_length
,
...
...
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