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
513352ae
Commit
513352ae
authored
Jun 24, 2023
by
haileyschoelkopf
Browse files
remove stale commented code
parent
dced6e96
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
7 deletions
+1
-7
lm_eval/models/huggingface.py
lm_eval/models/huggingface.py
+1
-7
No files found.
lm_eval/models/huggingface.py
View file @
513352ae
...
...
@@ -571,18 +571,12 @@ class HFLM(LM):
# max len for inputs = encoder's whole max_length
max_ctx_len
=
self
.
max_length
# encode, pad, and truncate contexts
context_enc
,
attn_masks
=
self
.
tok_batch_encode
(
contexts
,
left_truncate_len
=
max_ctx_len
)
context_enc
=
context_enc
.
to
(
self
.
device
)
attn_masks
=
attn_masks
.
to
(
self
.
device
)
# [self.tok_encode(context, left_truncate_len=max_ctx_len)],
# device=self.device,
# ) for context in contexts]
# padding_len = max([context.shape[1] for context in context_enc])
# self.tokenizer.batch_encod
# context_enc = utils.pad_and_concat(padding_len, context_enc, padding_side="left")
cont
=
self
.
_model_generate
(
context
=
context_enc
,
...
...
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