- amax_gsa.cu: fix at::cuda::getCurrentCUDAStream → c10:: - amax_gsa.cu: fix torch::TensorOptions().device() → x.options() - sampler.cu: same fixes for compilation on B200 - Both kernels now compile cleanly with torch.utils.cpp_extension.load
128 * (sizeof(float) + sizeof(int)) = 1KB — within CUDA default stack limit. 256 * 8 = 2KB would overflow.
- Add dsv4/kernels/cuda/sampler.cu: fused temperature + repetition penalty + top-k + top-p (nucleus) sampling, single kernel launch, zero CPU syncs - Add dsv4/model/sampler.py: CUDASampler wrapper + PyTorch reference - Update single_shot_inference.py: - Use CUDASampler for non-greedy decoding (temperature=0.6, top_k=50, top_p=0.95) - Pre-allocate decode buffers (no per-step torch.tensor allocation) - Track thinking tokens (128821/128822) — not garbage for reasoning model - Reduce diagnostic CPU syncs (top-5 every 5 steps, NaN check every 20) - Add --top-k and --top-p CLI args - Default: temperature=0.6 (was 0.0 greedy), rep_penalty=1.1 (was 1.2)