diff --git a/crates/xserv-model/src/gptoss.rs b/crates/xserv-model/src/gptoss.rs index 64a23d3..20003d4 100644 --- a/crates/xserv-model/src/gptoss.rs +++ b/crates/xserv-model/src/gptoss.rs @@ -389,8 +389,14 @@ fn yarn_rope_cache(config: &ModelConfig) -> RopeCache { RopeCache { cos: cos_buf, sin: sin_buf, max_seq_len: max_seq, half_dim: half } } +// All gpt-oss matmuls use the dense cuBLAS path (never the m==1 custom GEMV). +// The GEMV kernel reduces over K with a grid-split atomicAdd whose float order +// is non-deterministic; at decode (m==1) that made the router logits jitter +// enough to flip the top-4 expert selection run-to-run, so decode output was +// wrong and non-deterministic. Dense cuBLAS is deterministic for fixed inputs. +// Forward (m>1) already used dense cuBLAS, so it is unaffected. fn matmul2(a: &Tensor, b: &Tensor) -> Tensor { - matmul(a, b, GemmBackend::CuBlas) + matmul_dense(a, b) }