LLM Samplers Explained
Everytime a large language model makes predictions, all of the thousands of tokens in the vocabulary are assigned some degree of probability, from almost 0%, to almost 100%. There are different ways you can decide to choose from those predictions. This process is known as "sampling", and there are various strategies you can use which I will cover here. Leave a comment We don’t support that file type. Try again with GIF, JPEG, JPG, MOV, MP4, PNG, SVG or WEBM. Attaching documents requires write permission to this repository. Try again with GIF, JPEG, JPG, MOV, MP4, PNG, SVG or WEBM. This file is empty. Try again with a file that’s not empty. This file is hidden. Try again with another file. Something went really wrong, and we can’t process that file. Try again. Nothing to preview
LLM Samplers Explained Everytime a large language model makes predictions, all of the thousands of tokens in the vocabulary are assigned some degree of probability, from almost 0%, to almost 100%. There are different ways you can decide to choose from those predictions. This process is known as "sampling", and there are various strategies you can use which I will cover here. OpenAI Samplers Temperature Temperature is a way to control the overall confidence of the model's scores (the logits). What this means is that, if you use a lower value than 1.0, the relative distance between the tokens wi
Explore this link on the map →related reading
- Language Modelinglena-voita.github.io
- Defeating Nondeterminism in LLM Inference - Thinking Machines Labthinkingmachines.ai
- Transformer Explainer: LLM Transformer Model Visually Explainedpoloclub.github.io
- How to generate text: using different decoding methods for language generation with Transformershuggingface.co
- How LLMs Work, Explained Without Math - miguelgrinberg.comblog.miguelgrinberg.com
- Patterns for Building LLM-based Systems & Productseugeneyan.com
- Speculative decodingaarnphm.xyz
- 2409.02908arxiv.org
- Speculative Decoding - philkravphilkrav.com
- Detecting when LLMs are Uncertain • Thariq Shihiparthariq.io
- GenAI Handbookgenai-handbook.github.io
- Emotion Concepts and their Function in a Large Language Modeltransformer-circuits.pub