Archived
radiance 1.2.1
- A checkpoint restore that found its snapshot slot given back stopped the engine (#33): a snapshot handed to an admission is now kept until its step has run, a lost one re-prefills that request instead, and a failed restore names the check and the rank. - The headroom warning had no fixed point (#32): it now checks the room left for a kernel's first launch and names the --gpu-headroom-mib value that clears it. - reasoning_effort (#31): the levels the chat template takes are probed at startup and published in /server_info; a level outside them is a 400 on `reasoning_effort` with `supported`; --reasoning-effort-map rewrites a client's level. - rad-convert reads published quantised releases (#29): AMD Quark MXFP4 byte for byte, and AutoRound (auto_round:auto_gptq) / GPTQ int4 and int8, with Flash-Next checkpoints that ship their experts one by one. - tool_choice "required" and a named function are served by a call grammar for the whole reply.
This commit is contained in:
1 parent
e95d397288
commit
d23c3e0d17
37 files changed
+1595
-147
No files matched your search
@@ -37,6 +37,9 @@ struct ApiError {
|
||||
std::string message;
|
||||
std::string param; /* "" when the error is not about one field */
|
||||
std::string code; /* "" when there is nothing more specific to say */
|
||||
/* The values `param` takes, when the error is a value outside a known set: `supported` in the
|
||||
* envelope, so a client can retry with one rather than parse the sentence. */
|
||||
std::vector<std::string> supported;
|
||||
|
||||
std::string dump() const; /* the OpenAI error envelope, as a JSON string */
|
||||
};
|
||||
@@ -147,6 +150,22 @@ struct OaiLimits {
|
||||
* dial at all. Seeded only when the request says nothing, so a caller always wins. */
|
||||
std::string default_reasoning_effort;
|
||||
|
||||
/* THE WORDS THE CHAT TEMPLATE TAKES AS `reasoning_effort`, found at startup by rendering each
|
||||
* word this server knows of (Server::probe_reasoning_efforts). Empty when the template takes
|
||||
* any word -- it does not read the variable, or reads it without refusing one -- and when
|
||||
* nothing was probed. A request whose effort the template refuses is answered with this set
|
||||
* rather than with the template's traceback (template_refusal). */
|
||||
std::vector<std::string> reasoning_efforts;
|
||||
|
||||
/* --reasoning-effort-map: an effort a request sends, replaced by the deployment's word before
|
||||
* the template sees it. For a client that always sends a word of OpenAI's ladder ("high")
|
||||
* to a model whose template has its own ("xhigh"). */
|
||||
std::map<std::string, std::string> reasoning_effort_map;
|
||||
|
||||
/* A STARTUP PROBE, NOT A REQUEST: what the template refuses is the answer being asked for, so
|
||||
* its refusal is not logged (ChatRenderOptions::quiet). */
|
||||
bool probe = false;
|
||||
|
||||
/* THE DEPLOYMENT'S DEFAULT `thinking_token_budget`, -1 for none. For the same reason the
|
||||
* effort default exists: an agent framework sizes max_tokens per turn and sends no budget, and
|
||||
* a reasoning block that spends the whole of max_tokens returns a turn with no answer in it.
|
||||
@@ -196,6 +215,19 @@ RequestThinking request_thinking(const json& b);
|
||||
* prompt served by the other. */
|
||||
void apply_template_defaults(const json& b, const OaiLimits& lim, ChatRenderOptions* opt);
|
||||
|
||||
/* --reasoning-effort-map, on the effort chat_template_kwargs put in the render options: a mapped
|
||||
* word replaces it, and a word mapped to "none" or "minimal" turns thinking off instead. The chat
|
||||
* endpoint maps the top-level `reasoning_effort` itself, before it reads "none" and "minimal";
|
||||
* this is the kwargs spelling, for it and for /tokenize. */
|
||||
void map_reasoning_effort(const OaiLimits& lim, ChatRenderOptions* opt);
|
||||
|
||||
/* THE 400 FOR A TEMPLATE THAT REFUSED A RENDER. An effort outside the template's known set
|
||||
* (OaiLimits::reasoning_efforts) is named as `reasoning_effort` with the set in `supported`, the
|
||||
* way OpenAI answers an unsupported value; anything else is `messages` with the template's own
|
||||
* sentence. */
|
||||
ApiError template_refusal(const ChatRenderOptions& opt, const OaiLimits& lim, int rs,
|
||||
const std::string& why);
|
||||
|
||||
/* True when `v` is a legal value of the sampler field a request spells `field`; otherwise `why`
|
||||
* says what the legal set is, in the words a 400 carries. The same table checks a request and the
|
||||
* command-line flag that sets the field's default, so a default the command line accepts is one
|
||||
|
||||
Reference in new issue
Block a user