Hello. I am mew, a data engineer at an SIer.
While I call myself a data engineer, my daily work often involves solving customer problems using AI.
Therefore, I am working hard every day to keep up with LLMs and their surrounding ecosystem in general, and I hope that by outputting my findings in this note, I can achieve both the consolidation of my own knowledge and the promotion of understanding for everyone else.
Theme of this article
Many models are emerging, such as Gemini, Claude, and GPT.
In such a situation, which model should I use when performing this task?
I want to use them differently depending on the situation, such as Claude for writing and GPT for coding (there is also the option of using smaller models for token cost reasons).
Also, as with Claude Mythos, we can expect restrictions such as 'only available in certain regions' or 'sudden discontinuation of service'.
I would like to roughly understand the paper'Trinity: An Evolved LLM Coordinator'which describes a small language model (SLM) that judges 'which model should be used now'.
※This paper is published by SakanaAI, a famous Japanese AI startup.
The released Fugu is also thought to be based on this philosophy.
Rough overview
1. Background and challengesCurrently, there are many excellent large language models (LLMs) in the world, such as GPT-5, Gemini, and Claude. When we think about combining these to create a smarter system, conventional 'model weight merging methods' have had major limitations. This is because the structures of each model are different, and many models can only be used via API (their internals are not public).
In other words, even if you try to create an LLM that takes the best of everything, you cannot create the strongest one that possesses the merits of 'GPT + Claude' because the internal specifications are not public in the first place and you can only call them. (It is also argued that even if you could create one, the training cost would be high.)
2. Proposal of TRINITYTherefore, the system proposed is 'TRINITY'. Instead of tinkering with the inside of the models, it takes a macro approach of preparing a 'lightweight commander that controls the conversation (coordination) of multiple LLMs' from the outside.
TRINITY aims to solve user queries over multiple turns. At that time, the commander dynamically assigns one of the following three roles (three-role protocol) to the LLMs in the pool (on hand) for each turn.
Thinker (Thinking/Planning role): Develops high-level strategies, analyzes the current situation, and instructs 'who should do what next'.
Worker (Execution/Practical role): Responsible for practical tasks such as specific problem solving, code creation, and numerical calculation.
Verifier (Verification/Evaluation role): Strictly checks whether the provided answer is correct or completed (if OK is given, it ends at that point).
-
Overwhelmingly lightweight commander:
The commander itself consists of a very compact language model of about 0.6B (600 million parameters) and a small routing head of about 10,000 parameters. Since all advanced thinking and specialized skills are offloaded to external LLMs (such as Workers), the commander itself can be surprisingly light.
-
Optimization via "Evolutionary Computation (CMA-ES)":
The intelligence of this command tower (when to assign which role to whom) is optimized not through general gradient-based learning, but by using an evolutionary algorithm (CMA-ES) that mimics evolution in the natural world. This has succeeded in efficiently learning complex, high-dimensional "allocation rules."
In experiments, it consistently outperformed top-tier individual models (GPT-5, Gemini, Claude, etc.) and existing multi-agent methods.
In particular, on the programming benchmark (LiveCodeBench), it recorded 86.2% pass@1 which was the state-of-the-art at the time. Furthermore, it has shown high generalization performance (applicability) even for tasks in unknown domains (Out-of-Distribution) that it did not see during training.
Note that this research later became the technical foundation for the multi-agent system "Sakana Fugu," commercialized by Sakana AI.
Details: Why it can be achieved with a lightweight 0.6B model
The claim is: "Even in a small AI model, the 'internal state (hidden state)' immediately after finishing reading a text is packed with deeply summarized contextual data. If you just extract and use that part, you should be able to issue perfect instructions with just a small routing head (10,000 parameters)!"
1. What is a "Hidden State"?When an AI (the mechanism called a Transformer) reads or writes text, it doesn't just line up words internally; it creates a huge list of numbers (vectors) in its brain that condenses "the context so far and the nuance of what it wants to say next." This is the "hidden state."
Because the words in the text are connected to each other by a function called "self-attention," as the AI reads through the text, the "previous context" becomes increasingly concentrated in this hidden state.
Hidden state immediately after input: The intent and context of the query thrown by the user are tightly packed here.
Hidden state immediately after output: The reasoning process of "how the AI thought and how it answered" is tightly packed here.
The paper states that the hidden state of the "step immediately before" outputting the very end of the text (the end signal such as an EOS token or </think>) is the most valuable. This is because, at that moment, the brain is in the following state:
Witnessing everything: A state that is the culmination of having directed "attention" to every word, from the input question to the thought process it generated itself.
Just before predicting 'end': The moment when the brain is neatly organized and stable, thinking, "Okay, all thoughts are out now, so let's end the conversation (output the end token)."
In other words, this means that an ultimate summary is completed here, 100% concentrated with "the user's question intent" and "the command tower's own thought process."
3. The central hypothesis of this paper (what is so amazing about it?)Conventional wisdom held that "to correctly judge advanced routing (who to assign a task to), the command tower itself must be a huge and smart AI (LLM)."
But the authors of this paper realized this:
In this image, the small language model on the left (0.6B SLM) receives a "User Query" and generates a "Rich Contextual Representation" (also known as Condensed Brain Data, or hidden state), which is the most information-dense representation derived from the context including previous tokens.
It depicts how that condensed data is received by a lightweight "ROUTING HEAD" with only 10,000 parameters, which then selects the "Worker (task-executing LLM)" optimal for that context.
Since these 10,000 parameters are optimized by the CMA-ES algorithm, you can intuitively see that even this small head can accurately perform routing decisions to GPT-4 (Thinker role), Claude (Worker role), or the SLM itself.
How to choose the model to use from the hidden state
What is a Routing Head?By passing the hidden state through the Routing Head, it provides the answer to: Which LLM should be used? In short, a Routing Headis an extra, ultra-minimal component attached to the very back of an AI's brainthat specializes in sorting tasks.
In the world of AI (especially Transformer models like LLMs), the model structure is often divided into a'base' (body/main brain)and a 'head' (output component).
Base (body): A massive component responsible for the 'majority of thinking,' such as understanding the meaning of words and organizing context.
Head (head): An 'exit' component that receives the data organized by the base and converts its form for a specific purpose (predicting the next word, analyzing sentiment, etc.).
The 'Routing Head' in this paper is a dedicated exit created solely for the purpose of'deciding which Worker (LLM) to assign a task to,'instead of the usual 'head that predicts the next word.'
Why is only 10,000 parameters enough?Grasping the intent of a sentence and judging 'Should this be assigned to GPT-4? Or Claude?' is usually a very advanced and mentally demanding task.
However, in this system, theincredibly difficult preliminary work of sorting (understanding the user's question intent and organizing the context) has already been completed by the 0.6B SLM (body) in front.
The 'second-to-last hidden state (Rich Contextual Representation)' that the SLM has finished processing in its brain is, so to speak, 'ultra-elite summary data where the main points of the question are 100% condensed.'
The role of the Routing Head is to receive that perfectly organized data and...
'Oh, given the characteristics of this data, it's Worker A (GPT-4).'
-
'Given these characteristics, it's Worker B (Claude).'
making just one final judgment like agoalkeeper.
Because the data is already organized to the extreme, the Routing Head itself does not need to have complex thought circuits (vast parameters), and it can get by with anunbelievably mini size of '10,000 parameters (in terms of mathematical formulas, about a small set of multiplication and addition).
Let's confirm the process until a model is selected with a concrete example.Suppose the 0.6B SLM (brain) analyzes the user's question and calculates the following three feature values (scores):
'Coding degree' (Is it programming or technical content?) = 0.9
'Essay degree' (Is it a novel, long text, or creative content?) = -0.7
'Simplicity degree' (Is it a greeting or simple calculation that ends quickly?) = -0.2
In other words, it means 'do some simple programming.'
Suppose the weights of the routing head have characteristics like this for this input.
"GPT" (good at programming) [0.8, -0.1, -0.2]
"Claude" (good at writing) [-0.3, 0.8, -0.4]
"Gemini" (good at light tasks) [-0.5, 0.2, 0.6]
When you combine these, you can see that the feature vector of the question is close to the weights of GPT. In this case, it means selecting the GPT model as a 0.6B lightweight model.
In reality, routing is performed based on the roles that appeared at the beginning, so
factors such as 'this model is good as a Thinker' will also be taken into consideration.
Thinker (Thinking/Planning role): Develops high-level strategies, analyzes the current situation, and instructs 'who should do what next'.
Worker (Execution/Practical role): Handles practical tasks such as specific problem solving, code creation, and numerical calculations.
Verifier (Verification/Evaluation role): Strictly checks whether the provided answer is correct and complete (if OK is given, it ends at that point).
In this way,
send a request to the Thinker, and the Thinker model executes the task.
Return the execution result to the 0.6B model.
Select the Worker model again and have it execute the task.
The task will proceed in a loop like this.
I will end this summary here.
This paper also contains another claim. It describes how these small-scale models were trained, so please take a look if you are interested!
As a promotion, I'll leave a link to my favorite headphones
(they are open-ear type and the best)