radiance 1.3.0

- #47: llama-server's request fields, routes and sampler order, and /props (with baKon's model
  entry: max_model_len, root and capabilities on /v1/models, and /v1/models/:id)
- new APIs: Anthropic's Messages API (/v1/messages), OpenAI's Responses API (/v1/responses),
  llama-server's /completion and /infill, logprobs (OpenAI's logprobs and top_logprobs, up to
  20; llama-server's n_probs), OpenAI's legacy `functions`, and X-Api-Key beside the bearer key
- #4: --model takes a Hugging Face repo id (owner/name), fetched before startup into
  ~/.cache/radiance/hf or --download-dir and checked for changes at every start (redxherring)
- #46: --tp 3 --tp-wire wht6 serves -- a three-rank two-shot all-reduce with uneven shards and
  the tiered-int8 wire over it (baKon); scripts/cardclock.py names what holds each card's clock
  under load (baKon)
- CPU-only serving works again; --kernels names the kernel libraries to load; a model the
  loaded libraries cannot fully serve refuses at startup instead of failing its first request;
  --vram-kv-mib and --vram-weights-mib are gone (the split is automatic)
- --embedding-placement ram is the default, and `auto` is gone
- #40: Swift 1.5 recipes; rad-convert reads which shard holds a tensor from the index
- #53: the pinned host pool gets huge pages where shmem THP is off; #57: a crash on video with
  an odd frame width is fixed
This commit is contained in:
Deadcode committed 2026-10-08 18:22:08 +02:00
1 parent 6a2ee986d6
commit 89cee7ce41
107 files changed
+6849 -1091

No files matched your search

+22 -1
View File
@@ -279,7 +279,7 @@ TEST(op_vocabulary) {
"embed_lookup", "logits_gemm",
"sample_penalties", "sample_dry", "sample_temp", "sample_topk", "sample_topp",
"sample_minp", "sample_typical", "sample_xtc", "sample_mask", "sample_pick",
"sample_argmax", "sample_merge_topk",
"sample_argmax", "sample_merge_topk", "sample_logprobs",
};
for (const char* op : kOps) {
if (!kern(op)) fprintf(stderr, " missing op '%s'\n", op);
@@ -3084,6 +3084,27 @@ TEST(op_sample_temp_topk_argmax) {
CHECK_EQ(lg.at(1), 6.0f);
}
/* The raw distribution's summary: max, sum of exp(l - max), the k largest with the lower id first
* on a tie, slots past the vocabulary as holes, global ids under an offset, and a row without the
* flag left as it was. */
TEST(op_sample_logprobs) {
T lg(RAD_F32, {2, 4}); lg.f({1, 3, 2, 3, 0, 0, 0, 0});
T st(RAD_F32, {2, 2 + 2 * 5});
st.f(std::vector<float>(2 * 12, 9.0f));
SP sp(2); sp[0].flags = RAD_SP_LOGPROBS;
A a; a.t(lg).t(sp.operand()).t(st).i("M", 2).i("n_vocab", 4).i("k", 5).i("vocab_off", 100);
CHECK_OK(run("sample_logprobs", a));
CHECK_EQ(st.at(0), 3.0f);
CHECK_NEAR(st.at(1), std::exp(-2.0f) + 1.0f + std::exp(-1.0f) + 1.0f, 1e-6);
CHECK_EQ(st.at(2), 101.0f); CHECK_EQ(st.at(3), 3.0f); /* the tie: id 1 before id 3 */
CHECK_EQ(st.at(4), 103.0f); CHECK_EQ(st.at(5), 3.0f);
CHECK_EQ(st.at(6), 102.0f); CHECK_EQ(st.at(7), 2.0f);
CHECK_EQ(st.at(8), 100.0f); CHECK_EQ(st.at(9), 1.0f);
CHECK_EQ(st.at(10), -1.0f); /* four tokens, five slots */
CHECK(st.at(11) == -INFINITY);
CHECK_EQ(st.at(12), 9.0f); /* row 1 asked for nothing */
}
TEST(op_sample_narrowing) {
/* Two candidates whose probabilities are 3/4 and 1/4. */
const float ln3 = 1.09861229f;