33 comments

[ 2.6 ms ] story [ 91.5 ms ] thread
AI can not handle basic math like deciding which is greater between 9.11 and 9.9? A popular meme sparks debates about LLM's grasp of elementary math. Introducing mathstral, Mistral AI's latest opensource model, fine-tuned specifically for mathematical reasoning and scientific discovery. I just ran a series of tests to determine if mathstral can truly discern the larger of two decimal numbers in a way that makes sense to us humans. Using LlamaEdge's Rust + Wasm tech stack, I set up mathstral on my local machine—no complex installations needed! The results? Absolutely fascinating and promising for the future of AI in education and beyond. Want to see how it performed and possibly set it up yourself? Check out this detailed easy-to-follow walkthrough
Naive question: will scaling laws be sufficient for reliable reasoning, or are transformer architectures incapable of that ?
Simply scaling to larger models, but retaining naive next token prediction, won’t be enough to get to reliable reasoning on truly novel tasks. Any gains will be reasoning by analogy to a larger number of reasoning examples.

But I don’t think any of the big closed source models are relying entirely on next token prediction anymore. They are using reinforcement learning to add new (more complex) objectives to the training. This might allow for better reasoning abilities within the same architecture.

You’re likely to get a few different answers, one of which is some variation on ‘they’re universal function approximations, so of course’.

The real answer is: no one could possibly know at this point. My impression is that very few experts believe that transformers alone will lead to AGI (which surely requires ‘reliable reasoning’), even amongst those who believe we’ll all be intellectually replaceable within a decade.

Alternative question: is being human enough for reliable reasoning?

Probably not, but in some, or most, cases may be. You can see it in schools on math exams. Not all pupil can do it, some lack the knowledge, but most simply cannot put things together. "WHY" is another big question.

It’s not a naive question at all: it’s a very nuanced and controversial question in at least two major ways.

The question of what constitutes reasoning is extremely difficult to answer or attempt to answer in a rigorous way. We struggle with clear bright lines on this even as concerns biological organisms with vastly more flexible goal-directed behaviors, and on the closely related concept of consciousness, we lack a consensus even for humans in the womb.

Speaking for myself I tend to focus on “useful” levels of planning, generality, and goal-seeking to sidestep some of the thornier philosophical issues.

Even there things are wildly controversial. There is a significant group (including some very serious and credentialed experts) who claim that the trajectory is clear: some version of AGI is not only possible with these architectures but so imminent as to demand drastic policy decisions.

There is another group (likewise including unimpeachably credentialed experts) who claim that there is no evidence for this extraordinary claim, and that attention decoders in no way show potential for this kind of generality.

My understanding of the math and mechanism, for whatever it’s worth, inclines me to agree with the latter group.

"reliable reasoning" is not the same as AGI. The first can be a big calculator which solves some problems on limited domain. Like engineering, this could boost the progress. Very likely this is possible. Actually it's already happening in some areas like proteins research, not sure it can be called reasoning, though.
> As we have seen, leading edge LLMs, such as the GPT-4o, can solve very complex math problems.

No… they can’t. That’s like saying a search engine can solve math problems — which it can, in a sense.

I suspect that the people repeatedly saying this simply lack the knowledge to know what really constitutes a ‘complex math problem’.

And of course any half-decent new model can answer this particular question correctly; the designers aren’t stupid or unaware of what the expectations and common traps are. The model itself probably will be able to talk about why testing on such comparisons would be interesting (because it ‘knows’ about how this being a recent meme).

I asked Google Assistant to give me the prime factorization of an integer. It gave me the right answer, but it was because it happened to a webpage that had that number as an example problem.

I was still incredibly impressed.

In the JSON response (after "And the response is the following.") it says that "(...) Since 1 (from 9.11) is greater than 0 (implicitly, as there's no second digit in 9.9), we can conclude that:\n\n$$9.11 > 9.9$$ (...)"
It goes wrong a bit before that when it says:

"Compare the first digit after the decimal point of both numbers.

- For 9.11, the first digit after the decimal point is 1.

- For 9.9, the first digit after the decimal point is also 1."

None of them is wrong, the answer depends on the type of the object, which the notation doesn't specify:

Version 9.11 is greater than 9.9

Decimal 9.9 is greater than 9.11

It can also be a book chapter, a month.day. Unless the comparison specifically asked for decimals, there is no single true answer.
This is a misapplication of default reasoning: if someone were to ask you which was lesser with no additional context, then there is only one correct answer.
Admittedly, I also assumed that the question was referring to version numbers instead of real numbers and was confused for a few seconds.

Though that may just be because I program a lot more than I do arithmetic nowadays.

(comment deleted)
This was all over Threads last week, posted by anti-AI people who who don't know how LLMs work. These are the same people who post screenshots of LLMs attempting to count the number of 'r's in "strawberry".

> "The 7B mathstral model answers the math common sense question perfectly with the correct reasoning."

Answers perfectly, sure. But the word "reasoning" is anthropomorphism and promises a level of cognitive ability that LLMs do not possess.

Do you need to “know how LLMs work” to know whether basic math is right or wrong?

I know when a car has a flat tire, even if I don’t know a tappet from a carburettor.

> Do you need to “know how LLMs work” to know whether basic math is right or wrong?

It's good for everybody to know enough about how LLMs work to know why one shouldn't use an LLM to do math. Once that's understood, the need for and purpose of tools like Code Interpreter become clear.

I'm quite confused. In the article, the response from mathstral is also wrong???
you are not confused. >* we can conclude that:\n\n$$9.11 > 9.9$$\n\n7.* Therefore, the final answer is:\n\n$$\\boxed{9.11}$$","tool_calls":[],"role":"assistant"},"finish_reason":"stop","logprobs":null}],"usage":{"prompt_tokens":26,"completion_tokens":293,"total_tokens":319}}
Wait wait wait… the json output is incorrect, full stop. It claims the first decimal digit of 9.9 is ‘0’. Mathstral might be great; it might be terrible; either way this particular test should be done first at 0 temp and then like 50 or 100 times at 0.7 temp, but in any event the writer owes it to themselves (and us) to notice that the claimed ‘good’ output is totally incorrect.
Article writer is probably also an LLM.
It foreshadows a degenerate form of AGI, where AI isn't nearly smart as humans, but is convincing enough to bring human intelligence down to its own level.
It’s explanation in one of the examples is also incorrect:

> In decimal representation, a number with a higher digit in the tenths place (the second digit after the decimal point)

The tenths place is the first digit after the decimal place.

> It claims the first decimal digit of 9.9 is ‘0’.

You meant to write `1` I assume (as it claims "For 9.9, the first digit after the decimal point is also 1.").

> The case in point is that most LLMs, including GPT-4o, cannot tell whether 9.11 or 9.8 is bigger!

Wrong. GPT-4o gives me the correct answer to this question, 9.8.

Even GPT-3.5 was correct, and so was Claude Sonnet 3.5. Haiku usually gets it wrong.
This is like 200x more complicated setup than just running Ollama.
Which is the correct answer?

(Note that the logic in the response from the LLM is blatantly nonsense).

I found this interesting and tried the question with the top models from Antrophic, Openai, Google and Mistral. Which all gave the wrong results. But if you preface the question with "Of these two decimal numbers ", the answers changed and the results where correct. I suspect what we are seeing is that the models handles the numbers as version numbers, and not decimal numbers. This is disappointing and confusing, but it also imo. underlines that giving them context on what you try to get them to do is worthwhile.