Views
No views yet
(a · b) mod p for a prime p and integers a, b, where the answer must be produced by trained parameters, not hand-coded arithmetic.p:p < 256): a ~10.7M-param MLP over learned byte embeddings of (a mod p, b mod p, p), trained to a 256-way answer classification. Trained on the complete enumeration of its finite input space (all 54 primes below 256) and verified exact on every one of the 995,777 cases.p up to 2048 bits): a composition of four small trained cells —mul8: (byte, byte) → (hi, lo)add2: (byte, byte, carry) → (byte, carry)subb: (byte, byte, borrow) → (byte, borrow)sel: (overflow, borrow) → select-bitmul8). A fixed loop applies the cells across byte limbs to form the product a·b and reduce it mod p by Barrett reduction. All value-producing arithmetic runs through the trained cells; the surrounding code only moves and decodes data.a mod p, b mod p) and decomposed into byte limbs. preprocess_p supplies a single conditioning constant derived from p alone: the Barrett constant mu = floor(256^(2k)/p), where k is the byte-limb count of p. No operand is pre-scaled and no modular product is formed outside the trained cells — the reduction runs entirely through the cells on a·b. Answers are emitted as base-256 digits, MSB-first. Problems outside the specialists' range fall back to [0].| Metric | Value |
|---|---|
overall_accuracy (tiers 1–10) | 1.000 |
highest_tier_above_90 | 10 |
| Per-tier accuracy (T1–T10) | 100 / 100 each |
| Deterministic | ✓ |
| Inference wall-clock (1100 problems) | ~200 s of 300 s budget |
manifest.json — entry class + output_basemodel.py — router entry point (NeuralBignumModel)specialists/ — the two trained specialistsweights/ — trained cell + classifier weights