Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel

## Unreleased

- Ling-3.0-tiny on Metal: the KDA mixer uses Kimi's existing `k3_kda` kernel (full-width gate, D=128, 4 taps) wired to Ling-tiny's 16 heads. Host `mixF64` is checked against a float64 dump of `oracle/kda_inner.py` (a stdlib copy of `ling_forward.py` Model.kda from conv through y, r = identity; that file is not imported and is not edited) on 16 heads x 2 and 4 rows (worst 8.3e-10 and 1.1e-9). The copy equals Model.kda at worst abs 2.8e-14 on those shapes (fake Ckpt, r = identity, `oracle/kda_vs_model.py`). `k3_kda` versus the dump is 0.0102 at 2 rows and 0.0119 at 4 rows, gated at 2 x (2^-7 of the largest |y|); true bf16 steps at those magnitudes are about 1.3 and 1.5 (values in [1, 2) share one step of 2^-7). `k3_kda` versus the f32 mixer is 0.001953 at 2 and 4 rows (gated under 0.01). `mix`/`mixF64` return `error.KdaWidthTooWide` when W > 2048 (ReleaseFast-safe; the stack conv window is 3 x 2048). Fixture inputs regenerate byte-identical; committed y matches a regenerate to within one float64 ulp, so they are numerically reproducible, not hash-reproducible. Every check uses r = identity and a fake Ckpt. No new kernel (for #1247).
- Ling-3.0-tiny: a host KDA reference, and a Metal check that Kimi's `k3_kda` matches it at Ling-tiny's shape; nothing is served yet (part of #1247).
- Server: an image URL's host lookup stops at 3 seconds (or the request's deadline, if sooner) even when the system resolver keeps retrying, at most 64 lookups run at once, and a refused connection falls through to the host's next checked address (#3127).

- Living Weights: a fact graph write the OS refuses names its cause, for example "ShardWrite (ISDIR)" (#3126).
Expand Down
14 changes: 13 additions & 1 deletion zig/build/kernel_contract.zig
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ pub fn hostTests(b: *std.Build, family: *std.Build.Step) void {
}

/// macOS: tf-kernel-contract over the engine's Metal kernels; `kernel-contract` runs it on this Mac's GPU.
pub fn metal(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, metal_mod: *std.Build.Module, engine: *std.Build.Module, sources: *std.Build.Module) void {
pub fn metal(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, metal_mod: *std.Build.Module, engine: *std.Build.Module, sources: *std.Build.Module, kimi_metallib: *std.Build.Module) void {
@import("rotary_sweep.zig").steps(b, target, metal_mod);
const exe = b.addExecutable(.{ .name = "tf-kernel-contract", .root_module = b.createModule(.{
.root_source_file = b.path("zig/tests/contract/metal_main.zig"),
Expand Down Expand Up @@ -131,6 +131,18 @@ pub fn metal(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.buil
},
}) });
b.step("test-ling-route-gpu", "Ling grouped route on this GPU against the host formula").dependOn(&b.addRunArtifact(ling_gpu).step);
const ling_kda_gpu = b.addTest(.{ .root_module = b.createModule(.{
.root_source_file = b.path("zig/tests/ling_kda_gpu.zig"),
.target = target,
.optimize = optimize,
.link_libc = true,
.imports = &.{
.{ .name = "metal", .module = metal_mod },
.{ .name = "kda", .module = b.createModule(.{ .root_source_file = b.path("zig/src/families/ling/kda.zig") }) },
.{ .name = "kimi_metallib", .module = kimi_metallib },
},
}) });
b.step("test-ling-kda-gpu", "Ling KDA mixer on this GPU against kda.zig, using k3_kda").dependOn(&b.addRunArtifact(ling_kda_gpu).step);
}

/// Linux: `kernel-contract` runs tf-cuda-test's kernel-contract command (kernels from -Dnvcc or -Dfatbins).
Expand Down
2 changes: 1 addition & 1 deletion zig/build/ling_host.zig
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pub fn tests(b: *std.Build, target: std.Build.ResolvedTarget, test_step: *std.Bu
.target = target,
});
const run = b.addRunArtifact(b.addTest(.{ .root_module = root }));
b.step("test-ling-host", "Ling family package: config, names, tiny fixtures, synth JSON, grouped routing").dependOn(&run.step);
b.step("test-ling-host", "Ling family package: config, names, tiny fixtures, synth JSON, grouped routing, KDA mixer").dependOn(&run.step);
test_step.dependOn(&run.step);
}
2 changes: 1 addition & 1 deletion zig/build/metal_targets.zig
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ pub fn metalTargets(b: *std.Build, target: std.Build.ResolvedTarget, optimize: s
// The core lane, shared-context and Qwen3.8-27B programs and host tests.
qwen27_build.targets(b, target, optimize, metal, sources, engine, lanes, mods.qwen27, test_step);
core_checks.targets(b, target, optimize, metal, engine);
contract_build.metal(b, target, optimize, metal, engine, sources);
contract_build.metal(b, target, optimize, metal, engine, sources, kimi_bytes);
glm_checks.targets(b, target, optimize, metal, engine, sources);
flashnext_checks.targets(b, target, optimize, metal, engine);

Expand Down
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions zig/src/families/ling/host_test.zig
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ test {
_ = @import("tiny_test.zig");
_ = @import("synth.zig");
_ = @import("route.zig");
_ = @import("kda.zig");
}

test "the float64 oracle handles tiny's null SwiGLU lists" {
Expand Down
Loading
Loading