Skip to content

lane: Can one integer activation preserve the asymmetric SwiGLU caps in DeepSeek and GLM experts? #274

Done

Description

@wakesync

Question. Given synthetic gate and up projections, can a single integer table reproduce SiLU(min(g,10)) * clip(u,-10,10) to within one Q12 unit at every registered input? The gate has no lower cap. Do not silently clamp it at -10 to save table rows.

Why it is on the shortest path. Row U is the same in the DeepSeek-V4.1-Flash and GLM-5.3-Flash text experts. It ends before weighting, cast and down projection, which need not agree. Read as data only: deepseek-ai/DeepSeek-V4.1-Flash@314113f8a7dadb388215396ba5fbee2c610a04d6, inference/config.json (swiglu_limit) and inference/model.py (Expert.forward, lines 844-853); zai-org/GLM-5.3-Flash@46a050bec13002ad29ee795c16e61cf4fa3c4a9c/config.json and huggingface/transformers@f90e93c4f83974f634860e246cdfd2c68666d605, src/transformers/models/glm5_next/modeling_glm5_next.py (Glm5NextTextExperts._apply_gate, lines 136-141). Both limit settings are 10, both gates are capped only above, and both up branches are capped on both sides. A shared lookup here would not implement the common routed block. This does not depend on sparse-addressing results.

Milestone steps (one PR).

  1. Commit only experiments/<date>-<issue>-expert-asymmetric-cap/PREREG.md before experiment code. Pin and hash the cited texts, transcribe each source's operand order and operation boundary separately, record prior art and specify the oracle and stops. All inputs are supplied integers on the Q8 grid, not actual projections. Write every fixture operand into the registration, by literal or exact Cartesian-product definition, with score/evaluation order (no router scores), seeds (none), and expected hand values. Work every hand example before committing it.
  2. One fixed lowering. For signed input integers G,U in [-8192,8191], set k=min(G,2560), v=max(-2560,min(U,2560)). The only table, addressed by k+8192, has 10,753 rows. Row k contains T=roundTiesEven(65536*SiLU(k/256)). The Q12 output integer is roundTiesEven(T*v/4096) by exact signed division. Register byte order, hash and independent table rounding checks; use sufficient precision and stop if a rounding cannot be decided. Bounds: |T|≤655360, |v|≤2560, product ≤1,677,721,600 in magnitude, signed 32 bits suffice before division. This table and range arithmetic are a layout estimate, not proof measurements.
  3. Score G in increasing order across its entire 16,384-value domain. For each, score exactly U=[-8192,-2561,-2560,-2559,-256,-1,0,1,256,2559,2560,2561,8191] in that order. This grid stresses both sides of both caps without fitting anything. Independent observable: one scalar Decimal oracle per pinned source transcription, at 60 and 100 digits, using the original real-valued equations and supplied G/256,U/256, no candidate table, index, pre-clipped operands or intermediate rounding. Share only raw fixture inputs. Check both clamped intermediates exactly and compare decoded Q12 to each real reference; require both oracle outputs stable within 1e-50. Never import or execute the external source. This checks local translations of published code, not two running frameworks.
  4. Hand anchors: (G,U)=(0,8191) gives 0. (-8192,2560) uses g=-32 unchanged: 65536*SiLU(-32) lies between -0.5 and 0, so T=0, y=0. A false gate floor at -10 gives T=-30 and y=-19 there. (2816,-3072) caps to (10,-10); 65536*10/(1+exp(-10)) lies between 655330 and 655330.5, so T=655330 and the Q12 integer is RNE(-409581.25)=-409581. Register a second wrong-semantics control omitting the lower up cap: it must fail at this last pair. Keep controls out of the candidate verdict denominator. Report first disagreement by G/U, cap intermediates, integer output, lossless oracle values, error maxima and failure counts for both sources. Five fresh processes; register identical result hashes and report median/SD/min/max across runs, not independent samples.

