Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • Getting Started with AI for VLSI Engineers5
  • Just Enough AI: Models and Context15
    • What a Language Model Does
      • Next-Token Prediction and the Sampling Loop
      • Training and Inference
      • Parameters at an Intuitive Level
      • Fluency, Correctness and Knowledge Cutoff
      • Temperature and Sampling
    • Tokens and Tokenization
    • Context Window and Attention for Users
  • Prompting13
  • Trust and Verification14
  • Using AI for Engineering Work17
  • Engineering Walkthroughs7
  • Practical Foundations for AI Workflows4
  • Engineering Data5
  • Retrieval-Augmented Generation6
  • Agents and Tool Use18
  • Agent Design8
  • MCP and Skills6
  • Multi-Agent Design6
  • Practical Capstone6
  • Tokens, Cost and Latency12
  • Agentic Workflows for Chip Teams18
  • Interview and Judgment10
  • AI Skills: Full Course Index
  • Working with AI Glossary
  • Working with AI Cheatsheet
Loading lesson

‹What a Language Model Does
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Just Enough AI: Models and Context
  4. What a Language Model Does
  5. Training and Inference

Just Enough AI · Beginner to Intermediate

Training and Inference

What training sets, what inference reuses, and what differs in practice.

On this page

    Training sets the numbers

    Training adjusts the model numbers so that real text from the training collection scores higher. It processes many sequences in batches and updates the numbers after each batch.

    Training is done before use and is far more compute-intensive than answering one prompt. Details vary by model, so treat any specific schedule as an illustration only.

    plaintext
    1
    2
    3
    4
    EXAMPLE parameters, stated illustration only, checkable by hand
    batch = 4 sequences x 512 tokens per sequence
          = 2048 tokens per update step
    unit: tokens per update step

    Inference reuses the numbers

    Inference freezes the trained numbers and answers new prompts. Each step reads the numbers to score the next token without changing them.

    One prompt produces one sampled path through the loop. Answering again re-runs the same fixed numbers with fresh sampling draws.

    Phase

    Numbers

    Input

    Output

    Training

    Updated after each batch

    Collection text with known continuations

    Adjusted numbers that predict the collection better

    Inference

    Fixed, only read

    A new prompt

    Sampled continuation tokens

    What differs in practice

    Cost, hardware, and controls differ between the phases. Training throughput is measured over batches, while inference latency is measured per prompt and per token.

    Behavior controls such as sampling settings apply at inference. Retraining or further tuning is the route when the numbers themselves must change, and the exact route varies by model.

    Aspect

    Training

    Inference

    Numbers change

    Yes, every update step

    No, numbers are read-only

    Typical input size

    Batches of many sequences

    One prompt plus its growing continuation

    Repeated runs differ

    Runs differ by data order and setup

    Runs differ by sampling draws

    Common mistakes

    A frequent mistake is asking inference to learn a correction permanently. A correction inside one session changes the text in context, not the stored numbers.

    Common pitfall

    Prompting a fix and assuming the model is fixed everywhere confuses context with training. The next session starts from the same stored numbers, so persistent changes need retraining or updated materials.

    Interview

    Likely probes: what each phase changes and what persists.

    • Training writes the numbers; inference only reads them.

    • Session corrections live in context and do not persist across sessions.

    • Sampling controls change answers without changing the numbers.

    Check yourself A batch holds 4 sequences of 512 tokens. How many tokens does one update step process?

    2048 tokens. Four times 512 equals 2048 tokens per update step.

    Check yourself A user corrects a mistake and the model apologizes in the same session. Why can the same mistake return tomorrow?

    The correction changed the session text, not the stored numbers. A new session reloads the same numbers, so the old prediction can recur.

    Related topics

    • Parameters

    • Context window and attention for users

    Previous

    7 / 173

    Next: Parameters at an Intuitive Level

    Up next

    Up nextParameters at an Intuitive Level

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Fluency, Correctness and Knowledge Cutoff
    • Temperature and Sampling