News for hackers. Stuff that matters.
Re:The Bitter Lesson is coming for Tokenization by smeeth on Tuesday June 24, 2025 @01:15PM (#44368465)
The main limitation of tokenization is actually logical operations, including arithmetic. IIRC most of the poor performance of LLMs for math problems can be attributed to some very strange things that happen when you do math with tokens.

I'd like to see a math/logic bench appear for tokenization schemes that captures this. BPB/perplexity is fine, but its not everything.

Re:The Bitter Lesson is coming for Tokenization by cschmidt on Tuesday June 24, 2025 @02:45PM (#44369438)
This paper has a good solution:

https://arxiv.org/abs/2402.14903

You right to left tokenize in groups of 3, so 1234567 becomes 1 234 567 rather than the default 123 456 7. And if you ensure all 1-3 digits groups are in the vocab, it does much better.

Both https://arxiv.org/abs/2503.13423 and https://arxiv.org/abs/2504.00178 (co-author) both independently noted that you can do this with just by modifying the pre-tokenization regex, without having to explicitly add commas.

Re:The Bitter Lesson is coming for Tokenization by jvanderbot on Tuesday June 24, 2025 @07:58PM (#44372335)
Ok great! This is precisely how I chunk numbers for comparison. And not to diminish a solid result or the usefulness of it or the baseline tech: its clear that it we keep having to create situation - specific inputs or processes, we're not at AGI with this baseline tech
Re:The Bitter Lesson is coming for Tokenization by chmod775 on Tuesday June 24, 2025 @11:37PM (#44373437)
> [..] we're not at AGI with this baseline tech

DAG architectures fundamentally cannot be AGI and you cannot even use them as a building block for a hypothetical AGI if they're immutable at runtime.

Any time I hear the goal being "AGI" in the context of these LLMs, I feel like listening to a bunch of 18th-century aristocrats trying to get to the moon by growing trees.

Try to create useful approximations using what you have or look for new approaches, but don't waste time on the impossible. There's no iterative improvements here that will get you to AGI.

Re:The Bitter Lesson is coming for Tokenization by kristjansson on Wednesday June 25, 2025 @12:46AM (#44373686)
> "So... what does the thinking?"

> "You're not understanding, are you? The brain does the thinking. The meat."

> "Thinking meat! You're asking me to believe in thinking meat!"

https://www.mit.edu/people/dpolicar/writing/prose/text/think...

Re:The Bitter Lesson is coming for Tokenization by mgraczyk on Wednesday June 25, 2025 @04:57AM (#44375069)
This is meant to be some kind of Chinese room argument? Surely a 1e18 context window model running at 1e6 tokens per second could be AGI.
Re:The Bitter Lesson is coming for Tokenization by chmod775 on Wednesday June 25, 2025 @06:04AM (#44375489)
Personally I'm hoping for advancements that will eventually allow us to build vehicles capable of reaching the moon, but do keep me posted on those tree growing endeavors.
Re:The Bitter Lesson is coming for Tokenization by mgraczyk on Wednesday June 25, 2025 @08:02AM (#44376291)
Tree growing?

And I don't follow, we've had vehicles capable of reaching the moon for over 55 years

Re:The Bitter Lesson is coming for Tokenization by VonGallifrey on Wednesday June 25, 2025 @09:08AM (#44376901)
Excuse me for the bad joke, but it seems like your context window was too small.

The Tree growing comment was a reference to another comment earlier in the comment chain.

Re:The Bitter Lesson is coming for Tokenization by mgraczyk on Wednesday June 25, 2025 @12:51PM (#44379390)
It's not a tree though
Re:The Bitter Lesson is coming for Tokenization by anonymoushn on Wednesday June 25, 2025 @12:15PM (#44378970)
It's about the immutability of the network at runtime. But I really don't think this is a big deal. General-purpose computers are immutable after they are manufactured, but can exhibit a variety of useful behaviors when supplied with different data. Human intelligence also doesn't rely on designing and manufacturing revised layouts for the nervous system (within a single human's lifetime, for use by that single human) to adapt to different settings.
Re:The Bitter Lesson is coming for Tokenization by mgraczyk on Wednesday June 25, 2025 @01:21PM (#44379734)
LLMs, considered as a function of input and output, are not immutable at runtime. They create tokens that change the function when it is called again. That breaks most theoretical arguments
Re:The Bitter Lesson is coming for Tokenization by anonymoushn on Wednesday June 25, 2025 @02:20PM (#44380342)
Sure. Another view is that an LLM is an immutable function from document-prefixes to next-token distributions.
Re:The Bitter Lesson is coming for Tokenization by mgraczyk on Wednesday June 25, 2025 @02:24PM (#44380391)
But that view is wrong, the model outputs multiple tokens.

The right alternative view is that it's an immutable function from prefixes to a distribution over all possible sequences of tokens less than (context_len - prefix_len).

There are no mutable functions that cannot be viewed as immutable in a similar way. Human brains are an immutable function from input sense-data to the combination (brain adaptation, output actions). Here "brain adaptation" doing a lot of work, but so would be "1e18 output tokens". There is much more information contained within the latter

Re:The Bitter Lesson is coming for Tokenization by lukan on Wednesday June 25, 2025 @05:23AM (#44375232)
"Surely a 1e18 context window model running at 1e6 tokens per second could be AGI."

And why?

Re:The Bitter Lesson is coming for Tokenization by mgraczyk on Wednesday June 25, 2025 @12:52PM (#44379407)
Because that's quite a bit more information processing than any human brain
Re:The Bitter Lesson is coming for Tokenization by lukan on Wednesday June 25, 2025 @01:14PM (#44379674)
I don't think it is quantity that matters. Otherwise supercomputers are smart by definition.
Re:The Bitter Lesson is coming for Tokenization by mgraczyk on Wednesday June 25, 2025 @01:19PM (#44379719)
Well no, that's not what anyone is saying.

The claim was that it isn't possible in principle for "DAGs" or "immutable architectures" to be intelligent. That statement is confusing some theoretical results that aren't applicable to how LLMs work (output context is mutation).

I'm not claiming that compute makes the m intelligent. I'm pointing out that it is certainly possible, and at that level of compute it should be plausible. Feel free to share any theoretical results you think demonstrate the impossibility of "DAG" intelligence and are applicable

Re:The Bitter Lesson is coming for Tokenization by lukan on Thursday June 26, 2025 @04:03AM (#44385233)
I am not saying it is impossible, I am saying it might be possible, but far from plausible with the current approach of LLMs in my experience with them.
Re:The Bitter Lesson is coming for Tokenization by rar00 on Wednesday June 25, 2025 @08:33AM (#44376558)
This argument works better for state space models. A transformer would still steps context one token at a time, not maintain an internal 1e18 state.
Re:The Bitter Lesson is coming for Tokenization by mgraczyk on Wednesday June 25, 2025 @12:52PM (#44379401)
That doesn't matter, are you familiar with any theoretical results in which the computation is somehow limited in ways that practically matter when the context length is very long? I am not
Re:The Bitter Lesson is coming for Tokenization by AllegedAlec on Wednesday June 25, 2025 @08:17AM (#44376414)
Thank you. It's maddening how people keep making this fundamental mistake.
Re:The Bitter Lesson is coming for Tokenization by munksbeer on Thursday June 26, 2025 @05:01AM (#44385536)
It doesn't feel particularly interesting to keep dismissing "these LLMs" as incapable of reaching AGI.

It feels more interesting to note that this time, it is different. I've been watching the field since the 90s when I first dabbled in crude neural nets. I am informed there was hype before, but in my time I've never seen progress like we've made in the last five years. If you showed it to people from the 90s, it would be mind blowing. And it keeps improving incrementally, and I do not think that is going to stop. The state of AI today is the worst it will ever be (trivially obvious but still capable of shocking me).

What I'm trying to say is that the shocking success of LLMs has become a powerful engine of progress, creating a positive feedback loop that is dramatically increasing investment, attracting top talent, and sharpening the focus of research into the next frontiers of artificial intelligence.

Re:The Bitter Lesson is coming for Tokenization by dTal on Thursday June 26, 2025 @10:07AM (#44387575)
>If you showed it to people from the 90s, it would be mind blowing

90's? It's mind blowing to me now.

My daily driver laptop is (internally) a Thinkpad T480, a very middle of the road business class laptop from 2018.

It now talks to me. Usually knowledgeably, in a variety of common languages, using software I can download and run for free. It understands human relationships and motivations. It can offer reasonably advice and write simple programs from a description. It notices my tone and tries to adapt its manner.

All of this was inconceivable when I bought the laptop - I would have called it very unrealistic sci-fi. I am trying not to forget that.

Re:The Bitter Lesson is coming for Tokenization by nielsole on Wednesday June 25, 2025 @03:58AM (#44374721)
Isn't that the opposite of the bitter lesson - adding more cleverness to the architecture?
Re:The Bitter Lesson is coming for Tokenization by cschmidt on Wednesday June 25, 2025 @07:37AM (#44376102)
I suppose it is. There is a lot to tokenization - pre-tokenization, how to handle digits, the tokenization training approach - that is about adding cleverness. In the long run, the bitter lesson would be to just get rid of it all and learn from more data. Many people would love to do it. But I think for the case of BLT, digits will still be an issue. There is no way an autoregressive entropy model will be able to split numbers sensibly, since it has no idea how many digits are coming. It seems like it will struggle more with arithmetic. Perhaps you could reverse all the digits in a number, then it has a chance. So 12334 becomes 43321, and it gets to start from the ones digit. This has been suggested as an approach for LLM's.
Re:The Bitter Lesson is coming for Tokenization by infogulch on Wednesday June 25, 2025 @09:47AM (#44377308)
Little endian wins in the end.
Re:The Bitter Lesson is coming for Tokenization by pas on Wednesday June 25, 2025 @12:19PM (#44379009)
... why does reversing the all the digits help? could you please explain it? many thanks!
Re:The Bitter Lesson is coming for Tokenization by cschmidt on Thursday June 26, 2025 @08:02AM (#44386567)
Math operations go right to left in the text, while we write them left to right. So if you see the digits 123... in an autoreressive manner, you don't know really anything, since it could be 12345 or 1234567. If you flipped 12345 as 543..., you know the place value of each. You know that the 5 you encounter first is in the ones place, the 4 is the tens place, etc. It gives the LLM a better chance of learning arithmetic.
Re:The Bitter Lesson is coming for Tokenization by pas on Friday June 27, 2025 @10:14PM (#44401903)
ah, okay, thanks!

so basically reverse notation has the advantage of keeping magnitude of numbers (digits!) relative to each other constant (or at least anchored to the beginning of the number)

doesn't attention help with this? (or, it does help, but not much? or it falls out of autoregressive methods?)

Re:The Bitter Lesson is coming for Tokenization by cschmidt on Saturday June 28, 2025 @11:17AM (#44405287)
Attention does help, which is why it can learn arithmetic, even with arbitrary tokenization. However, if you put it in a standard form, such as right-to-left groups of 3, you make it an easier problem for the LLM to learn. All the examples it sees are in the same format. Here, the issue is that BLT operates in an autoregressive manner (strictly left to right), which makes it harder to tokenize the digits in a way that is easier for the LLM to learn. Each digit is its own token (Llama style), or flipping the digits might be the best.
Re:The Bitter Lesson is coming for Tokenization by fennecbutt on Wednesday June 25, 2025 @01:21PM (#44379736)
I guess it's just working with the brain model (so to speak) than against it.

Inthesamewaythatweusepunctuation. Or even that we usually order words a certain way, oranges and apples, Ted and Bill, roundabouts and swings.

Re:The Bitter Lesson is coming for Tokenization by RaftPeople on Wednesday June 25, 2025 @03:34PM (#44381068)
> Isn't that the opposite of the bitter lesson - adding more cleverness to the architecture?

The bitter lesson is that general methods and a system that learns trumps trying to manually embed/program human knowledge into the system, so clever architecture is ok and expected.

Re:The Bitter Lesson is coming for Tokenization by Y_Y on Wednesday June 25, 2025 @04:23AM (#44374882)
What do the vector space embeddings for digit strings even look like? Can you do arithmetic on them? If that's even desirable that it seems like you could just skip "embedding" altogether and intern all the numbers along one dimension.
Re:The Bitter Lesson is coming for Tokenization by calibas on Tuesday June 24, 2025 @01:52PM (#44368862)
It's a non-deterministic language model, shouldn't we expect mediocre performance in math? It seems like the wrong tool for the job...
Re:The Bitter Lesson is coming for Tokenization by rictic on Tuesday June 24, 2025 @02:19PM (#44369121)
Models are deterministic, they're a mathematical function from sequences of tokens to probability distributions over the next token.

Then a system samples from that distribution, typically with randomness, and there are some optimizations in running them that introduce randomness, but it's important to understand that the models themselves are not random.

Re:The Bitter Lesson is coming for Tokenization by mgraczyk on Tuesday June 24, 2025 @03:14PM (#44369860)
This is only ideally true. From the perspective of the user of a large closed LLM, this isn't quite right because of non-associativity, experiments, unversioned changes, etc.

It's best to assume that the relationship between input and output of an LLM is not deterministic, similar to something like using a Google search API.

Re:The Bitter Lesson is coming for Tokenization by ijk on Tuesday June 24, 2025 @03:28PM (#44370022)
And even on open LLMs, GPU instability can cause non-determinism. For performance reasons, determinism is seldom guaranteed in LLMs in general.
Re:The Bitter Lesson is coming for Tokenization by rar00 on Wednesday June 25, 2025 @08:36AM (#44376582)
yep, even with greedy sampling and fixed system state, numerical instability is sufficient to make output sequences diverge when processing the same exact input
Re:The Bitter Lesson is coming for Tokenization by geysersam on Tuesday June 24, 2025 @04:29PM (#44370679)
The LLMs are deterministic but they only return a probability distribution over following tokens. The tokens the user sees in the response are selected by some typically stochastic sampling procedure.
Re:The Bitter Lesson is coming for Tokenization by danielmarkbruce on Tuesday June 24, 2025 @06:28PM (#44371710)
Assuming decent data, it won't be stochastic sampling for many math operations/input combinations. When people suggest LLMs with tokenization could learn math, they aren't suggesting a small undertrained model trained on crappy data.
Re:The Bitter Lesson is coming for Tokenization by anonymoushn on Tuesday June 24, 2025 @07:41PM (#44372243)
I mean, this depends on your sampler. With temp=1 and sampling from the raw output distribution, setting aside numerics issues, these models output nonzero probability of every token at each position
Re:The Bitter Lesson is coming for Tokenization by danielmarkbruce on Wednesday June 25, 2025 @01:58PM (#44380103)
A large model well trained on good data will have logits so negative for something like "1+1=" -> 3 that they won't come up in practice unless you sample in a way to deliberately misuse the model.
Re:The Bitter Lesson is coming for Tokenization by drdeca on Tuesday June 24, 2025 @02:03PM (#44368958)
Deterministic is a special case of not-necessarily-deterministic.
Re:The Bitter Lesson is coming for Tokenization by CamperBob2 on Tuesday June 24, 2025 @02:09PM (#44368999)
We passed 'mediocre' a long time ago, but yes, it would be surprising if the same vocabulary representation is optimal for both verbal language and mathematical reasoning and computing.

To the extent we've already found that to be the case, it's perhaps the weirdest part of this whole "paradigm shift."

Re:The Bitter Lesson is coming for Tokenization by currymj on Tuesday June 24, 2025 @08:18PM (#44372463)
thanks to training data + this being a popular benchmark, they're pretty good at grinding through symbolic mathematical derivations, which is often useful if you want an explanation of a mathematical concept. there's not really a better tool for this job, except for "a textbook which answers the exact question you have".

but from time to time, doing this does require doing arithmetic correctly (to correctly add two exponents or whatever). so it would be nice to be able to trust that.

i imagine there are other uses for basic arithmetic too, QA applications over data that quotes statistics and such.

Re:The Bitter Lesson is coming for Tokenization by agarren on Tuesday June 24, 2025 @08:33PM (#44372556)
> but from time to time, doing this does require doing arithmetic correctly (to correctly add two exponents or whatever). so it would be nice to be able to trust that.

It sounds weird, but try writing your problem in LaTeX - I don’t know why, I’ve found a couple models to be incredibly capable at solving mathematical problems if you write them in LaTeX.

Re:The Bitter Lesson is coming for Tokenization by search_facility on Tuesday June 24, 2025 @06:37PM (#44371781)
regarding “math with tokens”: There was paper with tokenization that has specific tokens for int numbers, where token value = number. model learned to work with numbers as numbers and with tokens for everything else... it was good at math. can’t find a link, was on hugginface papers
Re:The Bitter Lesson is coming for Tokenization by samus on Tuesday June 24, 2025 @08:16PM (#44372446)
Shouldn't production models already do this? They already tend to use tokenizers with complex rules to deal with a lot of input that would otherwise be tokenized in a suboptimal way. I recall a bug in an inference engine (maybe llama.cpp?) because of an implementation difference in their regex engine compared to the model trainer. Which means that the tokenizer used regex-based rules to chop up the input.
Re:The Bitter Lesson is coming for Tokenization by search_facility on Wednesday June 25, 2025 @05:15PM (#44381905)
turns out - no, by intuition they should do this for sure - but no.

UPD: Found the paper: - https://huggingface.co/papers/2502.09741 - https://fouriernumber.github.io/

in paper mentioned “number” is a single sort-of “token” with numeric value, so network dealing with numbers like real numbers, separately from char representation. All the math happens directly on “number value”. In majority of current models numbers are handled like sequences of chars

Re:The Bitter Lesson is coming for Tokenization by js8 on Tuesday June 24, 2025 @11:48PM (#44373480)
It's not strange at all. I am playing with lambda calculus and combinatory logic now, as a base for mathematics (my interest is to understand rigorous thinking). You can express any computation using just S and K combinators, however, there is a price to that - the computations will be rather slow. So to make the computation faster, we can use additional combinators and rules to speed things up (good example is clapp() function in https://github.com/tromp/AIT/blob/master/uni.c).

Of course, the extra rules have to be logically consistent with the base S and K combinators, otherwise you will get wrong result. But if the inconsistent rule is complicated enough to be used only infrequently, you will still get correct result most of the time.

Which brings me to LLMs and transformers. I posit that transformers are essentially learned systems of rules that are applied to somewhat fuzzily known set of combinators (programs), each represented by a token (the term being represented by the embedding vector). However, the rules learned are not necessarily consistent (as it happens in the source data), so you get an ocassional logical error (I don't want to call it hallucination because it's a different phenomena from nondeterminism and extrapolation of LLMs).

What is the "solution" to this? Well, I think during training you somehow need to make sure that the transformer rules learned by the LLM are logically consistent for the strictly logical fragment of the human language that is relevant to logical and programming problems. Which is admittedly not an easy task (I doubt it's even possible within NN framework).

Re:The Bitter Lesson is coming for Tokenization by vendiddy on Wednesday June 25, 2025 @02:18AM (#44374125)
Do LLMs need to be good at math with the same approach?

To draw an a analogy, we've got our human brain specialized.

Why not implement a part of the AI brain that's not neural nets, but instead circuitry specialized to math?

Maybe a dumb question since I'm a layperson!

Re:The Bitter Lesson is coming for Tokenization by williamdclt on Wednesday June 25, 2025 @05:57AM (#44375446)
Even if LLMs get better at arithmetic, they don't seem like the right tool for the job.

LLMs might never be able to crunch numbers reliably, however I expect they should be very good at identifying the right formula and the inputs for a problem ("i need the answer to x*y, where x=12938762.3 and y=902832.2332"). Then they can call a math engine (calculator or wolfram alpha or whatever) to do the actual computation. That's what humans do anyway!