Last updated: 2026-11-17
Inference Runtime
GPU Prefill Policy
Correctness defaults for backend inference acceleration.
Extra activation quantization is separate from a GGUF's weight format. Keep paths that change qualified continuations behind an explicit override.
8 exports shown
function
vulkanDenseQ8PrefillCompatible
pub fn vulkanDenseQ8PrefillCompatible(config: ModelConfig, push_descriptors: bool, q8_gemm: bool) bool No public doc comment yet.
function
vulkanQ8RowDecodeDefault
pub fn vulkanQ8RowDecodeDefault(config: ModelConfig, matrix_count: usize, all_q8: bool) bool Three-round mixed-quantization controls found a 4.6% Gemma MoE regression despite bit-identical outputs.
Keep the row-decode default on the all-Q8 dense graph that improved by 30%; explicit experiments may use other graphs.
struct
Q8RowDecodeDemand
pub const Q8RowDecodeDemand = struct Classify the actual loaded matrices, including a tied embedding/LM head.
One-dimensional norm scales do not change the matrix quantization policy.
function
vulkanDenseQ8PrefillDefault
pub fn vulkanDenseQ8PrefillDefault(config: ModelConfig, intel: bool, push_descriptors: bool, q8_gemm: bool, types: []const GGMLType) bool Limit the qualified Intel default to a complete Q8 graph: LM head plus seven attention/FFN projections.
Mixed quantizations retain their existing defaults; a missing projection cannot silently establish eligibility.
function
intelBatchedPrefillChunkDefault
pub fn intelBatchedPrefillChunkDefault(gemma_moe: bool, dense_q8: bool, gemma_limit: u32) u32 Intel Q8 GEMM has no serial-shader column limit.
A bounded 384-token batch avoids repeated graph submissions; the matched starter diagnostic improved medium/long prefill by 53%/87% over the 96-token control. Gemma's independent tuning override must not silently change this Q8 bound.
function
intelGemmaGegluPrefillEnabled
pub fn intelGemmaGegluPrefillEnabled(config: ModelConfig, intel_xe2: bool, push_descriptors: bool, setting: ?[]const u8) bool Retile only the measured dense Gemma 4 31B graph on Intel Xe2.
The new kernels retain the existing F16 weight staging and F32 accumulation; this gate does not enable activation quantization, MoE shortcuts or a different backend.
function
vulkanMtpRequested
pub fn vulkanMtpRequested(eligible: bool, intel: bool, override: ?[]const u8) bool Carrying a NextN block establishes model compatibility, not verifier correctness.
Intel Qwen 3.8 MTP changes qualified greedy choices, while ordinary decode matches the native reference. R9700 controls match with MTP both on and off; preserve that default and keep Intel speculation explicit.
function
vulkanActivationQuantDefault
pub fn vulkanActivationQuantDefault(config: ModelConfig) bool Dense Gemma's Q8 activation prefill changes the copper continuation after a long prefix.
F32-activation batched prefill retains the reference choice.