Skip to content
Devgo

LLM (Large Language Model)

A large neural network trained on massive text to predict the next word, which gives it language understanding and generation abilities. GPT, Claude, Llama, and Gemini are LLMs. They can write, code, answer questions, and reason — but hallucinate and have no real understanding.

When to use
  • Text generation and editing.
  • Code generation and explanation.
  • Question answering.
  • Summarization, translation, classification.
When not to
  • Tasks needing guaranteed correctness (verify outputs).
  • Real-time low-latency (large models are slow).
  • Tasks with no language component.

Definition

An LLM is a -based model trained on trillions of tokens to predict the next token. Through this, it learns grammar, facts, reasoning patterns, and style. Prompted with text, it generates continuations. and RLHF align behavior. Sizes range from 1B to 1T+ parameters.

Why it exists

Scaling transformers on web-scale text produced emergent abilities (reasoning, coding, instruction following) that smaller models lacked, enabling general-purpose language AI.

How it works

Pre-train on massive text (predict next token). Optionally fine-tune on instructions (SFT) and preferences (RLHF). At inference, the prompt is tokenized, the model generates tokens one at a time ( from probabilities). Context window limits how much input it considers.

Scaling limits

Hallucination (generates plausible but false text). Context window limits input length. Training costs millions. Inference is expensive. Knowledge cutoff (doesn't know recent events). Bias and safety concerns.

Cost shape

Training: millions. API inference: per-token (cents to dollars per 1M tokens). Self-hosted: GPU costs.

Alternatives

  • Smaller models (SLMs) — Cheaper, faster, less capable.
  • Traditional NLP — Predictable, cheap, but narrow and brittle.

Failure modes

  • Hallucination.
  • Context window limits.
  • Bias and toxicity.
  • Knowledge cutoff.
  • Prompt injection attacks.

, , ,