Archived
radiance 1.1.0
- The VRAM split has no ratio: --expert-vs-cache-ratio is gone (now an unknown option). The experts keep what the pinned host pool cannot hold, the KV cache takes the rest and lends idle blocks to the experts. Flash-Next at tp2: 7.9 GiB of KV a card, up from 4.7. Startup, /stats, /metrics and the dashboard report the most the cache can hold. - Linear-state snapshots live in pinned host memory, not VRAM (--checkpoint-slots sizes the store). Prefix-cache misses on agent sessions fixed; a published conversation is no longer trimmed away. - Any world size from the shipped container (baKon): --tp 3 on Flash-Next with no padded checkpoint -- the attention world, uneven delta-net heads, the fill op. - Kernels (keptn42): moe_gemm_q decode loads and one-trip run search, hc_read's prefill form (+3.7% prefill at 18K), hc_up row groups up to eight, the fused router launch. Each is the rule where it was measured faster; no environment switches. - Tool calls: a typed argument is always JSON (Python True/None no longer leak into arguments -- Codeberg #21); nine further reply-parser fixes; the reply path inside a call is ~12x cheaper on the host. - The kernel changes: prefill +2-3% and decode -2% a step on 2x R9700 at tp2, identical text.
This commit is contained in:
1 parent
9f5feb24ee
commit
82b5835c02
101 files changed
+5105
-3767
No files matched your search
+12
-9
@@ -644,17 +644,20 @@ HttpResponse Server::blocking_completion(const HttpRequest& req, OaiRequest& r)
|
||||
rd->feed(g.text, nullptr);
|
||||
rd->finish(nullptr);
|
||||
c.msg = rd->message();
|
||||
/* Only claim a tool call when the arguments actually parse (json_partial.h). */
|
||||
bool complete = r.parse_tools && !c.msg.tool_calls.empty();
|
||||
for (const auto& tc : c.msg.tool_calls)
|
||||
if (tc.name.empty() || !json_complete(tc.arguments)) complete = false;
|
||||
/* Only claim a tool call when every call closed and its arguments parse
|
||||
* (json_partial.h) -- the streaming path's rule (calls_complete). */
|
||||
const bool complete = r.parse_tools && calls_complete(c.msg);
|
||||
if (complete && (c.finish == Finish::Stop || c.finish == Finish::StopString))
|
||||
c.finish = Finish::ToolCalls;
|
||||
else if (!c.msg.tool_calls.empty() && !complete) {
|
||||
/* A half-finished call is content, not a call. The client gets what the model
|
||||
* actually produced instead of a tool invocation with truncated arguments. */
|
||||
c.msg.tool_calls.clear();
|
||||
c.msg.content = g.text;
|
||||
if (c.msg.open_call) {
|
||||
/* A half-finished call is content, not a call: the client gets what the model
|
||||
* wrote instead of a tool invocation with truncated arguments. Only that call
|
||||
* -- the reply ended inside it, so it is the last -- and only its own text:
|
||||
* the reasoning stays reasoning, and the calls before it, which closed, stay
|
||||
* calls, as the stream announced them. The finish reason is the stream's. */
|
||||
c.msg.content = rd->content_with_open_call(g.text);
|
||||
c.msg.tool_calls.pop_back();
|
||||
c.msg.open_call = false;
|
||||
}
|
||||
} else {
|
||||
c.msg.content = g.text;
|
||||
|
||||
Reference in new issue
Block a user