Urgent.News

What's breaking now, across thousands of outlets.

AI

A model doesn't read text: what a tokenizer decides for you

Originally published at cchinchilla.dev . Part 1 of From code to weights, a 12-part series on ML fundamentals for engineers. A language model has never seen a letter. It sees integers. Somewhere between your string and the first matrix multiply there's a function that turns text into a list of ids, and that function was frozen the day the model was trained. It isn't preprocessing. It's part of…

A language model does not perceive individual characters; instead, it interprets integers. Between the string input and the initial matrix multiplication, there exists a function that transforms text into a list of ids. This function is set during the model's training phase and remains unchanged thereafter. This process is not preprocessing, but rather an integral part of the model's structure.

The tokenizer, which performs this function, was determined when the model was initially trained and cannot be altered afterward. This is the primary focus of this article, the first in a series aimed at engineers transitioning into ML engineering.

In the realm of compilers, the parser is a component that can be modified and adjusted over time. However, in the context of a language model, the tokenizer is a fixed element that was initially chosen before the model's training commenced. The tokenizer, similar to a lexer in compilers, takes characters and outputs a sequence of symbols, such as identifiers, keywords, and literals.

The primary objective of this tokenizer is to reduce the string into the minimum number of ids, using a predetermined vocabulary, which will then be used by the model. There are various strategies to achieve this, each with its own advantages and disadvantages.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

Why Claude Code keeps writing shell commands that fail on your Mac

Disclaimer: AI helped me write this since I am not that good with words :) Claude wrote this, mid-task, while refactoring something unrelated: sed -i 's/old/new/' config.yml It's correct.

  • Claude Code writes failing shell commands on Mac due to zsh vs Bash mismatch
  • Bash runs commands using zsh login shell on macOS Catalina and later
  • Claude Code assumes GNU tools, macOS uses BSD tools causing execution errors

Is the AI industry really ready to slow down?

On Equity, we debated whether Ai executives are serious about wanting to slow down.

  • Anthropic's Dario Amodei proposes AI development pacing plan
  • Nvidia CEO Jensen Huang dismisses AI backlash concerns as hoax
  • AI safety advocates emphasize need for third-party evaluators and international coordination

JEV assisted LLM Trading

We gave our LLM trading bot an auditor that never sees the chart Every hour, on the hour, a vision model looks at three forex charts and decides whether our bot should buy, sell, or sit out.

  • Geminisnapflash is a Python trading bot making hourly forex decisions.
  • JEV, a System-One model, grades the bot's directional calls for consistency.
  • JEV's verdict is recorded and compared with the bot's actual trade direction.

More from Sunday 20 September →