Repository navigation
Add HELMET task suite: all seven categories at 4k-128k - #281
Conversation
Registers helmet_json_kv__{262144,524288,1048576,2097152} tasks (and
helmet_recall__*/helmet_all__* suites) that read the ai2-internal
allenai/helmet-plus dataset off the Hub, extending HELMET's json_kv
recall task past its standard 128k ceiling. Follows the same
task/suite registration pattern already used for RULER.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
helmet-plus now covers the original 4k/8k/16k/32k/64k/128k tiers in addition to the 256k/512k/1m/2m extension, making it a strict superset of standard HELMET's json_kv lengths. Task/suite generation already looped generically over CONTEXT_SIZES, so this only required adding the six shorter tiers to LENGTH_NAMES. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Carries HELMET's five ICL tasks (trec_coarse, trec_fine, banking77, clinic150, nlu) into olmo-eval, keeping them HELMET-namespaced rather than factoring them out: the length-controlled construction (shot count per length tier, shuffled integer labels) is HELMET's, not a property of the underlying datasets, so they aren't interchangeable with standalone tasks. Three of the five source datasets no longer load: datasets 4.0 dropped script-based loading, which HELMET relies on via trust_remote_code. trec and nlu_evaluation_data resolve to the Hub's auto-converted parquet branch, and banking77 to legacy-datasets/banking77, since PolyAI/banking77 hosts only the script. Split sizes and label counts verified against HELMET's hardcoded values (6/50/77/151/68). Also: - helmet_tasks.py now takes per-task context_sizes, since coverage is ragged (json_kv 4k-2m, ICL 4k-128k only). - helmet_all__* aggregates category suites via AVERAGE_OF_AVERAGES instead of flat-averaging tasks, so recall isn't outweighed 5:1 by ICL's task count, and is only registered where >1 category exists -- above 128k it would silently be a rename of helmet_recall__* whose composition differs from the same suite at shorter lengths. Verified: demo labels match each instance's own permutation and the answer field agrees (20/20); output is deterministic per seed; the answer parser is byte-identical to HELMET's parse_output across 11 cases; all five datasets produce well-formed prompts. ruff, ty, and 820 existing tests pass.
HELMET fit its ICL shot counts against a Llama-2-era tokenizer, so under Olmo 3's larger vocabulary the rendered prompts land at 0.78-0.85x their nominal length: icl_*__4096 is really ~3.2-3.5k tokens and __131072 is ~104-108k. Keeps HELMET's counts verbatim so our ICL numbers stay directly comparable to published HELMET results, and records the measured shortfall in-file so it is visible when reading a length sweep rather than being a silent property of the tasks. Note this leaves ICL inconsistent with json_kv, which is calibrated against Olmo 3 and does hit its nominal lengths -- a helmet_all__4096 average therefore mixes a 4.1k-token task with ~3.3k-token ones. Adds scripts/internal/calibrate_helmet_icl_shots.py to measure that shortfall for any tokenizer. It also prints Olmo-3-calibrated counts, but is explicitly documented as a diagnostic rather than the source of the committed values, and labels that output as a deliberate trade so it doesn't get pasted in by accident.
Adds the rougeL_f1 metric HELMET uses as the primary score for infbench_qa_eng, plus rougeL_recall (HELMET's metric for qmsum-style tasks), neither of which olmo-eval had. Backed by Google Research's rouge_score with use_stemmer=True, matching HELMET so numbers stay comparable to published results -- hand-rolling ROUGE-L is easy to get subtly wrong, since tokenization and stemming both move the score. Verified byte-identical to HELMET's calculate_metrics across five cases including multi-reference, no-overlap, and empty-prediction. Scoring takes the max over all reference answers, as HELMET does. Reads either multi-reference metadata convention already present in this repo (all_answers, used by the SQuAD scorer; all_gold_answers, used by RULER/HELMET tasks), falling back to a single gold_answer. rouge-score adds cleanly: the lockfile diff is the one new package, no version changes elsewhere, and all 820 existing tests pass.
Registers helmet_infbench_qa_eng__{4096..131072}, scored with the rougeL_f1
metric added in the previous commit -- HELMET's primary metric for this task.
Capped at standard HELMET's lengths since the context is a real book and
can't be stretched the way json_kv's synthetic context can.
Contexts are truncated with a fixed reference tokenizer (Llama 2, via an
ungated mirror so the repo needs no gated-model access) rather than the
tokenizer of the model under test. That is what makes every model see the
same text, and it keeps results comparable to published HELMET -- the same
trade already taken for the ICL shot counts.
Two deviations from a literal port, both verified safe:
- HELMET's >=65536-token filter is skipped. It is a no-op (the shortest
InfiniteBench story is ~78k reference tokens, and HELMET itself calls it
"just a sanity step"), which lets us sample first and truncate only the
rows we keep instead of tokenizing all 351 book-length contexts.
- Truncation is memoized per distinct context, since 351 questions are drawn
from just 69 stories.
Demos are still drawn from the full pool, not the sampled subset, so they
don't depend on how many instances are evaluated.
Also adds use_chat_template handling to the shared HelmetTask: HELMET runs
LongQA in chat format, where the "Answer:" prefix is not fed in as a partial
assistant turn. json_kv and ICL are unaffected and keep their prefixes.
Verified: truncation lands exactly on budget (3886/3886 at 4k, 65326/65326 at
64k), the rendered 4k prompt is 4002 reference tokens, the truncation notice
is present, gold answers reach the scorer as a list, and ROUGE gives 1.0 on
exact gold with sensible partial credit. ruff, ty, and 820 tests pass.
Registers helmet_infbench_choice_eng__{4096..131072}: same book-length story
as infbench_qa_eng, but with four options and a single-letter answer, scored
by exact match.
Reuses the InfiniteBench loader and task class, with a per-task metrics_key
so subsets sharing a loader can score differently (ROUGE for qa_eng, exact
match here) instead of both being pinned to the task kind.
Adds InfbenchChoiceScorer, which ports HELMET's choice_post_process: a
response counts as correct if the raw generation, or its "Answer:"-stripped
form, normalizes to either the bare letter or "letter. option text", or if
the latter appears anywhere in the generation -- the last rule being what
credits a model that answers in a sentence. It reads output.text rather than
only extracted_answer because that rule is defined against the untouched
generation. Verified to agree with HELMET on all 11 cases tried, including
bare/lowercase/trailing-period letters, prefixed and embedded answers, wrong
answers, and empty output.
Note the rendered prompt can run slightly over nominal at the smallest tier
(~4109 vs 4096 tokens at 4k), because the options block eats into HELMET's
fixed 200-token prompt reserve. This is faithful -- HELMET budgets both
subsets identically at size - 200 - 10 -- and is 0.3% at 4k, less above.
HELMET's LongQA category is now complete except narrativeqa, whose primary
metric is LLM-judged. ruff, ty, and 820 tests pass.
undfined
left a comment
There was a problem hiding this comment.
Two requests but looks good!
- Do we want to pass a fixed revision?
- The loader decodes and processes the entire JSONL file before applying max_samples similar to RULER-plus case. We should try to stream and sample this instead of loading the entire dataset and sampling with max_samples.
Registers helmet_narrativeqa__{4096..131072}, HELMET's third LongQA task and
the first here graded by an LLM judge rather than string overlap.
Ports HELMET's LongQA rubric (scripts/eval_gpt4_longqa.py) onto olmo-eval's
existing LLMJudgeScorer, keeping upstream's judge model and temperature
(gpt-4o-2024-05-13 @ 0.1) so scores stay comparable. HELMET's gpt-4-score is
fluency (0/1) x correctness (0-3); that product is divided by 3 here so the
scorer honors the [0,1] contract its base class documents and doesn't
outweigh proportion-valued metrics in a suite average -- multiply a reported
score by 3 to recover HELMET's number. Verified the parse+score path agrees
with HELMET across 7 responses including trailing-JSON, multiple JSON
objects, missing keys, and malformed output.
The judge is given the bare question via new `judge_question` metadata, not
Instance.question -- the latter is the fully rendered prompt, so using it
would ship a book-length context to the judge on every call. Verified the
built judge prompt is ~2.2k chars and contains no story text.
Loading narrativeqa is the expensive part: HELMET keeps only documents over
131072 reference tokens, which it establishes by tokenizing all 10.5k rows of
the test split. Two shortcuts avoid that without changing which instances are
selected -- an exact character-count lower bound (a document cannot have more
tokens than characters), and stopping once enough rows are found, which is
equivalent because HELMET shuffles before filtering and then takes a prefix.
Loading 3 instances takes ~11s rather than tokenizing the whole split.
Judged tasks change how suites should be run, so following the split in
suites/science.py: per-category suites and helmet_all__* now include
narrativeqa and therefore need a judge configured, while new
helmet_nojudge__* suites are the subset that runs without one.
HELMET scores msmarco_rerank_psg with NDCG@10, which olmo-eval had no metric for -- it had no ranking metrics at all. This adds the metric ahead of the task itself, which additionally needs its pre-computed retrieval data hosted before it can run. Reimplements the formula rather than taking on pytrec_eval, a compiled C extension, as a permanent dependency. Determined trec_eval's exact convention empirically instead of assuming it -- linear gain (rel / log2(rank+1)), not the exponential 2^rel-1 variant -- then verified agreement with pytrec_eval across 900 randomized comparisons spanning partial rankings, over-long rankings containing unjudged ids, and all-zero relevance: zero mismatches. The ideal ranking is drawn from every judged document rather than only those the model returned, so omitting a relevant document costs score instead of being silently ignored. Accepts relevance judgements as a mapping or as HELMET's [[doc_id, label], ...] pair list.
Registers helmet_kilt_{nq,triviaqa,hotpotqa,popqa}__{4096..131072}: an
open-domain question plus a stack of retrieved Wikipedia passages. Data comes
from allenai/helmet-plus, whose kilt/manifest.json maps each length tier to
its pre-retrieved file, so no filenames are hardcoded. Capped at standard
HELMET's lengths since retrieval depth is baked into the files.
Adds SubstringExactMatchScorer, which HELMET's RAG metric needs and olmo-eval
lacked. The existing SubstringRecallScorer returns the *fraction* of gold
answers found, which is wrong here: these gold answers are aliases for one
another, so a model answering Natural Questions correctly with one surface
form would score 1/N rather than 1. The new scorer takes the max and applies
HELMET's normalization (lowercase, strip punctuation, drop articles, collapse
whitespace); verified identical to HELMET across 7 cases, where the recall
scorer would have given 0.33-0.67 for fully correct answers.
Two behaviors worth knowing, both faithful to HELMET:
- `limit` caps *questions*, not instances. Each question appears once per
gold-passage depth -- 6 for nq/triviaqa/popqa (the dep6 in the filenames:
0.0, 0.2, 0.4, 0.6, 0.8, 0.95) and 3 for hotpotqa -- so scores average over
where in the context the answer sits, which is the "lost in the middle"
effect these tasks measure. A limit of 100 therefore yields ~600 nq
instances. Documented in the loader; confirmed 6/3/6 empirically.
- PopQA is restricted to long-tail entities via log10(s_pop) < 3, encoded in
HELMET's task name as kilt_popqa_3. Verified this removes 50% of rows
rather than being a no-op.
RAG joins the suite as its own category, so helmet_all__4096 now spans 13
tasks across recall, rag, longqa and icl. ruff, ty, and 820 tests pass.
Registers helmet_msmarco_rerank_psg__{4096..131072}: a query plus ID-tagged
candidate passages the model must return in relevance order, scored with the
NDCG@10 metric added earlier. Data comes from allenai/helmet-plus via
msmarco/manifest.json; capped at standard HELMET's lengths since candidate
depth is fixed in the pre-retrieved files.
Ports HELMET's parse_rankings. Upstream returns a dict of id -> descending
score for pytrec_eval; this returns the equivalent ranked list, which is what
NDCGScorer consumes. Verified the two agree on 7 cases including bracketed
IDs, duplicate ids (first position wins), no-separator output, and
unparseable text.
Relevance judgements now flow from the loader into instance metadata as
`qrel`, which is where NDCGScorer reads them.
Sanity-checked scoring on real data: a gold-order ranking scores 1.0, its
reverse 0.26, and unparseable output 0.0.
Note re-ranking multiplies instances the same way RAG does -- these files
carry three gold-position variants per query, so a limit of N yields ~3N
instances.
HELMET support now covers 5 of 6 categories (88 tasks): recall, rag, rerank,
longqa, icl. Remaining are the two summarization tasks and ALCE.
Registers helmet_{infbench_sum_eng,multi_lexsum}__{4096..131072}, completing
HELMET's six task categories: 100 tasks now span recall, rag, rerank, longqa,
summ and icl.
Adds HelmetSummJudgeScorer, which unlike the LongQA judge needs three calls
per summary -- fluency, key-point recall, and sentence-level precision --
combined into HELMET's gpt-4-f1 as
fluency * 2 * rec * prec / (rec + prec). Fluency multiplies rather than
averages, so a disfluent summary scores zero however much it covers; that is
deliberate upstream, since degenerate repetition otherwise scores well on
recall. Verified the combination matches HELMET on 5 cases including the
fluency gate and both zero-denominator paths, and that missing or malformed
judge output scores 0.0 rather than raising.
The six rubrics (~55KB, each with worked examples) were extracted
programmatically from eval_gpt4_summ.py rather than retyped, and verified to
round-trip identically -- a paraphrase would silently shift scores. Book
variants grade novels, plain variants grade civil lawsuits.
multi_lexsum reads from allenai/helmet-plus instead of calling load_dataset,
which no longer works: datasets 4.0 dropped script-based loading and the Hub's
parquet conversion has no v20230518 config. The hosted multi_lexsum_val.jsonl
turned out to be the full validation split -- sources, both summary lengths,
and the pre-extracted key points -- so bypassing the broken path loses
nothing and pins the data besides.
Two details that differ from the other long-context tasks: multi_lexsum
reserves 300 tokens of each tier for prompt and buffer where the rest reserve
200, and the precision rubric grades against the expert *long* summary rather
than the short one the model is asked to match. Both follow upstream.
Verified no source text leaks into judge prompts, that the correct rubric
variant is selected per task, and that key points and expert summaries reach
the scorer through instance metadata. All three summarization tasks are
judge-gated, so they appear in helmet_all__* but not helmet_nojudge__*.
ruff, ty, and 820 tests pass.
Registers helmet_alce_{asqa,qampari,asqa_nocite,qampari_nocite}__{4096..131072}
-- 124 HELMET tasks now, covering all seven of HELMET's reported categories.
Scores ALCE's answer-correctness half only:
- str_em (ASQA): the fraction of a question's disambiguated sub-questions the
response answers, so partial coverage earns partial credit.
- qampari_rec_top5 (QAMPARI): recall over an answer set, capped at five so
questions with long answer lists don't dominate the average.
Both verified identical to ALCE's eval_alce.py across 6 cases, including
generations carrying inline citations.
Deliberately NOT scored: citation_rec / citation_prec, which measure whether
each claim is supported by the sources it cites. Those need AutoAIS, an 11B
NLI model, wired up as an auxiliary provider -- a separate change. The tasks
are useful without it, just silent on grounding, which is arguably ALCE's more
interesting half.
Scoring runs on a normalized generation (newlines collapsed, chat end-marker
dropped, inline [1] markers stripped) so a well-cited answer isn't penalized
for carrying its citations, matching upstream's preprocessing.
Unlike the RAG tasks, every ALCE tier reads one file -- a fixed 2000-document
pool per question -- and shows a prefix of it, so length is set by how many
documents are displayed. The nocite variants run zero-shot with a larger
generation budget, per HELMET's configs; verified they emit no worked
examples while still showing the full document set.
ruff, ty, and 820 tests pass.
The provider hardcoded AutoModelForCausalLM, so olmo-eval could not run any encoder-decoder model. This blocks ALCE's citation metrics, which score with AutoAIS (google/t5_xxl_true_nli_mixture, a T5) -- and vLLM is not an alternative route: its 0.19.1 model registry has no T5 entry and no true encoder-decoder support, only multimodal *ForConditionalGeneration models whose decoders are still causal. Detects encoder-decoder models from their config rather than adding a config flag, so nothing needs declaring at the call site and existing causal models are unaffected. Three touch points: - pick AutoModelForSeq2SeqLM when config.is_encoder_decoder - skip the prompt slice in generate(): a causal LM returns prompt + continuation, but an encoder-decoder returns only decoder tokens, so output_ids[prompt_len:] would eat the answer - skip the logprob path for encoder-decoder, since it reads logits at prompt-relative offsets of one concatenated sequence, which only holds for a causal LM. AutoAIS needs no logprobs; encoder-decoder support there would require a decoder-side forward pass. Verified auto-detection returns True for google/t5_xxl_true_nli_mixture and t5-small, and False for Olmo 3 and gpt2, so the causal path is untouched. Caveat: the generate path itself is NOT exercised locally -- torch is Linux/CUDA-gated and absent from the macOS dev environment -- so the seq2seq branch needs a smoke test on a GPU node before AutoAIS is wired up.
The previous commit widened the transformers surface the provider imports (AutoConfig, AutoModelForSeq2SeqLM), which broke test_huggingface_provider_passes_force_download_to_tokenizer_and_model -- it stubs sys.modules["transformers"] with only the two names the old code used. I pushed that commit before reading the test output; this repairs it. - extends the stub with the new names, and asserts a causal model is *not* routed through the seq2seq class - adds a test for the new branch: an encoder-decoder config must load via AutoModelForSeq2SeqLM and must not touch the causal class - makes the provider's log line use getattr(auto_class, "__name__", ...); a log statement should not raise, and it did against a test double Full suite: 1996 passed, 26 skipped.
…s, tests Findings from a full review of the 13-commit HELMET integration, fixed here. Scoring fidelity (would have shifted reported numbers): - ICL exact match now uses HELMET's normalization. The generic ExactMatchScorer only lowercases and strips, but HELMET's exact_match (drqa) also removes punctuation and articles -- so "label: 42." or a quoted answer scored 0 here and 1 under HELMET. Realistic outputs, since stop-at-newline sampling leaves trailing punctuation intact. Added HelmetExactMatchScorer and wired it into the ICL metric; divergence demonstrated against upstream's normalization before fixing. - ROUGE scorers now take the max over the raw and extracted generations, matching HELMET's default_post_process. Scoring only the extracted answer under-credited any multi-line generation whose answer-prefix parse picked the wrong line. Robustness: - HelmetLongQAJudgeScorer inherited the base ascore_with_context, whose provider path defaults to max_tokens=10 -- sized for letter-grade judges. This rubric asks for step-by-step reasoning before a JSON verdict, so any provider-wired run would truncate every response and silently score zero. Overridden to pass the judge budget, mirroring the summ scorer. - The KILT loader now samples by streaming over the file instead of parsing all of it: the 128k tiers are 1-3GB of JSONL that expand severalfold as dicts (upstream avoids this via arrow memory-mapping). Selection verified byte-identical to the old path on real nq and popqa files across caps of 5/50/None, including the popularity-filter interaction. Tests: the branch's verification lived in throwaway shell commands; none of it survived as regression protection. Added 44 offline tests covering the ranking/label parsers (HELMET reference cases), NDCG against pytrec_eval values, all six new scorers including the fluency gate and malformed-judge paths, the summ rubric brace-escaping, ICL demo balancing, the streaming sampler (fixture file), and the task/suite inventory -- 124 tasks, category counts, context budgets, judged-task exclusions, and the absence of helmet_all above 128k. Also refreshed module docstrings that still described the branch as json_kv-plus-ICL with narrativeqa the only judged task. Reviewed but left alone: scorer-instance handling (Scorer.__call__ returns self, so metrics accept instances -- suspected bug, disproven), the choice scorer's embedded-answer rule, popqa key handling, and the ALCE preprocessing chain, all verified against upstream during review. Full suite: 2040 passed, 26 skipped.
|
Heads up for anyone who reviewed earlier: this PR just grew from the recall-only extension (2 commits) to the full HELMET integration (16 commits) — the original recall commits are unchanged at the base of the branch. Title and description updated to match. The same content is also flowing to |
A demo run of the judged HELMET tasks crashed at results aggregation -- after all 1800 instances were scored and every judge call paid for -- with "Object of type function is not JSON serializable". The chain: TaskConfig.to_dict() -> Metric.to_dict() -> Scorer.to_dict(), whose dataclasses.asdict includes judge_fn, the live async closure built by build_openai_judge_fn. compute_task_hash then json.dumps's that dict. Class-valued scorers serialize as __name__ (why every non-judge task was fine), and the wildguard judge dodges it because provider_name nulls judge_fn in __post_init__ -- the HELMET judges are just the first judge_fn-configured scorers to reach aggregation. SimpleQAJudgeScorer had the same latent bug. Fixed with a to_dict override on LLMJudgeScorer that replaces the closure with a stable "<configured>" marker. That is also more correct for hashing: a function repr embeds a memory address, so even a serializable form would have made task hashes differ run to run. No deserialization path needs the function back (verified: no from_dict in scorers/metrics). Regression tests: every registered helmet task's config now round-trips through json.dumps (instantiation touches no data, so the sweep is cheap), and judge scorer serialization is asserted stable across independent constructions. Reproduced the crash via the real config path before fixing; verified the same path serializes after.
|
Let's split this into two PRs: (i) port HELMET as-is from oe-eval, (ii) a separate PR for context extensions that we'll deal with later. For (i), it would help to verify parity with |
…vision, stream sampling The long-context recall extension (256k-2m json_kv tiers) moves to a follow-up PR so this one can be reviewed as a port of HELMET at its own context lengths. The two review requests on the original diff are addressed here: downloads from allenai/helmet-plus are pinned to a fixed revision, and JSONL loaders sample without parsing the whole file first. The json_kv sampler keeps the same selection as the full-load path; the KILT question-level sampler moves to helmet_loader and is reused for MS MARCO. Co-Authored-By: Claude Fable 5.1 <[email protected]>
# Conflicts: # pyproject.toml # src/olmo_eval/common/metrics/__init__.py # src/olmo_eval/common/scorers/__init__.py # src/olmo_eval/inference/providers/huggingface.py # uv.lock
HELMET's pre-retrieved KILT files overshoot their nominal length tier (the 128k files are 142-155k Llama-2 tokens) and HELMET relies on trimming the end of the passage block at inference time. The KILT loader skipped that step, so at 128k a sizeable fraction of prompts exceeded a 131072 max_model_len, and because the in-process vLLM provider submits a whole mixed-task batch in one call, each overflow also hard-failed every other KILT instance sharing its batch, including 8k-64k ones. The loader now measures the rendered prompt with the fixed reference tokenizer the other long-context loaders use and removes the overflow from the passages alone, leaving instruction, demos and question intact. The budget is the tier minus the generation length, matching HELMET's max_length - generation_max_length. Co-Authored-By: Claude Fable 5.1 <[email protected]> (cherry picked from commit 8037efd)
A MetricName or bare str primary_metric names one of the task's own metrics. Leaving it unresolved means the task contributes nothing to a parent suite's average-of-averages, which then silently falls back to whichever metric name its children share. HELMET's per-task primary metrics rely on this. (cherry picked from commit 9972939, base.py hunk only) Co-Authored-By: Claude Fable 5.1 <[email protected]>
Conflicts: - llm_judge.py: take main's LLMJudgeScorer.to_dict, which describes judge_fn by name and judge_config instead of a "<configured>" marker. HELMET judges build their judge_fn with build_openai_judge_fn, so their model, temperature and max tokens now appear under judge_fn; the to_dict test checks those instead of the marker. - uv.lock: main's lock relocked with uv 0.12.0, adding only rouge-score. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Would it be possible to benchmark a public HF model with known HELMET numbers to confirm parity? |
This is a re-review of head What was checked. On a trial merge with current
Upstream comparisons are against princeton-nlp/HELMET at The findings are ranked below:
Blocking
Non-blocking
Nits
Status of the 9/29 review
Before mergePlease fix Blocking 1 (judge failures raise and are retried, not scored 0.0) and Blocking 2 (Multi-LexSum length filter and selection), with tests for both. I'd also strongly encourage Non-blocking 1, 2 and 5 in this PR. Moving onto If you defer the rest, please file follow-up issues and link them here:
Once those are done and CI is green, you're free to merge. |
LongQA, summarization and cite set use_chat_template, as upstream HELMET does, but format_request still sent a bare completion. The flag only dropped the "Answer:" prefix, so those tasks got neither the chat template nor the prefix. On Llama-3.1-8B-Instruct at 8k, InfBench QA spent its 10-token budget writing "Answer:" and scored 0.0 against the paper's 21.9. These tasks now send one user message, which the server wraps in the chat template like upstream's apply_chat_template with add_generation_prompt=True. The judged tasks (narrativeqa and both summarization tasks) also now declare OPENAI_API_KEY in required_secrets, so a Beaker launch mounts the key or fails at preflight rather than after generation. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Results for comparison between HELMET (published results) and HELMET+ on Llama-3.1-8B-Instruct on 8k, 16k and 32k splits:
Beaker runs:
|
# Conflicts: # src/olmo_eval/common/scorers/__init__.py # uv.lock
Judge: NarrativeQA, InfBench Sum and Multi-LexSum now grade through the shared JudgedTask. A judge reply that never parses is retried and then left unscored instead of scoring 0.0; -o judge_model and OLMO_EVAL_JUDGE change the judge that runs; the three summarization rubrics are judged concurrently; and the judge sees the visible response. Judge budgets match upstream (2048 tokens for LongQA, 4096 for summarization), the summarization parser gains upstream's fenced-JSON fallback, and the LongQA judge sees upstream's parse_output answer. The judge and its prompts move under evals/tasks, next to the tasks they grade. Multi-LexSum: keep only validation cases whose joined sources reach 65,536 reference tokens, take validation rows in the v20230518 release's dev.json order, sample them as Dataset.shuffle(seed) does, and draw each instance's two demos from the train split with upstream's per-instance demo_seed. dev.json and train.json are read from allenai/multi_lexsum at a pinned revision, which joins the task settings with the length floor. Missing key points in either summarization dataset now fail at load time. The judge tests run through score_responses with a scripted judge, and the Multi-LexSum loader is tested against Dataset.shuffle on fixture data. Co-Authored-By: Claude Opus 5.5 <[email protected]>
TaskConfig.judge_temperature sets the judge's sampling temperature. It is serialized only when set, so the hash of every task judging at the default temperature of 0 is unchanged; JudgeSettings carries it, with_config and grade_with_config_judge apply it, and -o judge_temperature=<t> parses as a float. HELMET's judged tasks set it to upstream's 0.1. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Both blocking items are fixed in 08d9f8a, along with a merge of current Blocking 1: judge failuresNarrativeQA, InfBench Sum and Multi-LexSum now go through
Blocking 2: Multi-LexSum selection
Also addressed
ParityThe 8k, 16k, and 32k results are in my comment above, and they're within about 1.5 points of the paper's average. Validation
|
HelmetTask now subclasses RulerTask, as RulerPlusTask does, and inherits
its variant lookup, instance cache, completion request and raw-text
answers; it overrides only data loading, prompt rendering and metadata,
and the chat request for its chat-format categories. The HELMET factory
goes through make_ruler_task_class, which now takes metrics, a primary
metric, stop sequences, mixin bases and extra class attributes.
HELMET keeps ("\n",) as its stop sequence: upstream's vLLM and API
backends stop on newline strings, and as a stop string the newline covers
the byte-level spellings in RULER's list. The unused prompt_template is
dropped from the HELMET loaders. No task hash changes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The task settings now record only what a run measures, and the run reads them from config.task_settings rather than HELMET_TASKS, so one record both drives the run and identifies it: - helmet: a whitelist of the measured HELMET_TASKS keys (length tier, shots, token budgets, question cap, thresholds, data subset, chat format). Suite flags, the task class and values that are already TaskConfig fields (limit, generation budget, stops) are left out, so a suite change or -o limit no longer moves or misreports the hash. - constants: each loader's MEASURED_CONSTANTS, which lists every piece of prompt text it renders -- templates, demo wrappers and separators, the truncation notice -- and its selection thresholds. Text that was built inline is now a named constant, with the rendered prompts unchanged. The completion prompt's answer-prefix separator is listed too; RulerTask now reads it from a class attribute. - sources and upstream: the pinned revisions and the HELMET commit. An override of the code-fixed parts, unknown or missing HELMET keys, or num_fewshot, fewshot_seed or split, which HELMET has no use for, is refused. Every HELMET hash moves; no other spec's does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
NB2:
NB5:
|
There was a problem hiding this comment.
1. Base models are sent chat requests
LongQA, summarization and cite set use_chat_template: True in their task settings (helmet_tasks.py:138,185,196,213,231,244), so HelmetTask.request_type always returns RequestType.CHAT for them. Upstream treats this as a run-level flag. Its configs set it for instruct models (they name Llama-3.1-8B-Instruct), and the README says to turn it off for base models:
--use_chat_template False # only if you are using non-instruction-tuned models, otherwise use the default.
With the flag off, upstream sends prompt_template as a completion, ending in the answer prefix (\n\nSummary:, \n\nAnswer:, or \nAnswer: for NarrativeQA). eval.py then prepends that prefix to the output before parsing.
Our runs predate 47581e4, so these tasks went out as completions with neither a chat template nor the prefix. On base models this breaks the tasks. At 16K, OLMicro-2.7B returned an empty string on 88 of 100 InfBench summaries (median 1 token: end-of-text right after "Now summarize the book.") and on 31 of 100 Multi-LexSum cases. On NarrativeQA it writes its own "Answer:" and then keeps inventing follow-up Q&A, which the judge marks disfluent. Since 47581e4, a base model would get a chat request instead. That's either a template it never trained on, or a vLLM error if the tokenizer has none.
Suggested fix: a run-level way to turn use_chat_template off, e.g. an override or a __base variant. It would send prompt_template as a completion and prepend the answer prefix to the output, as upstream does.
2. Prompts are never truncated with the evaluated model's tokenizer
Upstream truncates twice. truncate_llama2 cuts the documents to the nominal length in Llama-2 tokens, and the port does the same. Then, before generation, tokenize() in model_utils.py cuts again with the evaluated model's own tokenizer:
if tokenized_input.input_ids.size(1) > max_length - generation_max_length - buffer:
truncate_length = tokenized_input.input_ids.size(1) - (max_length - generation_max_length - buffer)
...
new_context = sample["context"][:context_tokens["offset_mapping"][0][-truncate_length][0]]It drops the end of the context and keeps the instructions and question. The port only has the first step. KILT's second trim (helmet_kilt_loader.py:116) is measured in Llama-2 tokens, and MS MARCO has none. So any model whose tokenizer splits text into more tokens than Llama-2's overflows at its longest length, and vLLM rejects the prompt. What we saw:
- Overflows for Qwen3 at 32K, SmolLM2 at 8K, Falcon-H1 at 128K, and Olmo-3-7B at 64K. Olmo-3-7B shares the Olmo tokenizer, and still about 6–7% of its 64K instances overflow.
- A rejected prompt fails its whole batch, and batches mix lengths, so short tasks fail too. In Qwen3-4B, 85 batch errors took down 366 instances, including 19 of 100
json_kv__4096, where no prompt overflows. - 23 of 36 external models failed all four attempts on
FailureBudgetExceeded. Only models with headroom pass: Qwen3.5 (trained to 262K) and Llama-3.2-1B get all 21 tasks at every length.
Suggested fix: port upstream's model-side cut. Truncate the end of the context to max_model_len - max_gen_toks tokens of the model's own tokenizer, at request time, ideally recording how many instances were cut per task.
3. The default judge has been retired
gpt-4o-2024-05-13 now fails on every call:
Error code: 404 - The model `gpt-4o-2024-05-13` has been deprecated
We ran with gpt-4o-2024-08-06.
4. Cite has only half its metrics
Upstream's Cite category averages six numbers, including citation_rec and citation_prec from the google/t5_xxl_true_nli_mixture NLI model (eval_alce.py, collect_results.py). The port has str_em and qampari_rec_top5 only (helmet.py:514: "needs AutoAIS and is not wired up yet"). So Cite, and therefore the overall HELMET score, isn't comparable with published numbers. Is wiring up AutoAIS planned for this PR? If not, the suite should probably name the category or the overall score as partial.
gregorybchris
left a comment
There was a problem hiding this comment.
This review was generated by an agent following
REVIEW_GUIDE.md. It is not from a human reviewer. Reply in the PR thread and a maintainer will follow up.
Both blocking items from 10/26 are fixed, and so are Non-blocking 1, 2 and 5, as described. Nothing blocking remains. Before merge, I'd like one run of the judged tasks, since the parity runs skipped exactly the code the two blockers were about, and a note on where the table's Cite numbers come from.
What was checked (head 76b984a2, which is up to date with main at 94195eab):
- CI is green. Locally,
ruff check,ruff format --checkandty check src/pass, andpytest tests/ --ignore=tests/integrationgives 4560 passed and 36 skipped. task_hashes.jsononly gains entries. No existing hash moves, so theRulerTaskrebase left every RULER hash unchanged.- I compared
load_multi_lexsum_datasetwith upstreamload_multi_lexsumataeadacc6, step by step. It matches: the short-summary filter, the 65,536-token floor with BOS counted, theDataset.shuffle(seed)permutation, and per-instance train demos fromdemo_seed. The pinneddev.jsonandtrain.jsonresolve on the Hub without a token. - I checked the judged tasks against the judge and scoring rules from #475, #492, #499, #477 and #512. They build on
JudgedTaskand ask throughJudge.askwith the run's limiter. A reply that never parses leaves the output unscored and counts against the failure budget.judge_resultkeeps every raw reply, including the other rubrics' replies when one rubric fails. Truncated outputs are still judged, andtruncation_rateis reported.judged = TrueappliesOLMO_EVAL_JUDGE, and the 18 judged specs are pinned underwith_judge_env. The judge goes throughbuild_openai_judge_fn, so judge timing and the OpenRouter fallback come for free. The custom metrics see the same filtered responses asAccuracyMetric. The two gaps are Non-blocking 6 and 7. - The LongQA judge's prompt,
correct_answersrendering,parse_output, model and temperature matcheval_gpt4_longqa.py. Dividinggpt4_scoreby 3 matches the100/3scaling incollect_results.py. - I instantiated the three judged tasks. They resolve to
gpt-4o-2024-05-13at temperature 0.1, with budgets of 2048 (LongQA) and 4096 (summarization), and they declareOPENAI_API_KEY.JudgedTaskcomes first in the MRO, but it supplies onlyscore_responsesandextract_answer, soHelmetTaskstill builds the chat request. - The parity table holds for this head. All three runs used
47581e48, which predatesc1f2a29e,88600143and76b984a2. I rendered all 54helmet_nojudgespecs at 8k, 16k and 32k at both commits with stubbed loaders. Loader arguments, request type, prompt assembly, sampling parameters, metrics and limits are identical. The loader diffs between the two commits only move strings into named constants. The 8k log shows every category as Success with 5500/5500 scored, and its numbers match the table.
Not checked: any judged task on real data or with a real judge (Non-blocking 1), and the private helmet-plus files.
Non-blocking
-
The judged tasks have never run.
narrativeqa,infbench_sum_engandmulti_lexsumare the code both blockers were about. Since the fix, they have run only on fixtures.- The parity runs used
helmet_nojudge. So the table has no Summ row, and its LongQA row leaves outnarrativeqa. - Only a real run can show three things:
- The hosted
multi_lexsum_val.jsonlcovers everydev.jsoncase that has a short summary. If not, the loader raises at load time. - The judge's parse rate with
gpt-4o-2024-05-13at these budgets. - Whether
gpt4_f1andgpt4_scoreland near the paper.
- The hosted
- Could you run the three judged tasks at 8k for Llama-3.1-8B-Instruct with
--no-upload? Please post the Summ row, LongQA withnarrativeqaincluded, and the unscored-output counts. At the default limit of 100, that is about 700 judge calls.
-
Where do the table's Cite numbers come from?
- Upstream's Cite category (
custom_avgsinscripts/collect_results.py) averages six metrics. Four of them arecitation_recandcitation_prec, which need AutoAIS. - If the "paper" column is
str_emandqampari_rec_top5taken from upstream's per-dataset results, the comparison is fair. Please say so under the table. - If it is the paper's Cite category score, the two columns measure different things. The same question applies to "Avg of 6 categories" next to the paper's seven-category average.
- Separately,
helmet_cite__*andhelmet_all__*average different metrics from upstream's Cite and overall scores. Neither the suite docstrings nor the description says so. Please name this deviation in both places.
- Upstream's Cite category (
-
RAG is 2.0 to 2.5 points low at all three lengths.
- The other categories land on both sides of zero, while RAG is low every time.
- The three lengths share questions, so one cause is more likely than three separate draws.
- One known difference is the demo draw:
- Upstream
load_qa(data.py:101-102) callsdemos.shuffle(seed=h), a numpy permutation. helmet_kilt_loader.py:207callsrandom.Random(h).shuffle, so each question gets different demos.
- Upstream
- This PR already has
shuffled_indicesinhelmet_multilexsum_loader.py:102, which reproducesDataset.shuffle. Could KILT use it, and could the RAG row be rerun? This is the open part of 10/26 Non-blocking 10.
-
The rest of 10/26 Non-blocking 10 is still open.
helmet_narrativeqa_loader.py:124-126uses one demo set for every instance. Upstream seeds each instance withdemo_seed(document id + question, seed)(data.py:208). The comment there says HELMET "shuffles the demo pool without a seed", and that is not what upstream does.- MS MARCO (
helmet_msmarco_loader.py:167) and ALCE (helmet_alce_loader.py:102,:115) still userandom.Randomwhere upstream usesDataset.shuffle. - For each one, please either match upstream or list it as a documented deviation.
-
HF_TOKENis still not declared (10/26 Non-blocking 12).allenai/helmet-plusis private, and no HELMET task listsHF_TOKENinrequired_secrets.- The parity runs worked for two reasons: Llama-3.1 is gated, and the workspace holds
jacksonp_HF_TOKEN. - A launch with an ungated model, in a workspace with no
<user>_HF_TOKEN, would get a 401 at data load.
-
The deterministic scorers still return 0.0 when they can't decide (10/26 Non-blocking 7).
- Since #492, the rule is that a scorer returns 0 for a wrong or unparseable answer and raises when it cannot decide (CONTRIBUTING "Failures and scoring", AGENTS.md "Failures aren't scores"). The runner then leaves the output unscored and counts it against the failure budget.
- These return 0.0 when the gold data is missing. That is a data error, not a wrong answer:
common/scorers/alce.py:64-65(noqa_pairs) and:88-89(noqampari_answers)common/scorers/retrieval.py:24-25and:39-40(no qrels)common/scorers/rouge.py:83-84and:107-108(no references)common/scorers/substring.py:85-90(no gold)HelmetExactMatchScorerandInfbenchChoiceScorer(evals/tasks/helmet.py:319-320,:349-350)
- The loaders always set these today, so this doesn't change current scores. It decides what a bad data file does: today it lowers the score with nothing recorded. Please raise in these branches and keep 0.0 for an empty or wrong prediction. A test per scorer that the missing-gold case leaves the output unscored through
score_responseswould cover it.
-
judge_temperaturedoesn't follow the default-model rule from #512.- #512 made a task's default reasoning effort go with its default model. Once
OLMO_EVAL_JUDGEor-o judge_modelnames another model, the default effort is dropped. HELMET's temperature of 0.1 stays instead. I checked onhelmet_multi_lexsum__8192:OLMO_EVAL_JUDGE=gpt-5.5-2026-04-23:mediumgivesjudge_temperature=0.1.-o judge_model=o3-2025-04-16givesjudge_temperature=0.1.
- Reasoning models reject a non-default temperature, and
build_openai_judge_fnthen stops sending it. So the hash records 0.1 for a judge that never received it. - Could
JudgeSettings.with_configand theOLMO_EVAL_JUDGEpath treat a class-default temperature like the default effort? It would then be dropped when the model changes, unless-o judge_temperatureis also given. This needs a test in each direction.
- #512 made a task's default reasoning effort go with its default model. Once
Nits
- Nit: The
judge_temperatureaddition to CONTRIBUTING.md (line 158) runs past the file's line width. Please rewrap the bullet. - Nit: The comment at
helmet.py:493still saysRecallMetric's substring scorer "is equivalent" to upstream'ssubstring_exact_matchfor json_kv. It only lowercases (10/26 Non-blocking 3). - Nit:
>128kleftovers are still there (10/26 Non-blocking 14):helmet_tasks.py:7"declares its owncontext_sizes", theCONTEXT_SIZESalias at:28, and the"256k"/"2m"examples athelmet_loader.py:58and:188.
Status of the 10/26 review
| Item | Status |
|---|---|
| B1 Judge failures score 0.0 | Fixed |
| B2 Multi-LexSum selection | Fixed. Matches upstream step by step |
NB1 Move to JudgedTask |
Done |
NB2 Build on RulerTask |
Done. RULER hashes unchanged |
| NB3 Scorer and metric duplication | Open |
| NB4 Loader copy-paste | Open |
NB5 task_settings drives the run |
Done. Requests are unchanged from the parity commit |
| NB6 Context trimming outside KILT | Open |
| NB7 Deterministic scorers return 0.0 on missing gold | Open (item 6) |
| NB8 HF encoder-decoder support | Open, and still in this PR |
NB9 RULER pin and rouge-score in this PR |
Open |
| NB10 Parity gaps | Partly fixed. Multi-LexSum and the judge's fenced fallback are done; KILT, MS MARCO, ALCE and NarrativeQA demos are open (items 3 and 4) |
| NB11 Upstream commit and real-model trial | Done for the non-judged tasks. Judged tasks are open (item 1) |
| NB12 Secrets | OPENAI_API_KEY is done. HF_TOKEN is open (item 5) |
| NB13 Loader and truncation tests | Partly done. Multi-LexSum and the judges are covered; the infbench, MS MARCO, ALCE and NarrativeQA loaders and sample_jsonl_rows are not |
NB14 >128k leftovers |
Partly done (see Nits) |
Before merge
Please post the judged-task run from item 1 and clarify the Cite column from item 2. Please also fix items 6 and 7. They are the two places where the PR doesn't yet follow the scoring and judge rules from #492 and #512, and both are small. Items 3 to 5 are each small too, and I'd encourage doing them here. Item 3 could close the one consistent gap in the table.
If you defer the rest, please file follow-up issues and link them here. The description links none yet:
- duplication (NB3, NB4)
- context trimming (NB6)
- scorers that return 0.0 on missing gold (NB7)
- the HF encoder-decoder support, to land with AutoAIS (NB8)
- any parity gaps from items 3 and 4 that you don't fix here
Once those are done and CI is green, you're free to merge.
|
@jopetty Yashas had some good points that would be good to change before merging.
|
# Conflicts: # src/olmo_eval/evals/tasks/common/base.py
OpenAI retired gpt-4o-2024-05-13, so HELMET's judged tasks now default to gpt-5.4-2026-03-05, the judge picked in Yashas's sweep. Like the rest of the gpt-5 series it rejects a non-default temperature, so HELMET no longer sets one. A task's default judge temperature now goes with its default model, as the default reasoning effort does: OLMO_EVAL_JUDGE or -o judge_model naming another model drops it unless -o judge_temperature sets one, and JudgeSettings.with_config does the same. Only the 36 judged HELMET specs change hash. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Upstream treats use_chat_template as a run-level flag and asks for it to be off for base models. The :base variant turns it off in task_settings, so LongQA, summarization and cite go out the way upstream sends them then: a completion of the user template, a newline or blank line, and the answer prefix. InfBench, Multi-LexSum and ALCE put a blank line before the prefix, as their upstream prompt_template does, and record that separator in their measured constants. Upstream also prepends the answer prefix to each completion before parsing, which decides what LongQA's parser and the summarization judge see. For the chat-format tasks run as completions, HelmetTask now puts the prefix back in strip_thinking_traces, which runners call before scoring, and keeps the generation in original_text. The completion-format categories keep scoring the bare output their parity runs validated, and their :base variant is the task itself. Every HELMET suite gets a :base twin made of its tasks' :base variants. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…indow HELMET's loaders truncate documents to the tier length in Llama-2 tokens, but upstream also cuts again before generating (tokenize in model_utils.py): with the evaluated model's own tokenizer, it removes the end of the context until the prompt fits the tier less the generation budget. Without that second cut, any model whose tokenizer splits text more finely than Llama-2's overflows its window at its longest tier, and the server rejects the request. LMRequest gains an optional ContextFit naming the text in the prompt that may be cut, with a prompt-token budget. The vLLM server provider counts the prompt as it will render it, chat template included, against the smaller of that budget and the room the window leaves for max_tokens, and removes the overflow from the end of the text using the model's local tokenizer's offsets, recounting up to three times since a cut can shift tokens at its edge. It records how many tokens it cut in each output's metadata. HelmetTask records where the document sits in each rendered prompt and names it as the ContextFit, with upstream's budget of the tier less max_gen_toks. Every HELMET task reports context_truncation_rate, the share of instances whose context was cut, read from the outputs so the judged tasks report it too. Co-Authored-By: Claude Opus 5.5 <[email protected]>
HELMET's Cite score averages six numbers: str_em, citation_rec and citation_prec for ASQA, and qampari_rec_top5, citation_rec and citation_prec for QAMPARI. The citation metrics come from AutoAIS, which asks google/t5_xxl_true_nli_mixture whether each claim's cited documents entail it. Without them Cite, and so the overall HELMET score, could not be compared with published numbers. AutoAisScorer ports compute_autoais from HELMET's eval_alce.py: NLTK sentences of at least five characters (QAMPARI: comma-separated items prefixed with the question), at most three citations per claim, a claim with no citation or one past the shown documents not entailed, and upstream's per-citation precision check. It calls the NLI model through an auxiliary provider named "autoais", records both scores and every NLI call on the output, and raises when a call fails. CitationMetric reads the scores and, like upstream, leaves out outputs with no claims; each Cite task's primary cite_score is the mean of its three metrics, so the category average is upstream's six-number mean. ALCE instances keep the documents their citations point to. vLLM cannot serve T5, so the model runs in the HF provider, using the encoder-decoder support already in this PR. The inference manager can now start an hf auxiliary provider: it sets a GPU aside and the scoring process loads the model there, via a new device argument; the provider serializes its async calls, since generate is not thread-safe. The helmet harness preset serves the model, pinned to its Hub commit, in bf16 as upstream loads it. The Cite tasks record it as judge_model, and the runner's pre-generation provider check now covers any context scorer that names a provider, so a run without it fails before generating. helmet_alce_*:no_autoais scores answer correctness alone for runs without the GPU; the nocite ablations keep answer correctness only, as upstream scores them without --citations. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The AutoAIS smoke run scored every instance, but its predictions held neither the citation scores and NLI calls nor how many context tokens each request lost: prediction files keep only known output-metadata keys. AutoAisScorer now records under judge_result, the key the other judged tasks use, and build_predictions keeps context_cut_tokens. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
From Claude: 1. 2. Truncation with the evaluated model's tokenizer (f9488cf, e9c9356) Smoke run: Qwen3-4B-Instruct-2507 with 3. Judge: 4. AutoAIS for Cite (8e333fc, e9c9356)
The NLI calls are saved under The NLI model is Smoke run: Llama-3.1-8B-Instruct, 8k, 25 instances per task, all scored (01M66DD710G7RMYEB5GZZ8E00R):
That's a Cite average of 33.4 against the paper's 36.3, within the noise of 25 instances. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Adds support for HELMET (ICLR 2025), the long-context benchmark: 138 tasks across all seven categories at HELMET's standard 4k–128k lengths.
json_kv,ruler_niah_{mk_2,mk_3,mv}kilt_{nq,triviaqa,hotpotqa,popqa}msmarco_rerank_psginfbench_{qa,choice}_eng,narrativeqainfbench_sum_eng,multi_lexsumtrec_{coarse,fine},banking77,clinic150,nlualce_{asqa,qampari}(_nociteablations registered but not averaged)Suites:
helmet_{category}__{size},helmet_all__{size}(mean over category averages), andhelmet_nojudge__{size}, which excludes the three LLM-judged tasks, following thescience:judge/science:nojudgesplit.Data:
allenai/helmet-pluson the Hub hosts HELMET's pre-retrieved KILT, MS MARCO and ALCE files. They are re-hosted unpacked from its 10GBdata.tar.gz, so consumers fetch per-task files. It also hosts the summarization keypoints, the json_kv tiers, and per-directory manifests, so loaders never hardcode filenames. The json_kv tiers are regenerated with HELMET's owngenerate_json_kv_data.py(same generator and parameters, calibrated against the Olmo 3 tokenizer). They match HELMET's distribution but not its exact instances. LongQA and ICL sources load from the Hub directly. Three ICL datasets are repointed becausedatasets≥4 dropped script loading. trec and banking77 load from parquet mirrors.nlu's Hub copy is no longer available, so it is rebuilt from the CSV its original loading script read (xliuhw/NLU-Evaluation-Data), using that script's logic. That reproduces its 25,715 rows and 68 labels in their original order. Split sizes and label counts were checked against HELMET's hardcoded values. Every source is pinned to a commit SHA:helmet-plus,ruler_data, InfiniteBench, NarrativeQA, banking77, clinc_oos, trec's parquet conversion, thenlusource CSV, and the Llama-2 reference tokenizer used for truncation.helmet-plusis private to AI2, so these tasks are internal.Task identity: each HELMET task serializes its resolved config into
TaskConfig.task_settings. That covers shots, token budgets, question caps, prompt templates and pinned source revisions, so changing any of them changes the task hash. The field is new and optional, and it is only emitted when set, so no other task's hash changes. The judged tasks also serialize their judge model, temperature and token budget.Metric infrastructure added:
calculate_metrics.A judge response that can't be parsed scores 0.0, and its prediction carries
judge_result.parse_errorand the raw response. HELMET instead drops such responses from the average, so failures can be counted and excluded after the fact.Parity target: this PR targets upstream princeton-nlp HELMET, not oe-eval. Scorers and parsers are verified against the upstream implementations case by case (
tests/evals/tasks/test_helmet.py). Every category average has the same tasks as upstream'scollect_results.py. Recall's RULER tasks read the same pre-generated files as theruler_*tasks and render prompts the way upstream does: every prompt was checked against the real data at 4k, 16k and 128k. They also use upstream's generation budgets. Known differences from upstream:citation_recandcitation_prec, which need AutoAIS, an 11B T5 NLI model. Here Cite averages answer correctness only. The category membership matches upstream:alce_asqaandalce_qampari, without the_nociteablations.scripts/internal/calibrate_helmet_icl_shots.pymeasures this.gpt-4-scoreis normalized to [0,1]; multiply by 3 to recover HELMET's number.use_chat_templatetasks this drops theAnswer:prefix, but requests still go out as COMPLETION. Upstream applies the tokenizer's chat template.ruler.pyhas the same gap.Differences from oe-eval (
oe_eval/tasks/oe_eval_tasks/helmet.py), as listed in the 9/29 review. Most come from following upstream:\n,Ċ,ĊĊ,<0x0A>\nqampari_f1qampari_rec_top5(upstream)Caveats for reviewers:
max_questionscaps questions, not instances. Each question repeats once per gold-passage depth (HELMET's "lost in the middle" sweep), so 100 questions ⇒ ~600 nq instances. Passinglimitcaps instances like any other task, at the cost of the depth sweep.🤖 Generated with Claude Code