Skip to content

ling: host-only family package from jschmied's ling-tiny - #1541

Merged
ashhart merged 4 commits into
ashhart:mainfrom
ThinkOffApp:ling-family-package
Oct 29, 2026
Merged

ashhart merged 4 commits into
ashhart:mainfrom
ThinkOffApp:ling-family-package

Conversation

@ThinkOffApp

Copy link
Copy Markdown
Contributor

What this changes

Host-only Ling family package that CUDA can share: config parse, weight map, fixtures, synth JSON, and the float64 oracle. Port of @jschmied's ling-tiny (98026d3) onto current main. Refs #1247. No CUDA or Metal kernels.

Credit: 74a444a is authored by Jürgen Schmied (files as in ling-tiny 98026d3). 8f3c31a is the host-only adaptation (Groups/Limits on Config, host gate, oracle docstring, MIT notice), Co-authored-by Jürgen Schmied.

Receipt

  • Environment, with the TensorFold commit, MLX or PyTorch version, machine and GPU, checkpoint and revision: ThinkOffApp/TensorFold ling-family-package 8f3c31a, Zig 0.17.0, MacBook M5 Max, macOS. No Ling checkpoint loaded. PyTorch not used.
  • Exactness, from tools/bench_concurrent.py --alone --serial or token_sha against "draft": false: n/a (no inference)
  • Decode speed before and after, from tools/bench_openai.py: n/a
  • Prompt speed before and after: n/a; this change does not reach prompt processing
  • Tests run, with pass, fail and skip counts:
    • zig test zig/src/families/ling/host_test.zig: 29 passed, 1 skipped, 0 failed. The skip is names_test's real-index test, which needs TF_LING_INDEX.
    • zig build test-ling-host: green
    • zig build test: 559/559 steps succeeded; 8160/8207 tests passed (47 skipped)
  • Not run, and why: the float64 oracle (zig/src/families/ling/oracle/ling_forward.py) needs torch and a real checkpoint; the gate only checks the file is present. The real-index name check needs TF_LING_INDEX.

synth.zig writes the tiny config JSON, not a checkpoint.

The q_lora allowlist {256, 512, 1536, 4096} comes from the CUDA glue instances.

Checklist

  • Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off. n/a: no inference change.
  • Drafted output equals "draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. n/a: no inference change.
  • No precision traded for speed.
  • A new or changed GPU kernel is registered with the kernel contract (docs/kernel-contract.md); each backend's SUMMARY line is in the receipt. n/a: no kernel change.
  • Prompt processing is no slower than the last release. n/a: no prompt-path change.
  • Platforms run: host tests and zig build test on MacBook M5 Max (macOS). Metal M1 to M4 not run. CUDA not run (not in this PR).
  • New tests fail before the change (the package is absent on main), pass after it, and skip cleanly without TF_LING_INDEX.
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths. No AI attribution lines.

@jschmied

Copy link
Copy Markdown
Contributor

I ran the two checks this PR marks as not run, on a GB10 with 8f3c31af0:

  • Real-index test. TF_LING_INDEX=<inclusionAI/Ling-3.1-flash model.safetensors.index.json> zig build test-ling-host: 30 passed, 0 skipped, 0 failed. The index lists 214,025 tensors, and names.check finds none missing and none unknown. The test is written for that config (fixtures/config.json). Pointed at Ling-3.0-tiny's index, it reports every tensor as unexpected, so a run against tiny's index would need its own test on tiny_config.json.
  • Float64 oracle. ling_forward.py on inclusionAI/Ling-3.0-tiny at 9a98e35f, 32 tokens, torch 2.14.0 and safetensors 0.8.0: 36 s, 15.9 GB peak. The output file is byte-identical to the one the ling-tiny version (98026d35, zig/tests/cuda/oracle/ling_forward.py) writes. As expected, since the two files differ only in the docstring.

No changes needed from my side.

@ThinkOffApp

Copy link
Copy Markdown
Contributor Author

Thanks @jschmied, that closes both of the PR's "not run" items, on real hardware. Good catch on the tiny index: a TF_LING_INDEX test against tiny_config.json can come with the Metal PR, so this one stays host-only.

jschmied and others added 4 commits October 29, 2026 12:54
Config parse, weight map, fixtures, synth JSON, and the float64 oracle
as in jschmied/TensorFold ling-tiny 98026d3. Host-only subset: no CUDA
kernels from the closed ashhart#874 draft.

Source: https://github.com/jschmied/TensorFold/tree/ling-tiny
Move group-limited routing and SwiGLU clamps onto Config so the host
tests do not import cuda.zig. Register test-ling-host. Reword the
oracle's first line (this PR has no tf-cuda-test). Short MIT notice
for Ling and jschmied.

