Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions app/nullius/catalogue/benchmarks/locomo/benchmark.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@
"upstream_limitations": [
"The 446 adversarial questions are left out, because the published file has no answer for them. 1,540 of the 1,986 questions remain.",
"The reader's model name must contain gpt-4 or gpt-3.5, as LoCoMo's own code requires. Any other model fails every question.",
"The paper's readers, gpt-4-turbo and gpt-3.5-turbo, now point to newer models. Scores can differ from the paper's for that reason.",
"OpenAI has retired gpt-4-turbo and gpt-3.5-turbo, so Original cannot run Like the paper. Choose Any of your choice; its scores do not compare with the paper's.",
"The reader gets 32 tokens per answer. A reasoning model can spend them all reasoning, and that question fails.",
"One unreadable reply stops the whole conversation, because LoCoMo's script writes its answers only at the end.",
"Original memory runs the paper's retrieval setup and needs a CUDA GPU. It writes facts and summaries anew each run, so they differ from the authors' released ones.",
"Contriever, LoCoMo's default retriever, and the OpenAI retriever fail as published, so they are not offered."
"Contriever, LoCoMo's default retriever, and the OpenAI retriever fail as published, so they are not offered.",
"Claude 3 Sonnet and Gemini 1.0 Pro, also readers in the paper, are retired and not offered."
],
"limitations": [
"The paper's other readers are not offered. Claude 3 Sonnet and Gemini Pro 1.0 are retired, and the Llama 3 and Mistral readers run only as local weights."
"The paper's Llama 2 70B, Llama 3 70B and Mistral 7B v0.2 readers are not offered: LoCoMo runs them as local weights, which Nullius does not serve."
],
"datasets": [
{
Expand Down
1 change: 1 addition & 0 deletions app/nullius/catalogue/benchmarks/locomo/standard.json
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@
"gpt-3.5-turbo-4k"
],
"default": "gpt-4-turbo",
"comparable": [],
"served_as": {
"gpt-3.5-turbo-16k": "gpt-3.5-turbo",
"gpt-3.5-turbo-12k": "gpt-3.5-turbo",
Expand Down
8 changes: 5 additions & 3 deletions app/nullius/standard/contract/definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1277,10 +1277,10 @@ def _setups(s) -> List[str]:
if "paper" in x and (not isinstance(x["paper"], str) or not x["paper"].strip()):
bad.append(f"{w}.paper: where the paper reports its numbers, in a phrase")
c = x.get("comparable", True)
if not isinstance(c, bool) and (not isinstance(c, list) or not c or len(set(c)) != len(c) or any(m not in models for m in c)
or x.get("default") not in c):
if not isinstance(c, bool) and (not isinstance(c, list) or len(set(c)) != len(c) or any(m not in models for m in c)
or (c and x.get("default") not in c)):
bad.append(f"{w}.comparable: false when no served model is the paper's, so its runs compare with each other only; "
"or those of its models whose runs compare with the paper's, its default among them")
"or those of its models whose runs compare with the paper's, its default among them; or [] when none can be run any more")
else:
allowed |= {"runs_as"}
orig = s.get("original") if isinstance(s.get("original"), dict) else None
Expand Down Expand Up @@ -1374,6 +1374,8 @@ def setup(bench: dict, which: str, model: str = "", provider: str = "", agent: s
if provider and provider not in orig["providers"]:
return None, f"the original runs on " + " or ".join(orig["providers"])
asked = sent = model
elif which == "original" and not paper_models(orig): # none can be run any more (comparable: [])
return None, "Paper models unavailable" + (": choose the model setup for another" if "model" in s else "")
elif which == "original":
model = model or orig["default"]
if model not in orig["models"]:
Expand Down
2 changes: 1 addition & 1 deletion app/nullius/standard/pages/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def _bench_page(b: dict) -> dict:
# One Original procedure, with separate reference-participant and paper-model metadata.
"setups": [{"key": k, "label": definitions.setup_label(b, k), "summary": x["summary"],
"reference_agent": x.get("reference_agent", ""), "turn_seconds": x.get("turn_seconds"),
"comparable": k == "original" and b["setups"]["original"].get("comparable", True) is not False, "units": (b["setups"]["original"].get("units") or b.get("units") or {}),
"comparable": k == "original" and b["setups"]["original"].get("comparable", True) not in (False, []), "units": (b["setups"]["original"].get("units") or b.get("units") or {}),
**({"models": definitions.paper_models(x), "default": x["default"], "providers": list(x["providers"]),
"sent": {p: {m: pre + (x.get("served_as") or {}).get(m, m) for m in definitions.paper_models(x)}
for p, pre in x["providers"].items()}}
Expand Down
2 changes: 1 addition & 1 deletion app/tests/catalogue_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def _setups(v: dict) -> str:
original = setups.get("original")
if not original:
return "none"
fixed = original.get("models") or v.get("simulator") or (v.get("score") or {}).get("judge")
fixed = definitions.paper_models(original) or v.get("simulator") or (v.get("score") or {}).get("judge")
model_choice = ", ".join((["Like the paper"] if fixed else []) + (["Like the leaderboard"] if v.get("leaderboard") else []) + ["Any of your choice"])
model_choice = " or ".join(model_choice.rsplit(", ", 1))
participant = original.get("reference_agent") or ("its own agents" if definitions.own_agents(v)
Expand Down
2 changes: 1 addition & 1 deletion app/tests/test_osworld2_muse.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def test_muse_spark_is_sent_as_meta_and_not_compared_with_the_paper(self):
self.assertTrue(definitions.setup(b, "original", "MiniMax-M3", "openrouter")[0]["comparable"])

def test_comparable_names_some_of_the_setups_models(self):
for value, ok in ((["MiniMax-M3"], True), (True, True), (False, True), ([MUSE], False), (["gpt-5"], False), ([], False),
for value, ok in ((["MiniMax-M3"], True), (True, True), (False, True), ([MUSE], False), (["gpt-5"], False), ([], True),
(["MiniMax-M3", "MiniMax-M3"], False)):
b = bench()
b["setups"]["original"]["comparable"] = value
Expand Down
28 changes: 18 additions & 10 deletions app/tests/test_standard_setups.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ def test_the_originals_side_models_go_as_the_provider_serves_them_and_never_as_t
self.assertTrue(any("side_models" in p for p in definitions.problems(
dict(self.b, setups={"original": dict(SETUPS["original"], side_models=["x", "x"])}), "benchmark")))

def test_paper_models_none_of_which_can_run_refuse_the_original_and_leave_the_model_setup(self):
b = dict(self.b, setups=dict(SETUPS, original=dict(SETUPS["original"], comparable=[])))
for model in ("", "paper-1"):
self.assertEqual(definitions.setup(b, "original", model, "openrouter"), (None, "Paper models unavailable: choose the model setup for another"))
self.assertEqual(definitions.setup(b, "model", "their-model", "openai")[0]["asked"], "paper-1")

def test_the_model_setup_asks_as_the_papers_model_and_sends_yours(self):
o, _ = definitions.setup(self.b, "model", "their-model", "openai")
self.assertEqual((o["asked"], o["sent"], o["comparable"]), ("paper-1", "their-model", False))
Expand Down Expand Up @@ -301,13 +307,14 @@ def test_a_setup_and_a_judge_need_a_provider_that_serves_chat(self):
self.assertIn("Anthropic does not serve what LongMemEval's judge speaks: choose another provider.", said)

def test_one_original_participant_uses_the_selected_model_scope(self):
paper = self.compiled(others=["original"], model_choice="paper", model="gpt-3.5-turbo-16k")
paper = self.compiled(benchmark="longmemeval", datasets=["longmemeval_s"], others=["original"], model_choice="paper", model="gpt-4o")
custom = self.compiled(others=["original"], model_choice="any", model="vendor/their-model")
for out in (paper, custom):
self.assertEqual(out["errors"], [])
self.assertIn("--bench-option retrieval=none", out["script"])
self.assertNotIn("--bench-option rag_mode", out["script"])
self.assertIn("run locomo original --model gpt-3.5-turbo-16k --provider openrouter", paper["script"])
self.assertIn("--bench-option retrieval=none", custom["script"])
self.assertNotIn("--bench-option rag_mode", custom["script"])
self.assertIn("run longmemeval original --model gpt-4o --provider openrouter", paper["script"])
self.assertTrue(self.compiled(others=["original"], model_choice="paper", model="gpt-4-turbo")["errors"]) # none is the paper's now
self.assertIn("run locomo model --model vendor/their-model", custom["script"])
self.assertTrue(self.compiled(others=["original"], model="")["errors"])

Expand All @@ -323,10 +330,11 @@ def test_locomo_dataset_counts_questions_when_only_its_original_runs(self):
self.assertEqual(rows["Scope"].split()[:2], ["all", "conversations"]) # the setup's own unit, with no count of its own

def test_paper_filter_also_applies_to_a_memory_capability(self):
out = self.compiled(others=["mem0"], model_choice="paper", model="gpt-3.5-turbo-16k")
longmem = dict(benchmark="longmemeval", datasets=["longmemeval_s"], others=["mem0"], model_choice="paper")
out = self.compiled(**longmem, model="gpt-4o")
self.assertEqual(out["errors"], [])
self.assertIn("--model openai/gpt-3.5-turbo", out["script"])
self.assertTrue(self.compiled(others=["mem0"], model_choice="paper", model="vendor/custom")["errors"])
self.assertIn("--model openai/gpt-4o-2024-08-06", out["script"])
self.assertTrue(self.compiled(**longmem, model="vendor/custom")["errors"])

def test_like_the_paper_without_paper_models_leaves_the_model_free_and_keeps_the_official_judge_and_user(self):
tau = dict(benchmark="tau3-bench", datasets=["airline"], others=["original"], provider="openai", model="their-model")
Expand Down Expand Up @@ -377,9 +385,9 @@ def test_the_original_plays_its_user_with_the_simulator_chosen(self):

def test_schema_exposes_one_original_and_the_paper_model_mapping(self):
benches = recipe.choices()["benchmarks"]
locomo = next(b for b in benches if b["key"] == "locomo")
self.assertEqual([s["key"] for s in locomo["setups"]], ["original"])
self.assertEqual(locomo["setups"][0]["sent"]["openrouter"]["gpt-3.5-turbo-16k"], "openai/gpt-3.5-turbo")
longmem = next(b for b in benches if b["key"] == "longmemeval")
self.assertEqual([s["key"] for s in longmem["setups"]], ["original"])
self.assertEqual(longmem["setups"][0]["sent"]["openrouter"]["gpt-4o"], "openai/gpt-4o-2024-08-06")

def test_a_gpu_option_is_refused_for_a_container_setup_and_asked_of_the_host_locally(self):
boxed = self.compiled(others=["original"], model="vendor/model", backend="container", bench_options={"retrieval": "dialog"})
Expand Down
4 changes: 2 additions & 2 deletions app/ui_tests/test_command_builder_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ def test_the_benchmark_comes_first_and_sets_the_runner_that_runs_it(self):
"standard", "harbor", "standard", "harbor"])

def test_like_the_paper_is_offered_when_the_paper_fixes_a_model(self):
out = self.js('process.stdout.write(JSON.stringify(["locomo","tau3-bench","gsm8k"].map(k=>{const r=C.createStandard(k);'
out = self.js('process.stdout.write(JSON.stringify(["longmemeval","tau3-bench","gsm8k","locomo"].map(k=>{const r=C.createStandard(k);'
'return [C.paperOffered(r),C.paperListed(r)];})));')
self.assertEqual(out, [[True, True], [True, False], [False, False]])
self.assertEqual(out, [[True, True], [True, False], [False, False], [False, False]])

def test_like_the_leaderboard_sets_its_options_and_attempts_and_leaving_it_gives_them_back(self):
out = self.js('const r=C.createStandard("tau3-bench");r.repeat=2;r.simulator_model="x";'
Expand Down
7 changes: 4 additions & 3 deletions docs/benchmarks/supported/locomo.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Very long-term conversational memory over conversations of 19 to 32 sessions.

| Version | Setups as published, whose model | Options |
|---|---|---|
| `locomo` | Original · Original memory · Like the paper or Any of your choice | `rag_mode`, `retrieval`, `retriever`, `top_k` |
| `locomo` | Original · Original memory · Any of your choice | `rag_mode`, `retrieval`, `retriever`, `top_k` |

## Options

Expand All @@ -59,15 +59,16 @@ Very long-term conversational memory over conversations of 19 to 32 sessions.

- The 446 adversarial questions are left out, because the published file has no answer for them. 1,540 of the 1,986 questions remain.
- The reader's model name must contain gpt-4 or gpt-3.5, as LoCoMo's own code requires. Any other model fails every question.
- The paper's readers, gpt-4-turbo and gpt-3.5-turbo, now point to newer models. Scores can differ from the paper's for that reason.
- OpenAI has retired gpt-4-turbo and gpt-3.5-turbo, so Original cannot run Like the paper. Choose Any of your choice; its scores do not compare with the paper's.
- The reader gets 32 tokens per answer. A reasoning model can spend them all reasoning, and that question fails.
- One unreadable reply stops the whole conversation, because LoCoMo's script writes its answers only at the end.
- Original memory runs the paper's retrieval setup and needs a CUDA GPU. It writes facts and summaries anew each run, so they differ from the authors' released ones.
- Contriever, LoCoMo's default retriever, and the OpenAI retriever fail as published, so they are not offered.
- Claude 3 Sonnet and Gemini 1.0 Pro, also readers in the paper, are retired and not offered.

## Nullius limitations

- The paper's other readers are not offered. Claude 3 Sonnet and Gemini Pro 1.0 are retired, and the Llama 3 and Mistral readers run only as local weights.
- The paper's Llama 2 70B, Llama 3 70B and Mistral 7B v0.2 readers are not offered: LoCoMo runs them as local weights, which Nullius does not serve.

## Cite

Expand Down
2 changes: 1 addition & 1 deletion docs/standard.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ already accepts arbitrary models needs only the `original` method.
| `model` driver method | The upstream is told `runs_as` (its window, batching and token budget) while the relay sends the model chosen. A model that reasons by default can spend that budget thinking: a last reply with neither text nor a tool call is `OutputLengthExceededError`. A last Responses reply that `failed` is an API error. A runner that fails after the unit is asked to stop is `CancelledError` |
| `units` | A setup may count its own units; `units` is sent `setup` |
| `answer` | Runs the upstream's answerer through the unit's relay; `score` is sent `setup` too. Local processes or the Original setup driver container |
| `comparable` | `false` when no model of `models` is the paper's, so its runs compare with each other only; or the list of those models whose runs compare with the paper's (`paper`), when the setup runs several agents and only some are the paper's: the builder offers those alone as Like the paper, the others as Any of your choice |
| `comparable` | `false` when no model of `models` is the paper's, so its runs compare with each other only; or the list of those models whose runs compare with the paper's (`paper`), when the setup runs several agents and only some are the paper's: the builder offers those alone as Like the paper, the others as Any of your choice; or `[]` when none can be run any more: Like the paper is greyed out, and `run BENCHMARK original` refused |
| Recorded | `standard.setup` in the config and each trial: its name, the model `asked` and `sent`, `comparable_with_paper`, and the benchmark's own agent that ran (`agent`), whose key is also the job's agent (`agent_info.name`) |
| Attempts | `cli run --attempts K` runs each unit K times; `result.json` carries [`pass_hat_k`](field-guide.md#attempts) |
| Retries | `cli run --retries N` runs a failed attempt again: [which failures](cli/run.md#retries) |
Expand Down