Skip to content
Closed
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
11 changes: 7 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,21 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel

## Unreleased

- Lanes: an optional normalized-row view of the prompt features, whose `null` default keeps every existing drafter path as it is (#4132, refs #2485). Thanks to @tacosta.

- Server: `/v1/responses` accepts one level of `namespace` tools: each function is offered to the model as `<namespace>__<name>`, and its calls come back with `name` and `namespace`, whole, streamed, stored and over WebSocket; requests without namespace tools are unchanged (#3610, fixes #3266). Thanks to @devopsfortunato.

- CUDA: a long prompt shares its steps with running replies by default: a filling prompt with more than 32,768 rows left takes a decode share of 0.25 and the 512-row chunk hint, as `--decode-share 0.25` does, while a shorter prompt fills whole as before; `--decode-share` and `TENSORFOLD_PREFILL_SHARE` keep their meanings (#3486, refs #3397). Thanks to @bikepresentball.

- Hy4-flash (`hy_v4_flash`) on Metal: `tensorfold-native serve` takes Tencent's 4- and 8-bit MLX checkpoints with DFly2 drafts, contexts to 256K tokens (128K by default; the compressed indexer recalls 2,048 keys a sparse layer past 2,048 tokens), and a following prompt that starts with the last one's tokens prefills only the rest; Hy4's chat template needs `str.format()` from #3816 (Refs #3797).
- CLI: `tensorfold log` reads the request journal read-only while a server runs: `list` with tokens, time to first token and decode rate, `show ID` with the reply decoded, `follow` across rotations and `--json`; journal `finish` records carry the queue wait, time to first token, decode rate and token counts (#4160, part of #3666).

- Engine: under SRPT scheduling, a prompt that finishes on its last fill step no longer writes its lent time to freed scheduler memory (#4159, fixes #3709).



- XPU: Qwen3.8 Flash Next serves with MTP and prompt snapshots on Intel Xe2, with 24 reported concurrency and sampling cells matching solo and plain decoding (#3587, fixes #3583). Thanks to @supernovae.

- DeepSeek V4.1 on Metal: with `--vision`, the server loads the checkpoint's vision tower (a checkpoint without `vision.*` tensors stops at load), and chats with PNG, JPEG or WebP image parts put the tower's rows into the prompt, within `--vision-image-tokens` (4,096 by default) and `--vision-max-images` (4); an image's span is prefilled in one chunk, the prompt cache keys image rows by the image's hash, text that spells the image token stays text, and a vision config with zero heads, a zero `max_wh_ratio` or a `downsample_ratio` below 2 is refused by name (#3926, part of #1676). Thanks to @gilby.



- Checkpoints: a bf16 weight stored in DFloat11's lossless form is read under its own name and decoded on the host at load to the bf16 bytes it was coded from, where such a checkpoint was refused by the missing tensor's name; GLM-5.3-Flash on CUDA is the one loader that attaches it, a damaged group is refused by name, and a checkpoint with no coded tensor loads as before (#3807, refs #3649). Thanks to @Bizuayeu.

- Idol's octree and Gaussian decoders now run natively on M5 Metal, from the denoiser's latent to the 3DGS PLY and camera. On an M5 Ultra, 262,144 Gaussians decode in 0.343 s against the SDK's 0.739 s, and 1,048,576 in 1.963 s against 4.653 s, at a 2.43 GB peak footprint against 5.64 GB. Given the SDK's probabilities and draws, every octree level's counts match, and the PLY's header and rows equal the SDK's. Both decoders sit as close to an fp32 run as the SDK's own; `tf-idol-decode` runs those gates from a `tools/zig/idol_case.py decode` case. The decoders' nine kernels are registered with the kernel contract (#1773, after #1766, for #1757). Thanks to @jayleaton.
Expand Down Expand Up @@ -544,6 +546,7 @@ Each release's page on GitHub has its notes and measurements. See [the 1.0.0 rel
- Tests: `tf-glm-run`'s `GLM_PROMPT_NLL` scores every prompt token's loss through GLM-5.3-Flash's prompt path, a dev-tool check for comparing builds whose weights differ (#3633).
- Qwen3.8-27B on CUDA: with paged KV and the shared prompt store, streams resumed from one prompt read each shared prefix key tile once a forward instead of once a stream, through join variants of the rows kernels that only such forwards take; on a GB10 at a 32K shared prefix, decode is 57% faster at eight streams and 28% at four with every reply equal to main's, and every other forward runs main's kernels byte for byte (#3653).
- Docs: `docs/openclaw.md` shows how to use TensorFold from OpenClaw through the [openclaw-tensorfold](https://github.com/ashhart/openclaw-tensorfold) plugin: OpenClaw starts `tensorfold serve` on demand through its local model service and stops it when OpenClaw exits or the server sits idle, or connects to a server you run; each model's context window, image input and reasoning efforts come from `/v1/models`. Checked on Metal with Nemotron 3.5 Lightning and Qwen3.8-27B (#3341).
- Lane host: the CUDA engine arms a default decode-share of 0.25 for long fills only — a filling prompt past 32,768 remaining rows shares its steps beside live decoders and takes the 512-row chunk hint, and a shorter one fills whole as main does; `--decode-share` and `TENSORFOLD_PREFILL_SHARE` keep their meanings, the flag sharing every long prompt and the env never arming the cap (#3397, #3486).

- Docs: the GLM-5.3-Flash CUDA recipe's Verified copy drafts section lists, for one checkpoint at TP=2 with `--parallel 4`, the loads that `TF_GLM_COPIES=1` sped up and the ones it slowed, and says the default stays off (#3335). Thanks to @Bizuayeu.
- Tests: the Qwen 3.8 27B Metal residency fixtures compile again on macOS after the DFlash2 target became a value (#3572).
Expand Down
4 changes: 3 additions & 1 deletion docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,9 @@ same handler and engine path. A response has that chat completion's prompt and t
assistant message's `reasoning_content`. `instructions` becomes the system message and is not carried to a later
turn.
- `tools` takes function tools; `tool_choice` takes `none`, `auto`, `required`, a function or `allowed_tools`;
`parallel_tool_calls` works as in chat.
`parallel_tool_calls` works as in chat. `namespace` groups are accepted too, one level deep: their function children
reach the engine flattened as `<namespace>__<tool>`, and their `function_call` items carry the child's `name` plus
the group as `namespace`. A child's own name cannot start with its group's `<namespace>__` prefix.
- `max_output_tokens` counts reasoning tokens too. `temperature`, `top_p`, `top_k`, `min_p` and `seed` sample as in
chat.
- `reasoning.effort` follows the chat effort rule: unset is the template's default and `none` turns thinking off.
Expand Down
2 changes: 2 additions & 0 deletions zig/src/core/engine_api.zig
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ pub const Info = struct {
prompt_cache_plan: ?PromptCachePlan = null,
/// --decode-share: the reply's share of a fill step's wall time beside live decoders; null: the engine's default.
decode_share: ?f64 = null,
/// engine-level default for --decode-share: long fills only; the flag wins; the env beats it; others pass null.
default_decode_share: ?f64 = null,
/// The engine scores decisions (`score`) and writes no text: the server refuses text requests.
decides: bool = false,
/// The engine is a reranker (it scores through `score`): the server answers POST /v1/rerank only when set.
Expand Down
2 changes: 1 addition & 1 deletion zig/src/core/lane_host.zig
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ pub const LaneHost = struct {
pub fn init(gpa: Allocator, io: std.Io, core: *lanes.Engine, info_: Info) LaneHost {
var shown = info_.ofLanes();
shown.draft_sources = shown.draft_sources.ofLanes(core.cfg, shown.lanes);
return .{ .gpa = gpa, .io = io, .core = core, .info_ = shown, .share = .withDecode(info_.decode_share), .decode_cap = info_.decode_share != null, .prefix = .fromEnv(), .pressure = .fromEnv(), .srpt = .fromEnv(), .kv = ledger.of(info_) };
return .{ .gpa = gpa, .io = io, .core = core, .info_ = shown, .share = fill.decodeShare.resolved(info_.decode_share, info_.default_decode_share), .decode_cap = fill.decodeShare.capped(info_.decode_share, info_.default_decode_share), .prefix = .fromEnv(), .pressure = .fromEnv(), .srpt = .fromEnv(), .kv = ledger.of(info_) };
}

/// A paged family's pool counts in this host's ledger, the only test its promises pass (#1943); before `start`.
Expand Down
32 changes: 32 additions & 0 deletions zig/src/core/lane_host_decode_share.zig
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
//! --decode-share's resolution: how the flag, the env and an engine's default combine into a host's share.
const fill = @import("lane_host_fill.zig");

/// --decode-share's share x: the prompt's p is its complement, floored at min_share; 0 keeps whole prompts.
pub fn fromDecode(x: f64) fill.Share {
if (!(x > 0 and x < 1)) return .{};
return .{ .p = @max(1 - x, fill.Share.min_share) };
}

/// The env's share, with --decode-share's p in its place when given; the row budget always comes from the env.
pub fn withDecode(decode_share: ?f64) fill.Share {
var s = fill.Share.fromEnv();
if (decode_share) |x| s.p = fromDecode(x).p;
return s;
}

/// The flag wins; the env beats a default and never arms the cap; a default arms past Share.default_arm_rows only.
pub fn resolved(decode_share: ?f64, default_decode_share: ?f64) fill.Share {
var s = withDecode(decode_share);
if (decode_share == null) if (default_decode_share) |d| if (s.p >= 1 and !s.env_share) {
s.p = fromDecode(d).p;
s.defaulted = true;
};
return s;
}

/// Whether an explicit share (the flag or an engine default) offers the chunk cap; the env alone never does.
pub fn capped(decode_share: ?f64, default_decode_share: ?f64) bool {
if (decode_share != null) return true;
const s = withDecode(null);
return default_decode_share != null and s.p >= 1 and !s.env_share;
}
Loading
Loading