radiance 1.0.6

- A text prompt to /v1/completions reads the model's control tokens as tokens, as vLLM and
  llama.cpp do. A client that renders its own chat template can send "<|im_start|>user ..." and
  the model sees the turn markers; they used to reach it as plain text. /tokenize and
  /v1/embeddings read a text prompt the same way, and a prompt that already opens with BOS gets
  no second one.
- The VRAM budget counts the engine's own hardware queues, which the driver backs with about
  33 MiB of VRAM each, and the KV tiers' copy staging. Both used to come out of
  --gpu-headroom-mib: Qwen3.8-Flash-Next ran with 9 MiB free under load against the 96 MiB it
  asked to keep, the room a kernel's first launch allocates from. The startup receipt has a
  "hardware queues" line.
- Running the whole model on the CPU (RADIANCE_HOST_DOMAIN=1 with no GPU visible) no longer
  repeats words or answers differently at temperature 0. A decode step could read its input
  token before the copy that delivers it had landed.
- The README says to clone the repository before installing.
This commit is contained in:
Deadcode committed 2026-10-04 20:07:08 +02:00
1 parent 6c11671bdd
commit 6df26315b9
25 files changed
+432 -82

No files matched your search

+44
View File
@@ -20,6 +20,7 @@
#include "runtime/ctx.h"
#include "runtime/rank_barrier.h"
#include "runtime/residency.h"
#include "runtime/wtab.h"
#include <chrono>
#include <cstdlib>
@@ -1261,4 +1262,47 @@ TEST(arena_plan_bytes_returns_the_total_with_or_without_its_out_parameters) {
CHECK_EQ(a, total);
}
/* A WEIGHT-TABLE PATCH LANDS AT ITS PLACE IN STREAM ORDER: work issued before it reads the old
* entry, work issued after it the new one. On the host backend the patch is a host write, and
* made without draining the stream it reached the table before a queued reader issued ahead of
* it. A chain of copies holds that reader back long enough for a write that jumps the queue to
* show. */
TEST(a_weight_table_patch_lands_in_stream_order) {
const int64_t big = 4 << 20;
const int chain = 16;
RadStream s = nullptr;
REQUIRE(rad_stream_create(&s, 0) >= 0);
auto* blob_src = (uint8_t*)rad_dev_alloc(big, RAD_MEM_HOST_PINNED);
auto* blob_dst = (uint8_t*)rad_dev_alloc(big, RAD_MEM_DEVICE);
auto* tab = (void**)rad_dev_alloc(64, RAD_MEM_DEVICE);
auto* stage = (void**)rad_dev_alloc(64, RAD_MEM_HOST_PINNED);
REQUIRE(blob_src && blob_dst && tab && stage);
std::memset(blob_src, 0x5A, (size_t)big);
for (int round = 0; round < 3; ++round) {
void* const before = (void*)(uintptr_t)(0x1000 + round);
void* const after = (void*)(uintptr_t)(0x2000 + round);
stage[0] = before;
stage[1] = stage[2] = nullptr;
REQUIRE(rad_memcpy_async(tab, stage, sizeof(void*), s) >= 0);
REQUIRE(rad_stream_sync(s) >= 0);
for (int i = 0; i < chain; ++i) REQUIRE(rad_memcpy_async(blob_dst, blob_src, big, s) >= 0);
REQUIRE(rad_memcpy_async(stage + 1, tab, sizeof(void*), s) >= 0);
rad::WtabPatch p;
p.n = 1;
p.dst[0] = tab;
p.val[0] = after;
CHECK_OK(rad::wtab_patch(p, s));
REQUIRE(rad_memcpy_async(stage + 2, tab, sizeof(void*), s) >= 0);
REQUIRE(rad_stream_sync(s) >= 0);
CHECK(stage[1] == before);
CHECK(stage[2] == after);
}
rad_dev_free(stage, RAD_MEM_HOST_PINNED);
rad_dev_free(tab, RAD_MEM_DEVICE);
rad_dev_free(blob_dst, RAD_MEM_DEVICE);
rad_dev_free(blob_src, RAD_MEM_HOST_PINNED);
rad_stream_destroy(s);
}
RAD_TEST_MAIN()