mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-06 04:44:19 +01:00
1,045 lines, one door, and the only way to find anything was to scroll. It is 509 now: what this is, the seven targets with their measured headline, how to install it, what speed and quality to expect, the targets and the switch, the tools, the cockpit in short, and an index table naming every other file and the question it answers. Seven sections moved out whole, each to its own file under docs/, each leaving a summary and a link behind: the 1M context mode, the flash lane, the cockpit tour, operations and upgrades, the opencode integration, the GB10 memory trap in full, and where each lane stands against upstream. The split was checked line by line against the file it came from. Of 1,045 lines, the only ones with no verbatim equivalent in the new README or in one of those files are the 32 rewritten on purpose, and each of those is a correction: - the headline said 65 tok/s for the 27B lane, which is the v1.9 figure. v1.14.0 measured 71.4 on the release image this lane has served since 2026-09-17, in the same campaign that measured 69.8 on the image it replaced. Title, target table and speed section now say 71.4 and name the campaign behind each number. - the memory section read as though the installed fraction were 0.50, which is the native-mode and ./run.sh value. The 1m mode has been the default since v1.12.1 and runs 0.76. Both are stated now, each with its mode. - the KV pool comparison published three boots against two. The engine journal has eleven for that day, six and five: 517,184 to 566,016 against 482,560 to 510,592. The ranges still do not overlap, by 6,592 tokens at their closest, but the gap on the means is 9.6% and not the 6% published from the subset. README, BENCHMARKS and the v1.14.1 entry all carry the full set now. - two citations pointed at text that is not there: the README claimed a flat-memory result was "quoted elsewhere in this README" when it lives in BENCHMARKS.md, and keepalive-proxy.py justified its 92% usable share by quoting a README line about a 178,560-token pool that no longer exists anywhere. Both now name where the number actually is. Neither was caused by this release; both survived because nothing checks a quoted section title. - the flash lane's quality is in the README as measured rather than as adjectives: GSM8K 97.41% over all 1,319 questions, MMLU 500 at 90.8%, HumanEval 164 pass@1 at 95.73%, tool calling 15/15 with reasoning off and on, needle 2/2 at 120K and 200K, conc-check 40/40 serial and 80/80 at four concurrent. evals/ ships the two drivers, because two of those numbers could not be reproduced from this repo. The image's run_eval --eval-name mmlu shells out to an sgl-eval binary it does not ship, and its HumanEval path needs a package that is not there and then dies in os.fork against the image's filelock. Six gates hold what makes them work, with a stub sglang and no network: the score line a caller greps, the dataset MMLU is measured against, spawn rather than fork, and one sample per task instead of the harness default of five, which at temperature 0 is the same answer five times. ARCHITECTURE.md gains the two directories it did not describe and tools-check.py in its table of instruments. TESTING.md gains a 2026-09-19 column counted mechanically on both commits: 34 test files against 20, 587 test functions against 442, 55 CI steps against 38. docs/flash-lane.md records the one boot in thirteen that died at CUDA graph capture on 2026-09-18, because a failure that costs twelve minutes and explains nothing belongs written down even when it happened once. Local CI: 56 steps, 55 ok, the socket gate failing on this serving box because other processes cycle ephemeral listeners during the suite, which is the case its own message describes. Both suites green: 223 and 370. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
135 lines
5.1 KiB
Python
135 lines
5.1 KiB
Python
#!/usr/bin/env python3
|
|
"""The two eval drivers must keep the contracts that make them work at all.
|
|
|
|
`evals/mmlu.py` and `evals/humaneval.py` exist because the image's own
|
|
invocations do not run: `run_eval --eval-name mmlu` shells out to an `sgl-eval`
|
|
binary the image does not ship, and its HumanEval path needs a `human_eval`
|
|
package that is not there and then dies in `os.fork`, because the image's
|
|
filelock refuses one. Both failures print a traceback and an empty score, which
|
|
reads exactly like a model that scored nothing, and that is how two runs were
|
|
lost on 2026-09-18.
|
|
|
|
So three things have to stay true, and none of them is visible from reading a
|
|
score: the drivers print a line a caller can grep, HumanEval never forks and
|
|
asks for one sample per task (at temperature 0 the harness default of five is
|
|
the same answer five times), and MMLU pulls the dataset the published numbers
|
|
were measured against. A stub `sglang` on the path lets all three be checked
|
|
here, with no image, no network and no engine.
|
|
"""
|
|
import json
|
|
import os
|
|
import pathlib
|
|
import shutil
|
|
import subprocess
|
|
import sys
|
|
import tempfile
|
|
import unittest
|
|
|
|
REPO = pathlib.Path(__file__).resolve().parents[1]
|
|
EVALS = REPO / "evals"
|
|
|
|
STUB_COMMON = '''
|
|
class ChatCompletionSampler:
|
|
def __init__(self, **kw):
|
|
self.kw = kw
|
|
'''
|
|
|
|
STUB_MMLU = '''
|
|
import json, os
|
|
|
|
|
|
class _Result:
|
|
score = 0.5
|
|
metrics = {"stem": 0.5}
|
|
|
|
|
|
class MMLUEval:
|
|
def __init__(self, filename, num_examples, num_threads):
|
|
with open(os.environ["STUB_LOG"], "w") as f:
|
|
json.dump({"filename": filename, "num_examples": num_examples,
|
|
"num_threads": num_threads}, f)
|
|
|
|
def __call__(self, sampler):
|
|
return _Result()
|
|
'''
|
|
|
|
STUB_HUMANEVAL = '''
|
|
import json, multiprocessing, os
|
|
|
|
|
|
class _Result:
|
|
score = 0.75
|
|
metrics = {"pass@1": 0.75}
|
|
|
|
|
|
class HumanEval:
|
|
def __init__(self, num_examples, num_threads, num_samples_per_task=5, ks_passes=(1, 2, 5)):
|
|
with open(os.environ["STUB_LOG"], "w") as f:
|
|
json.dump({"num_examples": num_examples, "num_threads": num_threads,
|
|
"samples_per_task": num_samples_per_task,
|
|
"ks": list(ks_passes),
|
|
"start_method": multiprocessing.get_start_method(allow_none=True)}, f)
|
|
|
|
def __call__(self, sampler):
|
|
return _Result()
|
|
'''
|
|
|
|
|
|
class EvalDrivers(unittest.TestCase):
|
|
def setUp(self):
|
|
self.tmp = pathlib.Path(tempfile.mkdtemp(prefix="eval-drivers-"))
|
|
self.addCleanup(shutil.rmtree, self.tmp, ignore_errors=True)
|
|
pkg = self.tmp / "sglang" / "test"
|
|
pkg.mkdir(parents=True)
|
|
(self.tmp / "sglang" / "__init__.py").write_text("")
|
|
(pkg / "__init__.py").write_text("")
|
|
(pkg / "simple_eval_common.py").write_text(STUB_COMMON)
|
|
(pkg / "simple_eval_mmlu.py").write_text(STUB_MMLU)
|
|
(pkg / "simple_eval_humaneval.py").write_text(STUB_HUMANEVAL)
|
|
self.log = self.tmp / "call.json"
|
|
|
|
def run_driver(self, name, *args):
|
|
r = subprocess.run([sys.executable, str(EVALS / name), *args],
|
|
capture_output=True, text=True, timeout=120,
|
|
env=dict(os.environ, PYTHONPATH=str(self.tmp),
|
|
STUB_LOG=str(self.log), OPENAI_API_KEY="k"))
|
|
self.assertEqual(r.returncode, 0, r.stdout + r.stderr)
|
|
return r.stdout, json.loads(self.log.read_text())
|
|
|
|
def test_mmlu_prints_a_score_a_caller_can_grep(self):
|
|
"""Every caller of these drivers reads one line: `'score': <value>`."""
|
|
out, _ = self.run_driver("mmlu.py", "m", "7", "3")
|
|
self.assertIn("'score': 0.5", out)
|
|
|
|
def test_mmlu_asks_for_the_dataset_the_numbers_were_measured_against(self):
|
|
"""A different CSV is a different benchmark wearing the same name."""
|
|
_, call = self.run_driver("mmlu.py", "m", "7", "3")
|
|
self.assertEqual(call["filename"],
|
|
"https://openaipublic.blob.core.windows.net/simple-evals/mmlu.csv")
|
|
self.assertEqual((call["num_examples"], call["num_threads"]), (7, 3))
|
|
|
|
def test_humaneval_never_forks(self):
|
|
"""The image's filelock refuses os.fork, and human_eval forks per problem."""
|
|
_, call = self.run_driver("humaneval.py", "m", "4", "2")
|
|
self.assertEqual(call["start_method"], "spawn")
|
|
|
|
def test_humaneval_asks_for_one_sample_per_task(self):
|
|
"""At temperature 0 the harness default of five measures pass@1 five times."""
|
|
_, call = self.run_driver("humaneval.py", "m", "4", "2")
|
|
self.assertEqual(call["samples_per_task"], 1)
|
|
self.assertEqual(call["ks"], [1])
|
|
|
|
def test_humaneval_prints_a_score_a_caller_can_grep(self):
|
|
out, _ = self.run_driver("humaneval.py", "m", "4", "2")
|
|
self.assertIn("'score': 0.75", out)
|
|
|
|
def test_both_take_an_optional_base_url(self):
|
|
"""The fourth argument is how these point at a proxy or another box."""
|
|
for name in ("mmlu.py", "humaneval.py"):
|
|
out, _ = self.run_driver(name, "m", "2", "1", "http://127.0.0.1:1/v1")
|
|
self.assertIn("'score':", out)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
unittest.main(verbosity=2)
|