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
    • Tokens and Tokenization
      • Tokens, Words and Characters
      • Subword Tokens and Byte-Pair Encoding
      • Why Some Text Costs More Tokens
      • Approximate Rules of Thumb
      • Estimating Tokens Before Sending
    • 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

‹Tokens and Tokenization
  1. Topics
  2. AI Skills for VLSI Engineers
  3. Just Enough AI: Models and Context
  4. Tokens and Tokenization
  5. Approximate Rules of Thumb

Just Enough AI · Beginner to Intermediate

Approximate Rules of Thumb

Approximate chars-per-token ranges by material, stated as ranges that vary.

On this page

    Headline approximations

    All rates below are approximate and tokenizer-dependent. They describe common splitters, and exact values vary by model, so measure them.

    Material

    Approximate chars per token

    Reading

    Plain English prose

    About 3 to 4

    Long words often survive whole.

    Code and Verilog

    About 2 to 3

    Symbols and names split shorter.

    Hex and dense numbers

    About 2 or fewer

    Digits rarely form long groups.

    Non-Latin text

    Fewer than prose

    More pieces per character, approximately.

    A worked range

    The calc block converts one 12000-character file at prose and code rates. Ranges replace single numbers throughout.

    plaintext
    1
    2
    3
    4
    5
    6
    7
    file size = 12000 characters
    prose at 4 chars per token: 12000 / 4 = 3000 tokens
    prose at 3 chars per token: 12000 / 3 = 4000 tokens
    prose range: 3000 to 4000 tokens (approximate)
    code at 3 chars per token: 12000 / 3 = 4000 tokens
    code at 2 chars per token: 12000 / 2 = 6000 tokens
    code range: 4000 to 6000 tokens (approximate)

    What moves the average

    Mix sets the rate: comments read like prose while identifiers read like code. Whitespace, casing and symbol density move any file along the range.

    • Material mix: comments raise the average, identifiers and literals lower it.

    • Formatting: dense one-line code splits shorter than spaced, commented code.

    • Splitter choice: tables differ, so the same file rates differently across models.

    Common mistakes

    Common pitfall

    Quoting one exact rate as fact breaks on the next file. State a range with its material and splitter, then measure the important cases.

    Interview

    Likely probes: recite ranges with their hedges.

    • Prose about 3 to 4 characters per token, approximately.

    • Code about 2 to 3, numbers fewer, other scripts fewer than prose.

    • Every rate is approximate and tokenizer-dependent.

    Check yourself A teammate says code runs at exactly 2.5 characters per token. What is wrong with that sentence?

    Exactly is wrong. The rate is an approximate range that varies by model and file, so 2.5 can only be a stated rate for one estimate.

    Check yourself A 12000-character file is half comments, half dense RTL. Which range applies?

    Neither endpoint alone. Estimate each half at its own rate and add, or measure a representative sample directly.

    Related topics

    • Why some text costs more tokens

    • Estimating tokens before sending

    Previous

    14 / 173

    Next: Estimating Tokens Before Sending

    Up next

    Up nextEstimating Tokens Before Sending

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Tokens, Words and Characters
    • Subword Tokens and Byte-Pair Encoding