Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

sampler: PR #59's test is fixture 11; the second kernel's comment says non-empty window

Niko122155e05f585da5
diff --git a/src/kernels/cuda/sampler.cu b/src/kernels/cuda/sampler.cu
index e2c5a8862..3e711c100 100644
--- a/src/kernels/cuda/sampler.cu
+++ b/src/kernels/cuda/sampler.cu
@@ -191,7 +191,7 @@ __global__ void sampler_kernel(const float* __restrict__ logits, int n_vocab, in
}
// the membership bitmap, as in `sampler_greedy_kernel` - see the cost note there. The gate needs an
- // EMPTY WINDOW too: the launch sizes the bitmap only when penalties are on, so a caller that hands over
+ // NON-EMPTY WINDOW too: the launch sizes the bitmap only when penalties are on, so a caller that hands over
// a stale history buffer with `penalty_last_n == 0` must not touch it.
extern __shared__ unsigned int penal_bits[];
const int bits_words = (int) ((n_vocab + 31) / 32);
diff --git a/src/kernels/sampler_parity.cpp b/src/kernels/sampler_parity.cpp
index 802ad2fc0..587ae333c 100644
--- a/src/kernels/sampler_parity.cpp
+++ b/src/kernels/sampler_parity.cpp
@@ -621,7 +621,7 @@ int main(int argc, char** argv) {
bad += run("sampled chain: top_p then min_p", l, NT10, p, want);
}
- // ---- fixture 10: A STALE HISTORY WITH last_n = 0 IS INERT. A caller can hand over a history buffer
+ // ---- fixture 11: A STALE HISTORY WITH last_n = 0 IS INERT (PR #59). A caller can hand over a history buffer
// from a previous penalised request while this request disables the penalties - the run must equal the
// no-history run in both kernels, and the bitmap the launch did not size must stay untouched.
{