Co-authored-by: Jürgen Schmied <[email protected]>
@ashhart
ashhart force-pushed the ling-family-package branch from 8f3c31a to f1cf75b Compare October 29, 2026 12:54
@ashhart
ashhart merged commit c4e1660 into ashhart:main Oct 29, 2026
9 checks passed
@ashhart

ashhart commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Thanks @ThinkOffApp and @jschmied, landed (e6a1165, 0642c0a) with one small commit of ours, 4cef5a2: the EXL3 refusal in config.zig now names the shared EXL3 module instead of a person, since that message ships in the binary. test-ling-host passes on main.

ajensenwaud added a commit to ajensenwaud/TensorFold that referenced this pull request Nov 9, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ajensenwaud added a commit to ajensenwaud/TensorFold that referenced this pull request Nov 9, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ajensenwaud added a commit to ajensenwaud/TensorFold that referenced this pull request Nov 12, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ashhart pushed a commit to ajensenwaud/TensorFold that referenced this pull request Nov 13, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ashhart pushed a commit to ajensenwaud/TensorFold that referenced this pull request Nov 19, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ashhart pushed a commit to ajensenwaud/TensorFold that referenced this pull request Nov 19, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ashhart pushed a commit to ajensenwaud/TensorFold that referenced this pull request Nov 19, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ashhart pushed a commit to ajensenwaud/TensorFold that referenced this pull request Nov 21, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ashhart pushed a commit to ajensenwaud/TensorFold that referenced this pull request Nov 21, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ashhart pushed a commit to ajensenwaud/TensorFold that referenced this pull request Nov 21, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ashhart pushed a commit to ajensenwaud/TensorFold that referenced this pull request Nov 21, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ashhart pushed a commit to ajensenwaud/TensorFold that referenced this pull request Nov 23, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
ashhart pushed a commit to ajensenwaud/TensorFold that referenced this pull request Nov 26, 2026
…nks, the native 262,144 window)

inclusionAI's Ling-3.1-flash (bailing_moe_v3: 63 KDA and 9 MLA layers, 512 routed experts with
group-limited sigmoid routing) on the native CUDA server, built on ashhart#874's TP=1 port and ashhart#1541's host
package (config, names, route, oracle, synth, fixtures). ashhart#850 step 5, on the shared pieces:

- KDA layers on the shared CUDA KDA (ashhart#2142's cuda.kda: chain, saved-row replay through replayLayers);
  config.fixed is held to kda.geometry in a test.
- Routing on moe_glue's group-limited score form (tf_moe_topk_sigmoid_score_groups).
- MLA on the shared mla image (cuda.mla: 576-wide chunk tiles, 128-wide absorb and expand, the plain
  rope, the head-wise output gate), merged by GLM's latent merge; prompt rows in the expanded form on
  the family's tf_ling_pattn.
- EXL3 packs through main's shared EXL3 operators (cuda.exl3 Dense and tiles, exl3_experts with
  tf_exl3_plan_finish_after for Ling's clamp order, exl3_grouped). bf16 checkpoints load for the
  synthetic checks; FP8 and NVFP4 checkpoints are refused by name (LingFormat).
- The dense shared expert's SwiGLU in Ling's clamp order: ling_act.cu instantiates glm_swiglu.cuh's
  rows with the clamp on silu's output.
- TP=2 over hosts (TF_LING_RANK, TF_LING_WORLD): heads, expert widths and the head's vocabulary cut on
  EXL3's 128-wide blocks; rank 1 follows rank 0's steps; RoCE gathers up to GLM's cap.
- Lanes: shared windows across streams, copy drafts, CUDA graphs for one sequence's verify windows,
  prompt states kept in memory for the prompt cache.
- Admission: --context up to the native 262,144 positions (LingContext past it); config rope_scaling is
  refused as main's config does; the MTP layer is not loaded (drafts come from the prompt's text).
- Checks in tf-cuda-test (ling-route, ling-mla, ling-clamp, ling-synth, ling-weights,
  ling-forward-synth, ling-lanes, ling-init-faults, ling-exl3-layers, ling-exl3-clamp, ling-tp,
  ling-ckpt-check, ling-slots), test-ling on the host, docs/recipes/ling-3.1-flash-cuda.md.

Wiring: the ling_glue and ling_act images, the engine in cuda_engines.zig, the native registry entry,
test-ling and the runner's ling_cuda import. GLM: glm/cuda_latent.merge is public (Ling's chunks merge
through tf_glm_merge). The family's fake driver reports a discrete device, so downloads in its host
tests copy directly instead of through main's per-thread pinned bounce.

Co-authored-by: Jürgen Schmied <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants