Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/train/omega-llm/docs/WEIGHT-EDIT.md # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / train / omega-llm / docs / WEIGHT-EDIT.md` 104 lines ยท 5867 bytes Raw Blame History Source # Bounded direct weight experiment The experimental `tests/omegallm/weight-edit.om` edits a copy of an OLLM checkpoint. It does not change the trainer, inference engine, or any existing command. The operator requested direct weight adjustment after the rung-10 BF16 result. ## Operation and bounds Arguments are `OLD CURRENT NEW ALPHA_MILLI GAIN_MILLI`. OLD and CURRENT must have the same seven shape fields and seed; OLD's step cannot exceed CURRENT's. Both pass the existing checkpoint reader and payload hash check. NEW must not exist. The normal checkpoint writer writes and syncs a temporary file before renaming it to NEW. Use a private output directory without concurrent writers. For each weight, the editor computes `current + (ALPHA_MILLI / 1000 - 1) * (current - old)`. It then multiplies the final RMS gain vector by `GAIN_MILLI / 1000`. Alpha is bounded to 500 through 1200, and gain to 800 through 1200. It refuses non-finite results and weights with absolute value above one million. Output shape, seed, step, schedule metadata, and optimizer bytes are preserved from CURRENT; the payload hash is regenerated by the normal writer. The preserved optimizer state does not describe the edited weights' history. These are inference experiments. Do not continue training an edited checkpoint without a separately designed and tested optimizer-state policy. Scaling only the final gain changes prediction confidence. Because the output head is linear after final normalization, positive uniform scaling preserves the ideal-arithmetic next-token ranking for a fixed context. A loss improvement from this change alone is a calibration result, not evidence of improved reasoning. ## Build and independent checks Set `OMC` to the compiler pinned by `tests/omegallm/build.sh` and `OUT` to a private build directory, then run: ``` sh tests/omegallm/build-weight-edit.sh python3 tests/omegallm/weight-edit-check.py "$OUT" ``` The Python file is an external verification instrument, never a model dependency. It checks identity against the complete original file, five transformations against independently computed weights, unchanged optimizer bytes, production-loader hash validation, and refusals for an existing output, out-of-range controls, damaged input, and incompatible shapes. No GPU is needed for these checks. Additional refusal statuses are 51 (control range), 52 (existing output), 53 (incompatible source checkpoints), and 54 (invalid resulting weight). Existing checkpoint and I/O statuses retain their meanings. ## First experiment design The baseline is rung-10 BF16 step 60000, with its own step 30000 checkpoint as OLD. This compares points within one training trajectory; it does not mix independent initializations. The weight edit runs in Omega; scoring uses the unchanged, previously exercised rung-10 GPU binary and its f32 `geval` path. Before any candidate score, select 2,048 calibration stories and 4,096 final-test stories from the reserved `held-v1.bin`. Deduplicate by a SHA-256 of lowercase text with whitespace collapsed, and exclude normalized matches to the full training text or the published evaluation text. The final set is not used to select edits. This is an exact normalized overlap check, not a near-duplicate semantic check. The fixed search first tries alpha 0.90, 0.95, 1.00, 1.05, 1.10 at gain 1.00. At the best calibration alpha, it tries gain 0.90, 0.95, 1.00, 1.05, 1.10. Lock the lowest-loss choice before opening the final results; ties favor the smaller change. Preserve every result, including failures. Do not expand the search after seeing final scores. Reproduce the published baseline score before searching. Check CPU/GPU agreement on a baseline window and a selected-candidate window. Evaluate the selected model and baseline on the complete final set, sixteen paired contiguous blocks, and the original published evaluation set. Prefer at least 0.1% lower final loss and allow at most 0.2% regression on the original evaluation set. If those conditions fail, retain the original as the recommended checkpoint. Compare fixed-prompt samples, but do not treat an anecdotal sample as a general language-quality benchmark. ## Separate sibling-blend experiment The first search selected alpha 0.95, gain 1.00. Its fresh final loss was 1.210277 against 1.210473 for the baseline, a marginal change below the stated 0.1% preference. Its remaining paired-block checks were still running when the second experiment was specified. The second and final search compares the unmodified BF16 model with blends containing 90%, 75%, or 50% BF16 weights and the remainder from the full-length rung-8 f32 model. Those runs shared initialization and training schedule, but are distinct numerical trajectories. The editor's lower alpha bound is widened from 800 to 500 for this experiment; its arithmetic is unchanged. Use different reserve stories, starting after source story index 20000, excluding all normalized first-round calibration and final stories as well as training and published evaluation text. Again select on 2,048 calibration stories and lock one choice before evaluating the 4,096 final stories. Require at least 0.1% lower final loss for a substantive upgrade and at most 0.2% regression on the published set. No further search follows these final scores. Keep both experiments' receipts. The completed first search found only a 0.016192% fresh final-loss reduction; the second search rejected every BF16/f32 blend on calibration and selected the unchanged baseline. Retain the original training checkpoint. The small-gain copy is an optional inference experiment. Numerical records and limitations are in aien-train `evidence/OMEGALLM/weight-edit-20261104/README.md` (upstream, not in omega-mv). No installed skill, existing build command, or production model route is changed.