Odyssey_PyPro_10M: English β†’ Python, computed by a fixed threshold network

A small CPU neural network that reads a plain-English request and writes a complete Python function, byte by byte, followed by an end marker. It emits # UNSUPPORTED when the request is outside its domain.

How it was made. The weights were not trained:

  • A deterministic symbolic learner induced the English interface from 1,024 teacher-provided examples.
  • A build-time compiler lowered that interface, plus an inherited code-generation backend, into the numbers of one fixed network.

Label. Teacher-supervised, gradient-free English-to-Python neural compilation. This is not a pretrained language model, it does not understand unrestricted English, and it is not a general coder.

Quick start

pip install numpy safetensors
python odyssey_pypro.py 'Write a function named "top" with parameter "xs". Keep numbers at least 3, then sort them from largest to smallest.'

Output:

def top(xs):
    _v0 = list(xs)
    _v1 = [_x for _x in _v0 if _x >= 3]
    _v2 = sorted(_v1, reverse=True)
    return _v2

From Python:

from odyssey_pypro import load, generate
model = load()  # model.safetensors next to the script
print(generate(model, 'Create a function called "clean" that takes a list "vals". Remove duplicate numbers, then return how many numbers there are.'))

python examples.py runs seven requests and executes the generated functions on sample lists. One of the seven is an intentional rejection.

What it understands

Requests:

  • Bounded ASCII English, at most 512 bytes.
  • The function name and argument name must be double-quoted identifiers.
  • The input is always a list[int] function.
  • One or two operations, in clause order; a reduction can only come last.
  • Integer literals are written as digits: constants βˆ’5..5 and take counts 0..8.
Kind Operations
Filters >, >=, <, <=, ==, != against a constant
Maps add, subtract or multiply by a constant; negate; absolute value; square
List transforms ascending sort, descending sort, reverse, stable de-duplication, take the first n
Reductions sum, count, min, max (min and max of an empty list return 0)

Altogether: 21 operation families, 119 depth-1 settings and 357 legal ordered depth-2 pairs.

Phrasing it was taught: about 3 phrasings per operation, such as "keep the numbers at least 3", "keep only values of 3 or more", "sort them from largest to smallest" and "add 2 to each number". Names can come before or after the operations ("Name the function "f" and its parameter "x"."). Clauses join with "then" or "after".

Output: exactly the reference Python source shown above (4-space indents, final newline), or # UNSUPPORTED.

Results (fresh confirmation set, drawn after freezing)

Panel n Exact source Runs correctly
A: taught phrasings, new names and numbers 256 256 256
B: 72 operation pairs never seen in teaching 256 256 256
C: new combinations of taught phrase pieces 256 256 256
D: 128 minimal pairs (comparison, constant, name swap, operation order) 256 256 256
E: unseen synonyms (exploratory) 128 7 11
F: requests that must be rejected 128 110 correctly rejected β€”

The pre-registered gate did not pass. It required β‰₯ 95% correct rejection, and panel F reached 85.9%.

Known failure modes:

  • It accepts unsupported data types it never saw ("a list of dictionaries").
  • Over-general learned keywords such as total, up and drop can trigger the wrong operation. For example, "compute a running total" is read as a sum.
  • Most new synonyms are rejected or misread. In panel E, 41 of 128 requests produced wrong code.
  • Treat generated code as untrusted, and run it in a sandbox.

Executed checks used 76 input lists per program in an OS sandbox, against an independent interpreter, with strict types and an input-mutation check. These are finite tests, not proofs.

Architecture (rsat-v1)

Network:

  • 2,880 binary recurrent units.
  • 260 symbols: bytes plus BOS, EOS, SEP and PAD.
  • 270 input channels: symbol, mode and 8 clock phases.
  • 8 synchronous ticks per input byte.
  • Recurrent R (2880Γ—2880), input I (2880Γ—270) and output O (260Γ—2880) connections in {βˆ’1, 0, +1}; int16 thresholds theta and output bias.

Size:

Nominal parameter slots 9,823,940 (the "10M")
Active units 2,877
Nonzero connections R 7,708 / I 4,812 / O 481

Inference:

  • The state starts at zero for every request.
  • The prefix is BOS plus the request bytes; generation starts at SEP, and each emitted byte is fed back.
  • Each step is signed accumulation and thresholding. There is no matrix multiplication, attention or GPU.
  • About 40 ms per request on one CPU core.
File Contents
model.safetensors The five integer tensors (9.8 MB). Metadata: architecture id and limits. Canonical content hash 269051304c640c95536fd76e837523c3c720197213d2ea4da705e6a92371de36
runtime.py, sched.py The generic, task-neutral runtime and scheduler
odyssey_pypro.py Loader and generator (framing and length limits only)
examples.py Runnable examples
config.json Shapes, symbols, channels, limits
provenance/ Induced grammar (each rule lists the teaching examples supporting it), declared priors, authorship, task contract, preregistration, development history, build record, allocation report, confirmation summary, diagnostics, baselines, benchmarks, full stage report

How it was built, and what that means

  1. Teaching corpus: written by an LLM coding agent acting as teacher. It holds 1,024 positive and 64 rejection records, expanded from 63 authored phrase forms. These are template instantiations, not independent human examples.
  2. Symbolic learner (deterministic, no gradients or fitting):
    • induces role cues for which quoted name is the function and which is the argument;
    • induces operation phrase windows, allowed digits, clause connectors and rejection cues;
    • selects the shortest discriminative hypothesis, so every rule traces to supporting examples.
  3. Neural compiler, written by the same coding-agent LLM. It lowers those rules into phase-gated detectors inside the network, and reuses a code-emission backend from an earlier stage.

Evidence that the behavior depends on the examples:

  • With no English examples, the same compiler yields a network that accepts nothing.
  • Swapping the teaching labels for "reverse" and "sort ascending", with the source unchanged, flips the model's interpretation on 14/14 affected requests and changes 214 weights.

Limits of the claims:

  • One continuing AI session authored the corpus, learner, compiler and evaluation recipes. A post-freeze random seed made the test records fresh, but it does not make the evaluation independent.
  • Prior knowledge comes from the authored corpus, the induction hypothesis language and the inherited backend. All three are disclosed in provenance/.

Citation and provenance

Part of the Weight-Space Programming (WSP) research series by mvbalaji. The full source, including the teacher, learner, compiler, evaluator and every failed round, is preserved in the originating repository (branch stage-004, commit 4ebd01a).

Downloads last month
-
Safetensors
Model size
9.82M params
Tensor type
I16
Β·
I8
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support