Negative result. PASS requires correct clamped operands at every pair, each error ≤1/4096 in real units for both references, exact anchors, detection of both named controls, and repeatability. A valid measured miss rejects this lowering or its claimed boundary; publish the first failing pair, no new precision or table. A source disagreement, missing pin, undecidable rounding, oracle instability, broken harness or resource stop means STOP/no verdict: stop, preserve and report the first receipt. No self-retry. Any continuation requires a separate coordinator decision outside the registration and disclosure of the fault, authorization, chronology and affected evidence everywhere the result appears, including PR, ledger and renderings.

Out of scope. No weights, router or sparse addressing, model execution, native low-precision equivalence, GPU, rentals, proof, verifier or resource-speed claim. Inkling's tanh caps are a different function. Class B: new experiment directory, ENV.json, immutable raw summaries and RESULTS.md, plus one row in the results-ledger format on main when the PR opens (today research/results.yaml and its normal renderings). No shared operator or inventory changes.

Estimate. 1.5 hours, hard stop 2 hours including waits; ≤2 cores, ≤1 GB RAM, ≤20 MB new disk outside the repo. Cache oracle SiLU values per raw G separately from the table; stream comparisons, save concise counts, digests and worst/first witnesses, not millions of formatted decimals. Stop at 10 GB free. Zero weight bytes or spend.

Activity

  1. added
    loop:active
    P1
    gate:0
    on Dec 2, 2026
  2. wakesync commented on Dec 2, 2026

    @wakesync
    OwnerAuthor

    Draft PR #275, head be78c9b. PASS, measured and unreplicated: on 212,992 synthetic pairs per source, zero cap or error failures; max absolute error 0.00019805037805 for each local transcription, below 1/4096. Both wrong-semantics controls failed at their named anchors; five fresh processes produced identical payload hashes. No native framework, full expert, proof or performance claim. Local checks passed; the check-runs API returned zero runs at this head.

  3. wakesync commented on Dec 2, 2026

    @wakesync
    OwnerAuthor

    Scope correction for #275: PASS on supplied synthetic Q8 inputs. The integer table had 0/212,992 cap or error failures against each local transcription of pinned DeepSeek and GLM source. Every gate integer in the registered range was paired with only the 13 registered up values. Neither model was run; the result remains unreplicated.

  4. wakesync commented on Dec 2, 2026

    @wakesync
    OwnerAuthor

    Delivered by PR #275, merged as 6b0201b02ee0288629a7334cd6abb381d8ac7126.

    Outcome: PASS, in local transcriptions of pinned DeepSeek-V4.1-Flash and GLM source, on supplied synthetic Q8 inputs. Neither model was run and no weights were used.

    • One integer gate table (10,753 rows, Q16) reproduces the expert activation's asymmetric caps for both sources: the gate is capped only above, the up branch on both sides, limit 10 in both.
    • 0 failures in 212,992 synthetic pairs per source. Every registered gate integer was tried, each paired with only the 13 registered up values, not the full up domain.
    • Largest error about 0.00019805 against the registered bar of 0.000244140625 (one Q12 unit).
    • Both wrong-semantics controls were caught (a false lower gate cap and a missing lower up cap). Five runs agreed.

    Not established, as the PR says: the full up domain; two running frameworks agreeing (these are same-author readings of the pinned texts); route weights, the down projection, a full block, or model fidelity; a proof, circuit cost, memory saving or speed.

    Review: one model family (class B), a different family from the author's: one full review, which read the four pinned texts, reran the measurement, broke the code once on purpose and saw it stop, and redid the worst-case arithmetic itself; it asked for four wording changes so that every surface names the transcriptions, the synthetic inputs and the 13-value limit. Then a check of that wording fix and a check after the sync with main. No run file or code file changed after review.

    Closing as a single-deliverable issue.

  5. removed
    loop:active
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1gate:0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions