Large language model inference infrastructure is typically optimized for throughput and latency using techniques like KV-cache, CUDA graphs, batching, quantization, and parallelism. However, sampling parameters, which govern the selection of the next token from logit distributions, are often overlooked despite their critical impact on output quality.
Sampling parameters include temperature, top-k, top-p (nucleus), min-p, typical sampling, and various repetition penalties. While these parameters are conceptually independent, they function as a sequential pipeline in systems like vLLM. The output of one operation serves as the input for the next, meaning their combined effect depends on the order of application.
In vLLM, the default values for sampling parameters act as disable flags rather than neutral settings: top-k is set to -1, top-p to 1.0, and min-p to 0.0. When these are used with a temperature of 1.0, the model performs sampling from the full, unmodified logit distribution.
The order of operations in vLLM (v1 sampler) is fixed: penalties are applied first, followed by temperature, min-p, top-k/top-p, and finally the sampling process. Because of this sequence, changing one parameter, such as temperature, alters the distribution that subsequent filters like top-p process, leading to different results than expected if viewed in isolation.
Applications like OpenWebUI allow for dynamic adjustment of these parameters based on the specific request context, such as RAG scenarios or reasoning modes. This allows developers to override base configurations set at the engine or model level to better suit the task requirements.






