interplane.Get Omega
Read in your language

aien-train

AIEN training programme: language-model history, GB10 constraints and the route to training on the project engine. Plans and runnable checks are distinguished.

Brought by drakestapleton

branch main Branches Tags History

aien-train / docs / omegallm / GROW.md

82 lines · 4707 bytes Raw Blame History Rendered
1# Grow a trained Omega LLM
2
3`ollm grow` adds trainable residual layers to an existing checkpoint. It keeps the
4learned embeddings, original layers and final normalization gain byte for byte.
5This is a capacity operation. A larger checkpoint is not evidence of better
6reasoning, coding, conversation or held-out quality.
7
8```sh
9ollm grow INPUT.ck OUTPUT.ck LAYERS TOTAL LRMICRO
10```
11
12`LAYERS` is the new total depth, strictly greater than the input depth. All other
13shape fields, the seed, gradient-block count and CK01/CK02 format are preserved.
14The existing model geometry and memory-pool checks apply. `TOTAL` is a positive
15training-step count accepted by `tune`; `LRMICRO` must be positive. The command
16prints `G OLD_LAYERS NEW_LAYERS PARAMETERS`.
17
18The output starts at step zero with zero Adam moments and the specified learning
19rate and schedule, just as a fresh fine-tune does. Retaining moments while changing
20the model is intentionally not supported. Use the same tokenizer as the input.
21`train` consumes the ordinary output checkpoint. The GPU trainers use the same
22checkpoint format, but growth followed by GPU training has not been exercised.
23This change tests host training only.
24
25On Linux, the normal checkpoint writer saves OUTPUT.ck through OUTPUT.ck.tmp. As with
26`tune`, an existing output is replaced. Use a distinct output in a private working
27directory and preserve the input. Do not target a served checkpoint or a path
28another process is writing. Checkpoints derived from private data remain private.
29
30## Initialization and storage
31
32The own `oinit` initializer supplies the new layers' gains and input projections.
33Their attention output projection (`Wo`) and feed-forward output projection
34(`W2`) are then zeroed. Thus their residual contributions start at zero, while
35the input projections are populated so that these branches can learn. Old layers
36are restored without scaling. The final gain moves after the added layers.
37
38The existing gradient cold store holds a snapshot of the input weights. Growth
39increases the parameter count, so the new Adam region begins beyond this snapshot.
40No new parameter-sized allocation, checkpoint format or inference kernel is added.
41The existing parameter and activation banks handle the enlarged model. Added
42layers still cost inference work before they learn; this is not a speed feature.
43
44Non-finite source weights are refused with exit 54. Other checkpoint failures
45retain their existing exit codes. A non-increasing or unsupported depth, invalid
46schedule or zero learning rate returns 12; malformed arguments return 2. Invalid
47requests do not call the checkpoint writer. Finite weights alone do not guarantee
48that every possible input has finite intermediate activations; preservation is
49checked on measured inputs, not asserted for arbitrary floating-point states.
50
51## Verification
52
53```sh
54python3 tests/omegallm/grow-gate.py compilers.json /private/growth-gate --core 4
55```
56
57The release gate discovers the targets from `build.sh`, requires a local JSON
58object mapping every target name to its pinned compiler path, builds every target,
59and then runs the host growth checks. Keep the a64efi compiler with its existing
60`../a64efi/efirt.om` companion. Missing compilers or a failed target stop the gate.
61Compiling the GPU and EFI targets is not a claim of running growth on them.
62
63The external Python instrument reuses the repository's independent checkpoint,
64initialization and forward/backward oracle. It tests both checkpoint versions,
65all preserved tensors, deterministic growth, sampled-token and held-out-loss
66preservation, gradients and actual updates in new branches, training-resume
67identity, repeated growth to the current depth boundary, invalid inputs and
68non-finite weights. It repeats the checks using the reduced-bank variant built by
69`build.sh`, and
70checks preservation and non-finite refusals beyond the first snapshot chunk.
71Native `eval` comparisons check the printed micro-nat and micro-bits-per-byte values, not
72bitwise internal losses; the independent oracle also compares its unrounded
73losses. The bitwise preservation claim applies to the saved learned tensors.
74Compiled negative controls must be caught: nonzero attention/FFN outputs,
75missing old weights, lost final gain, stale optimizer state, lost signed-zero bits,
76dead new inputs and a truncated snapshot. Preservation compares packed tensor bytes
77and includes a negative-zero source weight.
78Python is not a product dependency.
79
80Before promoting any grown checkpoint, train it and compare it with its source
81on preregistered held-out tasks, including code and unanswered-question cases.
82Preservation and trainability checks do not substitute for that quality test.