NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

$p\textrm{-less}$ Sampling: A Robust Hyperparameter-Free Approach for LLM Decoding

Runyan Tan, Shuang Wu, Phillip Howard

Abstract

Large Language Model (LLM) decoding typically relies on truncation methods like top-p or top-k sampling to maintain text quality. However, these methods require sensitive hyperparameter tuning and often fail under high-temperature settings, leading to neural text degeneration. This paper introduces p-less sampling, a hyperparameter-free decoding strategy grounded in information theory. By dynamically calculating truncation thresholds based on the distribution's collision entropy, p-less sampling eliminates manual tuning while improving both inference speed and generation quality across diverse benchmarks.

Introduction

When generating text, LLMs sample from a probability distribution over a vocabulary. To prevent the selection of low-probability, nonsensical tokens, practitioners use truncation techniques. The most prevalent of these, nucleus sampling (top-p), requires a fixed cumulative probability threshold. While effective, the optimal 'p' value varies significantly across different tasks, models, and temperatures. At high temperatures, static thresholds often fail to prune the "long tail" of the distribution effectively, resulting in incoherent or repetitive output.

p-less sampling addresses these challenges by deriving a dynamic threshold directly from the token probability distribution. This approach ensures robust performance across the entire temperature spectrum without requiring task-specific configuration.

The p-less Sampling Framework

Mathematical Foundation

The core of the p-less approach is the definition of a dynamic threshold $L[P]$ based on the sum of the squares of all token probabilities in the distribution:

$$L[P] = \sum_{i=1}^{V} p_i^2$$

In information theory, this value is the exponential of the negative Rényi entropy of order 2, also known as collision entropy. This threshold acts as a measure of the distribution's "certainty." When the model is confident (low entropy), $L[P]$ is high, resulting in a more selective truncation. Conversely, when the model is uncertain (high entropy), the threshold naturally lowers to admit a broader range of plausible tokens.

Computational Efficiency

Standard truncation methods like top-p require sorting the entire vocabulary to calculate cumulative probabilities, resulting in a computational complexity of $O(V \log V)$, where $V$ is the vocabulary size. In contrast, p-less sampling can be computed in a single pass over the distribution, achieving $O(V)$ complexity. This makes the method particularly advantageous for modern LLMs with increasingly large vocabularies.

Variants

The authors also propose p-less_norm, a variant designed to favor diversity. This version relaxes the threshold slightly, allowing for more creative generation in open-ended tasks while maintaining the core benefits of the hyperparameter-free design.

Experimental Evaluation

Methodology

The effectiveness of p-less sampling was evaluated using three model families: Llama-2-7B, Mistral-7B, and Llama3-70B. The researchers tested the method across five distinct benchmarks:

  • Reasoning and Logic: GSM8K (math), GPQA (science), QASC, and CSQA.
  • Creative Writing: The Writing Prompts (WP) dataset for open-ended story generation.

Performance Metrics

Performance was measured using the Area Under the accuracy-temperature Curve (AUC), which evaluates how robust a decoding method is across various randomness settings. For creative tasks, human evaluations were conducted to assess preference.

Results and Discussion

Superior Robustness and Accuracy

p-less sampling consistently outperformed baseline methods (top-p, min-p, and $\epsilon$-sampling) in math and logic tasks. Notably, p-less maintained high accuracy at temperatures where standard methods typically "break" and produce gibberish. The dynamic nature of the threshold allows it to "sensibly truncate" the distribution even as it flattens at high temperatures.

Human Preference and Creativity

In human evaluations of stories generated at a high temperature ($\tau=2.0$), p-less was preferred 58.8% of the time over default sampling methods. This suggests that the entropy-aware regularization provided by p-less helps maintain semantic fidelity without sacrificing the variety required for creative writing.

Inference Speed and Conciseness

Due to its $O(V)$ complexity, p-less sampling achieved a 22% reduction in inference speed per token compared to min-p. Furthermore, the method tended to produce more concise generations. By effectively pruning redundant or low-information tokens, p-less encourages the model to reach the correct conclusion more efficiently.

Conclusion

p-less sampling represents a significant step toward simplifying the LLM deployment pipeline. By replacing manually tuned hyperparameters with a mathematically grounded, dynamic threshold, it offers a more robust and efficient alternative to traditional sampling methods. Future work may explore the generalization of this approach to higher-order Rényi entropies or its integration with advanced decoding strategies like speculative decoding.

Summary updated

BibTeX
@inproceedings{tan2026p,
  author = {Runyan Tan and Shuang Wu and Phillip Howard},
  title = {{$p\textbackslash\{\}textrm\{-less\}$ Sampling: A Robust Hyperparameter-Free Approach for LLM Decoding}},
  booktitle = {International Conference on Learning Representations},
  year = {2026},
  url = {https://openreview.net/forum?id=ItFuNJQGH4},
}
Figure