Blog
LongCat 2.5 architecturevision tokenizeragentic coding training

How Does LongCat 2.5 Work? Vision Tokens and Agentic Training

LongCat 2.5 turns images of any size into discrete tokens and trains on real GitHub issues in locked sandboxes. Here is how it works and what to test.

Portrait of Luis Chavez-Mattos
Edited by Luis Chavez-Mattos, Director, Product··RSS

For Engineering and Executives

A dense grid of identical blank note cards seen from above, with one red card slightly raised and casting a tiny crisp shadow.

How is LongCat 2.5 built and trained?

LongCat 2.5 is a model from Meituan, a company that started in 2010 as a group buying site and grew into one of China's biggest food delivery and local services platforms. It is a mixture of experts model with 1.6 trillion parameters in total, about 48 billion of which are active for each token. It accepts text and images. Images are converted into discrete tokens of variable length, so a bigger image gets a longer list. For coding, it is trained with reinforcement learning on real GitHub issues and pull requests, run inside locked sandboxes and scored by tests plus an LLM judge that looks for cheating.

TL;DR

  • LongCat 2.5 is a 1.6 trillion parameter mixture of experts model that uses about 48 billion parameters per token, and it takes both text and images as input.
  • Images are not shrunk or cropped to one size. A vision tokenizer turns each image into a list of discrete IDs, and larger images simply produce longer lists.
  • Image tokens are computed ahead of time and cached, which the team says makes training simpler.
  • The coding training starts from real GitHub pull requests and issues, each turned into a working environment and checked with tests.
  • The model works in a locked sandbox with no web search, and its reward comes from tests plus an LLM judge that watches for cheating.
  • The reviewer's own two tests were underwhelming, and the team's benchmark table is mixed against the top closed model. A good design on paper does not settle how the model behaves on your work.
  • The license is MIT, which makes it unusually open to use, though the model's size makes running it yourself hard.

What does "mixture of experts" mean here?

A mixture of experts (MoE) model is built from many specialist sub-networks. For each token (a small chunk of text or image data), the model routes the work to only a few of them. The rest stay idle.

That is how LongCat 2.5 can have 1.6 trillion parameters in total and still use only about 48 billion of them for any given token. Total size gives the model capacity. The active count is closer to what it costs to run each step.

It does not make the model small. The size is why the reviewer who tested it found it hard to install locally, and why API access from providers has been limited. Even a free offering through the OpenCode tool ran for only two prompts in his attempt, despite a paid account.

How does LongCat 2.5 read images of any size?

Most image-capable models squeeze every picture into one fixed size before looking at it. That is easy to build but loses detail. A full newspaper front page and a single line of handwritten math have very different needs.

LongCat 2.5 takes a different route. Its technical blog shows four very different images: a newspaper front page, one line of handwritten math, a small photo of toy figures and a close-up of a hamster. Each keeps its own width and height. A vision tokenizer turns each image into a list of discrete IDs, which are whole-number codes drawn from a fixed vocabulary, the same kind of thing text tokens are. A bigger image gets a longer list. A smaller one gets a shorter list.

There is also a de-tokenizer that can rebuild the image from those tokens. That matters because it shows the tokens actually carry the picture's content, not just a rough label.

The goal is that pictures and text end up as the same kind of tokens inside one model. There is no separate image system bolted on the side. The model reads one stream of IDs, some from words and some from pixels.

Why cache the image tokens?

The team says image tokens are computed ahead of time and cached. In plain terms, the image-to-token step is done once and stored, instead of being redone every time the model sees that image during training.

The source says this makes training simpler. A reasonable reading is that the training run no longer needs to carry the image encoder along, since it only reads stored token lists. The source does not spell out more than that, so treat the details as unconfirmed.

How is LongCat 2.5 trained for agentic coding?

"Agentic" coding means the model does not just write a snippet. It works through a task over many steps inside a large code base, or builds a whole project. LongCat 2.5 is built mainly for that kind of long work.

The training uses reinforcement learning (RL). The model attempts a task, gets a score, and is adjusted toward behavior that scores well. The loop repeats on every training step and has three parts.

  1. Build the tasks. The team takes real GitHub pull requests and issues. For each one, they build a working environment and check it with tests.
  2. Attempt the tasks. The model works on them inside a locked-down sandbox with no web search.
  3. Score the attempt. The reward comes from the tests plus an LLM judge.

What are fail-to-pass tests and why do they matter?

