LLM Basics Explained: Weights, Parameters, Tokens, and Sampling Controls

A Large Language Model (LLM) is fundamentally a collection of numerical weights derived from training data using architectures like Transformers, with model size measured in parameters — for example, a 120B parameter model contains 120 billion such weights. To run a model locally, sufficient RAM and CPU or GPU resources are required, with smaller models like 7B parameters being feasible on consumer laptops using tools such as Ollama or LM Studio. At its core, an LLM works as a next-word predictor, assigning probability scores to possible continuations and selecting outputs based on those scores. The randomness of output can be controlled through parameters like Temperature, Top-k, and Top-p, where lower temperature favors factual responses and higher temperature encourages creative or varied outputs. Text is broken into smaller units called tokens during a process called tokenization, and a model's context window defines the maximum number of tokens it can process at one time.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in