SShortSingh.
Back to feed

How large language models generate one word at a time

0
·2 views

An AI agent explains that a large language model works by predicting the next token repeatedly, with text first split into numeric token IDs. Transformer layers use attention to weigh relevance across earlier tokens, with a causal mask preventing it from looking ahead. Generation relies on a KV cache that speeds up decoding but grows large with context length, reaching around 43 GB for a 70B model at 128K tokens. The piece also notes that models have no built-in memory, as each turn re-sends the full conversation history.

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 ·

Anchor Coverage: A CI Gate That Checks Model-Drafted Docs Against Evidence

A DEV Community post describes a CI gate for documentation changes where model-drafted prose must be traceable to machine-readable sources. The author illustrates the problem with a hypothetical docs PR containing a renamed CLI flag that linting never caught. The proposed workflow splits each change into three lanes: script-extracted facts, model-drafted connective prose confined to delimited blocks, and human-owned commitments the model may not touch. A Python script, anchor_gate.py, enforces this by requiring every fact in a draft block to carry a claim anchor resolved against a claims file. The gate fails the build when the share of unanchored paragraphs exceeds a configured budget.

0
ProgrammingDEV Community ·

Argo CD rollback: choosing between git revert and argocd app rollback

A bad image tag merged at 16:50 and auto-sync deployed it, causing 500 errors in the checkout service. Teams facing this must pick between reverting the commit in Git or running an Argo CD rollback directly against the cluster. Both approaches work but differ in how they interact with auto-sync, audit trails, and later fixes. The right choice depends on sync policy, branch protection rules, the scope of affected applications, and whether stateful changes such as migrations are involved. Because sync and history behavior has changed across Argo CD releases, the article advises checking the official documentation for the installed version.

0
ProgrammingDEV Community ·

Claude Code's allow_large setting: how to read large files without truncation

A guide explains how Claude Code handles oversized file reads and why a read can appear successful while only covering the beginning of a file. Per a Claude Code docs issue, this partial-view behavior arrived around version 2.1.145. Previously, reading an oversized file in full failed with a 'file content exceeds maximum allowed tokens' error, which older tutorials still reference. The guide recommends searching when the target is known, using offset and limit to read specific sections, and using allow_large when the whole file is needed and fits. For heavy reading where only conclusions matter, it suggests delegating to a subagent with its own context window.

0
ProgrammingDEV Community ·

Company-brain graph outperforms retrieval on HERB held-out company questions

A developer built inherit-brain for a Graph Hacks track on company knowledge, storing each product's records as a FalkorDB graph of people, documents, bugs, and pull requests. An agent answers questions by calling nine read-only tools that run fixed, parameterised Cypher queries rather than writing its own. On a spec question for one product, the graph tools returned all ten authors and reviewers, while retrieval with the same model returned only one. The project was tested on Salesforce's HERB benchmark, a simulated company, using 30 product graphs and 1,203 held-out questions. The author reports that a complex bug-reopening question was answered correctly through a multi-step join, where retrieval named the wrong engineers.