SShortSingh.
Back to feed

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

0
·12 views

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.

Read the full story at DEV Community

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

Related stories

0
ProgrammingDEV Community ·

Termux Lets You Run a Local Development Server on Your Android Phone

Termux, a terminal emulator for Android, allows developers to run a local web server directly on their smartphones without needing a computer. After installing and updating Termux, users can set up Python and use its built-in HTTP server to serve web pages or run Flask applications on their device. The server can be accessed locally via 127.0.0.1 or made available to other devices on the same Wi-Fi network by binding it to the phone's local IP address. Developers can use this setup to test static websites, Python apps, and APIs before deploying them to a production environment. While not a substitute for a full production server, the setup offers a convenient and portable option for lightweight development and testing.

0
ProgrammingDEV Community ·

Top AI Security Tools Enterprises Should Know in 2026

A recent guide published on DEV Community highlights leading AI-powered security tools designed for enterprise use. The article, authored by Anthony Max, was posted on September 16 and targets professionals in AI, web development, and programming. The piece focuses on tools relevant to organizational cybersecurity in 2026, with an emphasis on open-source solutions. It received 55 reactions from the developer community, indicating strong interest in the topic. The full read is estimated at approximately nine minutes.

0
ProgrammingDEV Community ·

Alibaba Open-Sources AI Code Review Tool That Reduces Token Costs by 90%

Alibaba has open-sourced Open Code Review (OCR), an AI-powered code review tool it has used internally for two years across tens of thousands of developers. The tool addresses three common pain points with existing AI review integrations: incomplete file coverage, inaccurate line-number positioning, and high token costs. OCR uses a hybrid architecture that separates deterministic tasks — such as file selection, bundling, and line tracking — from semantic reasoning, which is handled by large language models. Related files are grouped into bundles and reviewed by isolated sub-agents concurrently, reducing token usage by up to 90% compared to general-purpose AI agents. The tool is designed to integrate into both terminal workflows and CI pipelines.