Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
GLM-5.3-Flash Living Weights: the --slide learner, Nemotron's slide m…
…achinery over the one GLM site

The lane host's learn hook (glm_slide.zig) attached in glm_host as Nemotron's is in metal.zig. The learner reuses
Sliding Weights' lesson, subspace choice, gate, gated rounds, commit, mining and guard (nemotron/choice.zig and
subspace.zig unchanged), generic over its trainer. The Metal trainer caches one GPU capture per example (everything
before layer 44's MLP is independent of the change) and runs the tail past the site and its backward to b on the CPU,
exact through the last hyper-connection. Saves spawn a new shard holding only the new ranks.

A chat template that closes no assistant turn (GLM-5.3) now ends each lesson's answer with the next turn's first token,
so learned answers stop. --slide with --speed-up is refused.

zig build test-lw: the CPU tail and its gradient against finite differences, the learner's state machine end to end on
a host toy model, save rounding and undo; no GPU.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
  • Loading branch information
indexer-bf16 and claude committed Oct 10, 2026
commit 062f8ca3c5ee0808912811fbc8853db0de070acb
10 changes: 10 additions & 0 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ pub fn build(b: *std.Build) void {
const cost_run = b.addRunArtifact(cost_cases);
b.step("test-cost-rule", "CPU scripted window and interleaved head timing").dependOn(&cost_run.step);
test_step.dependOn(&cost_run.step);
// Living Weights on GLM-5.3-Flash: the learner's host math (no GPU), on every OS
const lw_cases = b.addTest(.{ .root_module = b.createModule(.{
.root_source_file = b.path("zig/src/lw_glm_tests.zig"),
.target = target,
.optimize = .Debug,
.link_libc = true,
}) });
const lw_run = b.addRunArtifact(lw_cases);
b.step("test-lw", "Living Weights (GLM-5.3-Flash): host math and learner logic, no GPU").dependOn(&lw_run.step);
test_step.dependOn(&lw_run.step);
switch (target.result.os.tag) {
.macos => metalTargets(b, target, optimize, draft_ids, build_options, test_step),
.linux => cuda_build.targets(b, target, optimize, draft_ids, build_options),
Expand Down
3 changes: 3 additions & 0 deletions zig/src/families/glm/glm.zig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ pub const ep = @import("ep.zig");
pub const slots = @import("slots.zig");
pub const backend = @import("backend.zig");
pub const mirror = @import("mirror.zig");
pub const living = @import("living.zig");
pub const lw_learner = @import("lw_learner.zig");
pub const lw_train = @import("lw_train.zig");

test {
_ = config;
Expand Down
Loading