-
Notifications
You must be signed in to change notification settings - Fork 3
Refactor entropy estimate #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
f5c4497
to
df4397c
Compare
adapter.check_answer_correct) | ||
|
||
def main(): | ||
ap = argparse.ArgumentParser() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove command-line arguments in favor of passing configs as code
ans = (ans or "").strip().upper() | ||
return ans[:1] # берем первую букву | ||
|
||
def build_row_funcs_from_columns( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the point of separate prompt_builder
and build_row_funcs_from_columns
? AFAIU, the end goal is to construct a prompt from the row. Shall we combine them in a single function then that for MMLU dataset accepts a row
and outputs a prompt?
Could you also refactor the existing experiments to see how the code is applied? |
|
||
from core.prompts.mmlu_cot_answer import answer_marker as COT_MARKERS | ||
|
||
def make_prompt_builder( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we still use it?
Объединяем дублирующийся код для извлечения энтропий CoT и single_token
#discussion_r2249304593
runner.py
), стратегии (strategies.py
) и общий интерфейс (estimate_entropy.py
)-- Режим определяется флагом
--mode
(single_token
илиcot
).