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
615352c0
"...lm-evaluation-harness.git" did not exist on "4e72f165a7c823dd4dcd89afdb6babd071ebe0e5"
Commit
615352c0
authored
May 30, 2024
by
Konrad
Browse files
add system prompt hash to cache_key
parent
52df595f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
lm_eval/api/task.py
lm_eval/api/task.py
+5
-0
No files found.
lm_eval/api/task.py
View file @
615352c0
...
...
@@ -386,6 +386,11 @@ class Task(abc.ABC):
cache_key
=
f
"requests-
{
self
.
_config
.
task
}
-
{
self
.
config
.
num_fewshot
}
shot-rank
{
rank
}
-world_size
{
world_size
}
"
cache_key
+=
"-chat_template"
if
apply_chat_template
else
""
cache_key
+=
"-fewshot_as_multiturn"
if
fewshot_as_multiturn
else
""
cache_key
+=
(
f
"-system_prompt_hash
{
utils
.
hash_string
(
system_instruction
)
}
"
if
system_instruction
is
not
None
else
""
)
if
lm
is
not
None
and
hasattr
(
lm
,
"tokenizer"
):
cache_key
+=
f
"-
{
lm
.
tokenizer
.
name_or_path
.
replace
(
'/'
,
'__'
)
}
"
...
...
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