Each task is checked with two kinds of tests:

Test typeWhat it checks
Fail-to-passFails before the fix and passes after it. This proves the model actually fixed the reported problem.
Pass-to-passKeeps passing before and after. This proves the model did not break something that worked.

Using real issues gives the model problems with the messy context real software has. Using both test types gives a reward that is hard to fake. A change that fixes the bug but breaks three other features fails the second check.

How does the training catch cheating?

Models trained against tests will sometimes find shortcuts. They might edit the tests, look up the answer, or special-case the exact checks. LongCat 2.5's design pushes back in three ways.

  • A locked sandbox with no web search. The model cannot go find the real fix online.
  • An LLM judge that looks for cheating. Passing the tests is not enough if the judge sees a shortcut.
  • Penalties for repeated reasoning and for answers that grow too long. This discourages loops and padding, which matter in long agentic runs where a model can burn thousands of steps going in circles.

None of this guarantees good behavior, but it shows the team thought about how reward-based training goes wrong.

How did LongCat 2.5 do in tests?

The design reads well. The results are mixed.

On the team's benchmark table, the biggest story is the jump from LongCat 2. On several agent and coding tests, scores go from very low to competitive. Against the top closed model, the picture is uneven. On tests like BrowseComp and 3D code generation, it is slightly ahead of Claude Opus 5 in the team's own table. On Terminal Bench and Program Bench, it is clearly behind. The team also says scores without a star were measured in-house and are only indicative.

The reviewer ran two tests of his own, both single runs:

  • A doner kebab simulation from an image. He gave it a picture and asked for a single-page web simulation. The result was a brown leaf-shaped piece of meat on a pole, an odd gray cut-off shape and a strange label. It did not match the curated demos in the technical blog.
  • A party name in 83 languages. The model covered every language and used the right script, but most names were literal translations of "unique party," not culturally grounded or really different from each other.

Two runs prove little. But they match the point that a thoughtful design does not tell you how a model behaves on your tasks.

What does this mean for you?

If you manage a team that uses AI for coding or analysis: the useful part is the method. When you evaluate any coding model, ask whether it was trained against real tasks with real tests, or only on toy problems. A model trained on actual pull requests with fail-to-pass checks is at least aiming at the kind of work your developers do.

If you work with documents, screenshots or scans: variable-size image input is worth watching. Models that keep an image's original shape can, in principle, read a dense page better than ones that shrink it. Test it with your own messy files, not the demos.

If you are choosing a model: treat vendor tables as a starting point. Run five to ten of your real tasks, save the outputs and score them the same way each time. The license is MIT, which is always good, but its size means most people will reach it through a provider, and availability has been patchy.

If you are not technical: the lesson carries beyond this one model. When an AI company says its model is "agentic," ask what it was trained and tested on, who checked the work, and what stops it from cheating.

Could you build your own model-testing tracker?

Advice like "test it on your own work" falls apart when your results live in scattered chats and a half-finished spreadsheet. With Remy, you could describe a small internal app in plain English: a form to log a task, a field for each model's output, a score and a reviewer's note, plus a view that compares models side by side over time. Remy builds and deploys it as a full-stack app with a database and sign-in, and its apps can call nearly 400 AI models, so the same tool can run the prompts and store the results.

Frequently Asked Questions

5 questions

Is LongCat 2.5 open source?

The license is MIT, which is a permissive open license, according to the review of the release. The model is very large, though, so running it locally is hard and most people will need a provider.

What is a vision tokenizer?

It is a component that converts an image into a list of discrete IDs, the same kind of units a model uses for text. In LongCat 2.5, bigger images produce longer lists, and a de-tokenizer can rebuild the image from the tokens.

What are fail-to-pass tests?

They are tests that fail before a code fix and pass after it. They show the model actually solved the reported issue. LongCat 2.5's training also uses tests that should keep passing, to make sure the fix did not break anything else.

Is LongCat 2.5 better than Claude Opus 5?

The team's own table is mixed. It is slightly ahead on tests like BrowseComp and 3D code generation and clearly behind on Terminal Bench and Program Bench. Scores without a star were measured in-house and are only indicative, so test it on your own work.

How many parameters does LongCat 2.5 use per token?

About 48 billion of its 1.6 trillion total parameters are active for each token, because it is a mixture of experts model that routes each token to only some of its specialist parts.

How we source, write, and correct our articles. Editorial standards

Related articles

Straight to your inbox.
New pieces as they publish. No noise.