- 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
25 lines
748 B
C++
25 lines
748 B
C++
/* accept.cpp -- acceptance for speculative decoding. See accept.h for why the rule is exact.
|
|
*/
|
|
#include "accept.h"
|
|
|
|
namespace rad {
|
|
|
|
int accept_greedy(const int32_t* draft, int n_draft, const int32_t* target,
|
|
int32_t* out, int32_t* n_accepted) {
|
|
if (!target || !out || !n_accepted || n_draft < 0) return RAD_E_INVAL;
|
|
if (n_draft > 0 && !draft) return RAD_E_INVAL;
|
|
|
|
int i = 0;
|
|
for (; i < n_draft; ++i) {
|
|
if (draft[i] != target[i]) break;
|
|
out[i] = draft[i];
|
|
}
|
|
/* The target's token at position i is correct to emit either way: the bonus token on a full
|
|
* run, the correction on a rejection. */
|
|
out[i] = target[i];
|
|
*n_accepted = i;
|
|
return RAD_OK;
|
|
}
|
|
|
|
} /* namespace rad */
|