Skip to content

Python engine features to carry into the native engine #840

Open

Description

@ashhart

These features shipped in the Python engine, from 0.2.0 through 0.6.6, and the people who wrote them are a big part of why it worked as well as it did. Thank you. The native engine should carry each of them, with your name on it.

A comment on a row claims it. If a row stays unclaimed, the maintainers port it and put your Co-authored-by line on the commit. docs/credits.md names the Python work each of these rows carries.

There is no pressure on timing. If you would like to bring yours across, claim it here and we will review it with you; either way, your name goes on it.

Activity

  1. liumorrisclaw commented on Oct 14, 2026

    @liumorrisclaw
    Contributor

    Claiming the Ampere sm_80 row (originally #464). @ashhart — I'll port it into zig/build/cuda.zig: kernel checks passing on sm_80, the README's "A100 not supported yet" line updated, and FP8 paths trapping below sm_89. PR to follow.

  2. liumorrisclaw commented on Oct 14, 2026

    @liumorrisclaw
    Contributor

    The sm_80 row is ported: #846 carries it into the native engine (release fatbins, README, and the ModelOpt floor's refusal by name). Review away.

  3. ashhart commented on Oct 14, 2026

    @ashhart
    OwnerAuthor

    Hello @liumorrisclaw,

    Thank you for claiming the Ampere sm_80 row, and for #846 so soon after.

    #846's device gate on a GA100 meets the row's bar: all 34 kernels build for compute_80, every release fatbin carries the sm_80 image, and the kernel checks pass on the card. The README line changes, and the ModelOpt floor now names its refusal. One docs line is left (packaging/README.md, noted on #846). The row moves when #846 lands, with your name on the commit.

    The other rows are still unclaimed.

    Thank you again.

  4. Boscoeuk commented on Oct 24, 2026

    @Boscoeuk
    Contributor

    Claiming the TF_GLM_CLEAR_THINKING row (#236, @MiaAI-Lab's), with @MiaAI-Lab's Co-authored-by line on the commit.

    On main (6244c620) the native server gives a template only enable_thinking and reasoning_effort (zig/src/server/hf_text.zig:352), so GLM-5.3's clear_thinking is never set: neither TF_GLM_CLEAR_THINKING=1 nor a request's chat_template_kwargs.clear_thinking reaches it.

    The port: TF_GLM_CLEAR_THINKING=1 sets clear_thinking: true for the server, a request's chat_template_kwargs.clear_thinking (a bool) wins over it, and without either the prompt renders byte for byte as it does now. Tests will render the GLM-5.3 template both ways. I'll check it on a Mac against GLM-5.3-Flash-MLX-4bit-MTP with a two-turn conversation, and post the result in the PR.

  5. javierbits commented on Oct 25, 2026

    @javierbits
    Contributor

    Claiming the return_token_ids row (#42, @vcruz305's), with @vcruz305's Co-authored-by line on the commit.

    On main (faccd11c) the native server already accepts return_token_ids and passes it through (zig/src/server/responses_translate.zig), but nothing reads it: the response's tensorfold block carries token_sha/token_sha256 and no ids.

    The port, in zig/src/server/chat.zig: the request flag rides Prepared/Generation like the other response-side options, and when it is set the runtime block gains token_ids — the reply's tokens, the very slice tokenSha/tokenSha256 hash, so the ids and the sha cannot disagree. Both response paths already stamp tensorfold (the whole body and the streaming final chunk), so streamed replies pick the ids up with no streamer change, and without the flag replies are byte for byte as they are now.

    Tests: a host test drives the scripted engine, asserts token_ids equals the scripted tokens and re-hashes to token_sha256, with the control that no token_ids appears without the flag. Then a GB10 CUDA run against a served checkpoint, posted in the PR. atc check 840 reported claimed: false, claimants: 0 before this comment.

  6. javierbits commented on Oct 25, 2026

    @javierbits
    Contributor

    The return_token_ids row is ported: #1290, with the host suite and the GB10 CUDA receipt (the pinned mlx-community/Qwen3.5-2B-MLX-4bit@93760be4 checkpoint, ids re-hashed against an independent SHA-256) in the description.

  7. jschmied commented on Oct 25, 2026

    @jschmied
    Contributor

    Claiming the CUDA part of the "Spill of evicted states" row (#68, @gilby's), with @gilby's Co-authored-by line on the commits.

    On main (674fb9e05), --learn-conversations writes kept states to disk on CUDA only for Nemotron (native/cuda_disk.zig). The CUDA qwen3_5 family (27B and 35B), Flash Next, GLM, Gemma 4, Dory and Kolibri-1 refuse it (cuda_refusal.zig:47).

    The plan is the CUDA qwen3_5 family first, then Flash Next, one PR each:

    • Each family gets the same disk rows as Nemotron's: 256-token blocks, the payoff rule and the caps.
    • Each family's kept state covers its KV prefix plus its recurrent and draft state at the mark.
    • The gate is a resumed state read back from disk equal to a fresh pass, including across a server restart, plus drafted == plain and concurrent == solo.

    --checkpoint-slots on Macs is not part of this claim.

  8. javierbits commented on Oct 25, 2026

    @javierbits
    Contributor

    Claiming the --name-priority ID=background row (#445, @philip-pentatonic's), with @philip-pentatonic's Co-authored-by line on the commit.

    On main (84e0d560) the native server has --alias, model_ids (served name first, then aliases) and api.Request.background, but no per-name default: chat.prepare computes background from the request's own priority field or a session title only. I also checked the end-ids row while picking: 33a10ee0 already carries it, so I left it alone.

    The port: --name-priority ID=background (repeatable) parses in zig/src/server/cli.zig with #445's refusals — anything but ID=background (the word case- and whitespace-insensitive) and an id that is neither --name nor an --alias; the native server has no separate MLX line, so that one refusal does not apply. The ids ride Server.Config.background_ids, and chat.prepare applies the default as #445's table does: a request with no priority of its own whose model id is named is background, an explicit priority wins, a session title is background either way. Replies are unchanged.

    Tests on the CPU fake-engine HTTP harness mirror #445's five-row table (named id without priority → background; other id → not; explicit background → background; explicit non-background on a named id → not; explicit background on a plain id → background), plus the parse and validation refusals. zig build test on this Linux aarch64 box; the GB10 is not needed.

  9. javierbits commented on Oct 25, 2026

    @javierbits
    Contributor

    Claiming the tensorfold plan row (#281, @akol1's), with @akol1's Co-authored-by line on the commit.

    On main (84e0d560) the native checkpoint CLI (zig/src/cli/cli.zig) offers models/info/pull/merge but no plan: the budget arithmetic lives only inside the server's startup admission, which names the memory budget ("free less a reserve") just when it refuses. I'll port #281's shape — tensorfold plan MODEL [--memory-gb GIB] [--ram GB]... answering from config.json and the local checkpoint before any download: per-RAM-class budget = min(allowance × RAM, ceiling), room = budget − process reserve, fits/does-not-fit per class, exit 1 with the smallest-fitting budget named as a hint. #281 is Mac/MLX-only; on this host the same math maps onto the native server's admission budget (the reserve behind TENSORFOLD_MEMORY_RESERVE_GIB), so the row's bar holds: the verdict equals tensorfold serve's startup budget for each model and RAM class. Verification is host-only: the Zig test suite green, the lean gate clean, and a plan-vs-serve comparison on the local Qwen3.5-2B checkpoint — no GPU needed.

  10. 13 remaining items

  11. gilby commented on Oct 26, 2026

    @gilby
    Contributor

    Claiming the Flash Next shared-session part of the spill row (#68): #1349 extends 47f397f's --spill-gib to an explicit --parallel above one on Macs, which still refused it. --learn and --learn-conversations (write behind) stay refused there.

  12. ashhart commented on Oct 28, 2026

    @ashhart
    OwnerAuthor

    Thanks @gilby. #1349 landed as 846c3e9 and shipped in 1.1.7, so Flash Next's shared sessions on Macs (an explicit --parallel above one) now spill evicted states with --spill-gib too.

    Where the rows stand on main, as of 1.1.8:

    Thank you all for bringing these across.

  13. ashhart commented on Oct 31, 2026

    @ashhart
    OwnerAuthor

    #1327 has landed, thanks @javierbits, with @simon-lin88's co-author line. The native server now takes
    --decode-share X (0 to under 1) instead of refusing it, on the CUDA, Metal and HIP lane servers: while a long prompt
    fills beside running replies, the replies get X of each fill step's time. Without the flag nothing changes. The flag
    can also cap a filling prompt's chunks at 512 rows, but that stays off for every model until it is shown to give the
    same tokens at any cut.

    Where the rows stand now:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions