Archived
radiance 1.7.0
- every model serves without a GPU: libavx covers every op, so `--kernels libavx` alone serves every shipped container - Qwen3-ASR (zivius): speech to text on /v1/audio/transcriptions and live over /v1/realtime - /v1/messages works with Claude Code as it ships (gearwave00001) - a long agent conversation keeps its cached history when the client rewrites its last turn (manueloverride) - a stream's first event goes out with the first token, so llama-benchy measures prefill right - opt-in --prefill-interleave (Smellyyyy, baKon) and --prefill-span (keptn42) - four-rank TP releases the link early; four-rank selftests and docs/TP4.md (goodman-b) - NVFP4 and FP8 compressed-tensors imports (devmilan); tools/rad-export for finetunes and LoRA adapters (baKon) - many fixes, among them lost tokens on stop strings under concurrency, keep-alive, MiniCPM5 tool arguments and the CPU's vision and audio encoders - plugin ABI 17 and changed op schemas: out-of-tree plugins must be rebuilt
This commit is contained in:
1 parent
b068190326
commit
1e968f6e1d
739 files changed
+128447
-84632
No files matched your search
+34
-9
@@ -1,18 +1,18 @@
|
||||
/* recipe.h -- which quantiser makes which weight, for rad-convert (spec §4.4).
|
||||
*
|
||||
* A recipe is ordered rules from a logical weight name to a quantiser and its options. The first
|
||||
* rule whose pattern matches a weight decides it; a weight no rule matches keeps the checkpoint's
|
||||
* encoding. Two spellings, one rule each:
|
||||
* A recipe is ordered rules from a logical weight name to a quantiser and options; the first match
|
||||
* decides, and an unmatched weight keeps the checkpoint's encoding. Two spellings:
|
||||
*
|
||||
* in a file PATTERN QUANTISER key=value key=value ... # a comment
|
||||
* on the command PATTERN=QUANTISER:key=value,key=value
|
||||
*
|
||||
* A pattern is a glob over the whole name: `*` is any run of characters (dots included), `?` is
|
||||
* one. `$NAME` or `${NAME}` in an option is the environment's, expanded when the rule is read, so
|
||||
* one recipe serves every machine and the container records what it was actually given.
|
||||
* A pattern is a glob over the whole name: `*` matches any run (dots included), `?` one
|
||||
* character. `$NAME` or `${NAME}` in an option is expanded from the environment when the rule is
|
||||
* read, so the container records the actual values.
|
||||
*/
|
||||
#pragma once
|
||||
#include "../rad_internal.h"
|
||||
#include "rad_quant.h"
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
@@ -20,13 +20,15 @@
|
||||
|
||||
namespace rad {
|
||||
|
||||
class Registry;
|
||||
|
||||
struct RecipeRule {
|
||||
std::string pattern, quantizer;
|
||||
std::vector<std::pair<std::string, std::string>> options; /* in the order written */
|
||||
std::string origin; /* "file:12" or "--quant" */
|
||||
|
||||
/* The options as one canonical string, `key=value` comma-separated and sorted by key: what a
|
||||
* container entry records and what --reuse compares, however the rule spelled them. */
|
||||
/* The options as one canonical string (`key=value`, comma-separated, sorted by key), as a
|
||||
* container entry records and --reuse compares them. */
|
||||
std::string options_text() const;
|
||||
};
|
||||
|
||||
@@ -45,11 +47,34 @@ public:
|
||||
|
||||
const std::vector<RecipeRule>& rules() const { return rules_; }
|
||||
bool empty() const { return rules_.empty(); }
|
||||
/* Every rule in the file spelling, one a line, options expanded: what the container records. */
|
||||
/* Every rule in the file spelling, one per line, options expanded, as the container records. */
|
||||
std::string text() const;
|
||||
|
||||
private:
|
||||
std::vector<RecipeRule> rules_;
|
||||
};
|
||||
|
||||
/* A rule with its quantiser resolved and its options typed by the quantiser's own option table,
|
||||
* so a misspelt key or a value of the wrong type is refused before declare. Integers are decimal
|
||||
* (the container records the text, and --reuse compares it, so `010` must mean what it reads as);
|
||||
* an empty value or one that is not finite is refused.
|
||||
*
|
||||
* The RadParam strings point into `keys` and `vals`, so a compiled rule is built in place and never
|
||||
* copied or moved. */
|
||||
struct CompiledRule {
|
||||
const RecipeRule* rule = nullptr;
|
||||
const RadQuantizerInfo* q = nullptr;
|
||||
std::vector<std::string> keys, vals;
|
||||
std::vector<RadParam> params;
|
||||
|
||||
CompiledRule() = default;
|
||||
CompiledRule(const CompiledRule&) = delete;
|
||||
CompiledRule& operator=(const CompiledRule&) = delete;
|
||||
|
||||
/* RAD_OK; RAD_E_NOTFOUND when no loaded quantiser has the rule's name (the message lists the
|
||||
* ones that are); RAD_E_INVAL for an option the quantiser does not take or a value its type
|
||||
* refuses. The reason, with the rule's origin, is in *why. */
|
||||
int build(const RecipeRule& r, const Registry& reg, std::string* why);
|
||||
};
|
||||
|
||||
} /* namespace rad */
|
||||
Reference in new issue
Block a user