interplane.Get Omega
Read in your language

omega-rosetta

aien-dev/omega-rosetta

Brought by drakestapleton

branch main Branches Tags History

omega-rosetta / bench / upstream / PR.md

143 lines · 6334 bytes Raw Blame History Source

Upstream package for nuprl/MultiPL-E (PUBLISH-QUEUE, not submitted)

This is not sent. Submitting it posts outside aien-dev and needs Drake's OK for this one item.

How it was checked (2026-10-27, Linux AArch64):

  1. git apply --check succeeded on a fresh clone at the base commit, and the patch then applied.
  2. MultiPL-E's own dataset_builder/prepare_prompts_for_hfhub.py ran in the patched tree with `--lang humaneval_to_om.py --doctests transform --prompt-terminology reworded. HumanEval gave 129 problems and mbpp-typedgave 272. Theirprompt`, tests, stop_tokens and language fields equal bench/prompts/*.jsonl for every problem. The script imports datasets, so this check ran in a throwaway venv with datasets 5.1.0.
  3. In the patched evaluation/src, containerized_eval.eval_string_script("om", …) ran on the two completions in evaluation/test_inputs/om-hand-0.0-keep-HumanEval53.json with OMEGA_OMC set. The results were OK (exit 0) and SyntaxError (omc error 4), which is the "first OK, second fails" shape the other test_inputs use.

NOT_RUN:


PR title

Add Omega (OM-2) as a MultiPL-E language

PR body

This adds Omega as a MultiPL-E target language with file extension .om. Omega is a small systems language with its own compiler, omc, which writes static AArch64 Linux executables directly.

What is added

Running it

Set OMEGA_OMC to an omc binary. eval_om.py checks its sha256 against OMEGA_OMC_SHA256, which defaults to the pinned build: omega-mv e5b32567a7aff3ce594e3254a622a846a6cd190b, sha256 2c82480596bbdc50cda9626866209ef662d5834f278f839ff4ce0250c495029f. If the hash doesn't match, it refuses to evaluate, so results always name one compiler. OMEGA_EVAL_TIMEOUT sets the per-program limit in seconds (default 15).

omc targets Linux AArch64 only. The current evaluation image is amd64, so this PR does not change the Dockerfile. Two options, neither tried:

An arm64 image could fetch the pinned compiler as follows:

RUN git clone https://github.com/aien-dev/omega-mv /omega && \
    git -C /omega checkout e5b32567a7aff3ce594e3254a622a846a6cd190b
ENV OMEGA_OMC=/omega/seed/out/omc

seed/omega-from-seed.sh in that repository can instead rebuild omc from its 408-byte seed.

Evidence

The adapter's own gate suite is bench/check.sh in aien-dev/omega-rosetta. It compiles every translated HumanEval and MBPP problem with a stub body.

completionspass@1
10 hand-written HumanEval solutions1.0
constant wrong answers0.0 (all wrong_answer)
invalid syntax0.0 (all SyntaxError)
traps0.0 (all trap)
infinite loops0.0 (all Timeout)

No language model was evaluated for this PR.

Licence

The contribution is offered under MultiPL-E's licence (BSD 3-Clause with the Machine Learning Restriction in LICENSE).


Wolfram check of the pass@k values

The bench/score.py estimator matches MultiPL-E's pass_k.estimator. Its pass@k values were checked with Wolfram:

WolframLanguageEvaluator:
  est[n_,c_,k_] := If[n - c < k, 1, 1 - Binomial[n - c, k]/Binomial[n, k]];
  {Mean[Table[est[1,1,1],10]], Mean[Table[est[1,0,1],10]],
   N[est[20,7,1],17], N[est[20,7,10],17], N[est[200,13,100],17], N[est[5,3,10],17]}
-> {1, 0, 0.35, 0.99845201238390093, 0.99991949719880544, 1.}

score.estimator gave 0.3500000000000001, 0.9984520123839009, 0.9999194971988055 and 1.0 for the last four. They agree to double precision.