Skip to content

Conversation

SemyonEpanov
Copy link
Collaborator

Объединяем дублирующийся код для извлечения энтропий CoT и single_token
#discussion_r2249304593

  • Добавили батчи для CoT
  • Добавили единый runner (runner.py), стратегии (strategies.py) и общий интерфейс (estimate_entropy.py)
  • Добавили (на будущее): обработку датасетов при помощи адаптеров

-- Режим определяется флагом --mode (single_token или cot).

@SemyonEpanov SemyonEpanov force-pushed the refactor-entropy-estimate branch from f5c4497 to df4397c Compare September 1, 2025 13:23
adapter.check_answer_correct)

def main():
ap = argparse.ArgumentParser()
Copy link
Member

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(
Copy link
Member

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?

@aigoncharov
Copy link
Member

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(
Copy link
Member

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants