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/issues/02cb1b7555a52b78 # 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 # Fine-tuning: TURING selects verified training schedules to reduce memory traffic and time to quality Open · #606 · open 2026-10-20 18:10 UTC Imported from GitHub aien-dev/omega-mv#606, by drakestapleton drakestapleton wrote on 2026-10-20 18:10 UTC ## Goal Extend the locality work (#602–#605) and TURING selection (#522) to fine-tuning. Use numerical selection among qualified schedules without LLM deliberation. Mathematics still executes as computation: the goal is less unnecessary work, memory traffic and optimizer state, measured at preserved learning quality. ## Ownership and prerequisites Reuse Omega's autodiff/tensor facilities (src/autodiff/omega_autodiff.c, src/tensor/), native GB10 infrastructure, #522's evidence adapter and #583's cost ledger. First audit actual backward operators, adapter support and optimizer support; the existence of autodiff code does not establish complete GPU fine-tuning. Coordinate the model/data/training-loop owner in Sovereign Core and open only concrete missing prerequisites. Do not replace the existing scheduler or predictor. Keep separate from #475's inference-only experiment and all sealed campaigns. ## Experiment stages - Pin a small model or tractable block, training/development/held-out split, optimizer, precision, seeds, batch/sequence shapes, quality target and resource budget. Start with one independently checked forward/backward/update step before any sustained run. - Build a training DAG and memory ledger covering frozen/trainable weights, gradients, saved activations, optimizer states, accumulation buffers and communication. Reuse #602 bounds and #569 lifetime accounting. Make derivative dependencies explicit. - Compare equivalent training schedules: retain activations, selective checkpoint/recompute, legal fusion and tile reuse, and prepared static layouts. Hold effective batch, data order, optimizer and update semantics fixed. Preserve RNG/dropout behavior on recomputation; validate gradients and parameter updates, not just forward outputs. - Evaluate low-rank adaptation as a separate training-method arm if supported. Freeze base weights and update small adapter matrices. This can reduce trainable gradients/optimizer storage; it does not eliminate the base forward pass or activation-gradient propagation through frozen operations when required. Do not present LoRA as equivalent to full fine-tuning without held-out quality evidence. - Reuse only artifacts with unchanged dependencies. Updated weights invalidate affected activations; a frozen layer's output still changes when its input changes. Cache frozen-prefix features only with identical inputs, preprocessing, stochastic state and upstream parameters, including storage/lookup costs. - TURING selects among numerically qualified schedules for a fixed training method using predicted end-to-end step cost, resource constraints and uncertainty. Compare incumbent, min-measured-cost and predictor-informed choices. Method/rank/optimizer changes require a separate quality evaluation; step latency alone cannot choose them. - Measure time to a predefined validation-quality target and report final untouched held-out quality, peak memory, training tokens/s, external bytes, overhead and energy where actually measurable. Include preparation and search costs. A faster step that converges worse is not a win. ## Scoring placement Compare cached/CPU numerical decisions with an optional native GPU scorer only if its placement amortizes launch/communication cost. No LLM is needed to rank finite validated candidates. Fastest predicted is not guaranteed fastest actual; retain fallback, bounded calibration and evidence invalidation. No new GPU authority service. ## Acceptance - Capability audit identifies working, missing and untested training components. - Independent small-case gradient and optimizer-update checks; schedule equivalence within a frozen tolerance, including recomputation RNG handling. - Checkpoint, resume and repeated-step state behavior validated before a longer run. - Invalid/stale evidence or an incorrect fast candidate cannot win; changes to model, hardware, shapes and optimizer invalidate affected decisions. - Selection regret and total overhead measured on held-out shapes; no latency-as-Turing-unit relabeling. - Quality-target, learning-curve and memory results separate equivalent schedules from changed training methods; failed target runs reported as failures, not speedups. - Publish PASS/FAIL/INCONCLUSIVE/NOT_RUN with pinned commands and receipts. A feasibility-only negative result is valid. ## Research basis - LoRA: https://arxiv.org/abs/2106.09685 - Activation checkpointing trades extra arithmetic for lower memory: https://arxiv.org/abs/1604.06174 Use existing native toolchain, numerical contracts, hardware lock and workload scheduling. No automatic production model replacement, paid training or unspecified long-running job is part of this issue. This issue authorizes concrete research planning and bounded implementation under the repository's execution rules; hardware claims require actual receipts. ## .om specialist prerequisites and consumer integration, 2026-10-23 Research parent: #652. New consumers are aien-train #3 (SFT specialist) and #4 (gated feedback-learning comparison). They own training recipes and held-out quality experiments; this issue retains numerical operators, training schedules and time-to-quality measurement. Do not create a duplicate trainer or memory scheduler. Before those consumers run: - Record exact existing trainer/model owner, active .om paths and operator support. Separate forward-only inference from working backward/update support. - Qualify a tiny native forward/backward/update path against independently justified gradients and parameter updates, including nonfinite inputs, clipping where used, frozen/trainable parameter masks and dtype boundaries. - Qualify adapter application/gradient/serialization if selected; checkpoint/resume must bind weights, optimizer state, RNG, data position and numerical profile. - Measure memory for base weights, trainable state, activations, gradients, optimizer, sequence length and rollout/teacher buffers. Reject unsupported configurations before allocation. - Provide a versioned training-step API and numerical evidence to aien-train. Consumers must not infer completeness from existing autodiff headers or a loss curve. - Report time to fixed held-out quality and retention, not only tokens/sec or per-step latency. Include data generation, failed runs, compilation and evaluation costs. - Protect existing sealed campaigns and hardware windows. Current 27B inference acceleration remains a separate workstream. Governing implementation correction: new first-party training, runner and test logic is seeded .om. Qualify replacement, switch consumers and delete superseded active-tree code/dependencies under #599 and architecture #300. No permanent C/Rust/Python training wrapper, CUDA framework fallback or .osc feature is allowed. Missing capabilities go to their existing .om owners. Research: Selective Left-Shift , SDPO . These motivate experiments, not a predicted Spark training budget. Keep method changes separate from equivalent schedule comparisons. ## Concrete first arithmetic target: matmul and row reduction residency (2026-10-24) The capability audit now has a source-derived target in the generic tensor/autodiff path at `046cc9d2369951f484930be7a28f35fa9ab3b20b`. `omega_tensor_matmul` gathers dense A and transposed B, then packs both operands separately for every output dot product into bounded `pa/pb` blocks. It materializes elementwise products with FMUL and invokes a separate row reduction. Autodiff uses this matmul in the two backward products, as well as in its forward operation. For one unbatched f32 `A[M,K] * B[K,N]`, the two repeated packing copies alone account for 16MN*K logical bytes: two operands, four bytes per element, one source read plus one destination write. Materializing then reading the product adds another 8MN*K logical bytes, before input gathers, realization-specific transfers, padding and result movement. This is cumulative logical access accounting, not an O(MNK) peak-allocation claim or a measured DRAM total. The implementation already bounds product blocks; preserve that fact. The GB10 realization's `gb10_sum_rows` allocates host `cur/lvl/res` arrays, copies/pads each reduction level, invokes device reduction, and gathers each tile's lane-0 result on the host before the next level. This is a concrete residency boundary to remove if the selected consumer can keep the work device-owned. These files describe generic tensor arithmetic and training prerequisites, not the optimized FP8 serving graph or a measured bottleneck in the current 27B/35B service. The inspected GB10 realization references were in its implementation/header and qualification tests; the existence of the API does not establish a deployed training path. PR #674 , inspected at `8975287573f284dd2140b2f2b169619d3e145cf1`, adds native tensor metadata/lifetime admission and explicitly leaves allocation/arithmetic/autodiff incomplete. Reconcile that work rather than duplicating it. ### Bounded experiment within the existing training owner - Pin an actual tiny forward/backward consumer and its realization, dtype, shape/broadcast rules, arithmetic profile and source/seed identity. Trace the full step before attributing any served-model slowdown to these files. - Start with a device-owned row-reduction chain that keeps intermediate levels resident and writes only the required output. Charge staging, launch, padding, spills and visibility explicitly. Compare against the current exact declared reduction order. - Then evaluate tiled matmul that loads and reuses A/B values without copying each entire dot-product operand into separate expanded host arrays. Fuse product consumption into the reduction only while preserving the declared numerical contract. Reuse existing native numeric execution and #665 graph ownership; do not introduce another GEMM runtime. - Preserve separate FMUL rounding, the declared 32-lane reduction tree and padding/sign-zero behavior for the exact candidate. Tensor-core/FMA reassociation or a different precision is a separately qualified numerical candidate, not an exact optimization by algebra alone. - Report logical payload, actual transfers, host copies, peak host/device memory, launch counts and full forward/backward/update time for identical data and update semantics. Include tail sizes, non-contiguous/broadcast inputs, gradients, nonfinite/cancellation cases, alias/lifetime failures and a pressure regime where the candidate loses. - Verify independently justified tiny gradients and parameter updates before any time-to-quality claim. A lower copy count or passing forward-only result cannot close the training acceptance. Feed the movement and resource evidence to #602/#583 and qualified candidates to #522. Coordinate #663/#664/#665 and existing CUDApp execution owners. The final implementation and project-owned tests are seeded `.om`; migrate consumers and delete superseded first-party C/Rust code/dependencies under #599 and architecture #300. Historical source is evidence, not a retained fallback or duplicate oracle. Status: SOURCE_INSPECTED / PERFORMANCE_NOT_RUN. The byte formulas are exact under the stated source-level assumptions; achievable time and physical memory savings require target measurements. No comments. Sign in to comment