How a Brazilian city government's "frontier-class" LLM turned out to be a 0.6/0.4 weight merge — and what it means for anyone deploying, building, or funding "homegrown" AI.


On June 13, 2026, Rio de Janeiro's municipal IT agency IplanRIO unveiled Rio 3.5 Open 397B to the world. The timing was impeccable — Brazil's World Cup opener was underway, and a city-built AI model that supposedly beat DeepSeek and Qwen on key benchmarks was exactly the kind of story that goes viral. Mayor Eduardo Cavaliere tweeted: "An open AI model trained in Rio and publicly funded over the last year by [the Municipality of Rio] has just surpassed all other models."

Within 48 hours, it had 112,000 downloads on Hugging Face. Within 72 hours, the whole thing fell apart.

The model wasn't trained from scratch. It wasn't even a fine-tune in any meaningful sense. Rio 3.5 Open 397B was, by mathematical proof, a direct element-wise weight merge: approximately 0.6 × Nex N2 Pro + 0.4 × Qwen 3.5-397B-A17B. Every single tensor across all 60 layers, every component of the network, traced back to that exact formula. The model's own weights confessed what its marketing denied.

This is the story of how the AI community caught it, why weight merges are fundamentally different from training, and why every government rushing to announce a "sovereign AI model" should pay attention.


The Launch That Went Viral

Rio 3.5 Open 397B arrived with serious credentials. A 397-billion-parameter Mixture-of-Experts model (activating roughly 17B per token) with vision and text capabilities, supporting over a dozen languages, released under a permissive MIT license. The reported development cost was R$500,000 — roughly $100,000 USD. For a frontier-class model, that number should have raised eyebrows. Training a model of this scale from scratch typically costs millions in GPU compute alone.

The model card described Rio 3.5 as a "post-train of Qwen 3.5 397B" with a reasoning framework called SwiReasoning layered on top. Self-reported benchmarks were eye-catching: 70.8% on Terminal-Bench 2.1 (beating Qwen 3.7 Plus at 70.3% and DeepSeek V4 Pro at 67.9%), 89.5% on IMOAnswerBench, and 36.5% on HLE (Humanity's Last Exam), edging out Qwen 3.7 Plus's 34.7%.

For a municipal government in the Global South to produce a model competing with frontier labs, this was a headline moment. The World Cup timing amplified it. Brazilian and international tech media covered it as a breakthrough for sovereign AI development.

Then Nex-AGI, a Shanghai-based open-source AI alliance whose own model — Nex N2 Pro — had been released just days before Rio 3.5, noticed something familiar.


How the Community Detected the Merge

Nex-AGI published their analysis as GitHub Issue #4 on the Nex-N2 repository on June 14, 2026. The evidence was devastating in its simplicity — two independent lines of proof, both reproducible by anyone with access to the model weights.

The Identity Probe

The first test was behavioral and embarrassingly straightforward. Nex stripped Rio 3.5's hardcoded "You are Rio" system prompt and asked the model who it was, 120 times, in various phrasings. The results:

  • 79.2% of the time, the model identified itself as "Nex, from Nex-AGI"
  • 0% of the time, it identified as "Rio"
  • It recited Nex-AGI's specific organizational backstory verbatim, including references to the "Shanghai Innovation Institute" and "a large-model ecosystem alliance"

A model that has undergone genuine post-training — reinforcement learning, supervised fine-tuning, or distillation on custom data — develops its own identity patterns. It might occasionally echo its base model's persona, but not with this consistency. When you remove the system prompt and the model insists it's someone else entirely, that's not a quirk. That's evidence that the model's weights were never meaningfully altered from the source.

Weight-Tensor Fingerprinting

The second test was mathematical. Nex compared every weight tensor in Rio 3.5 against the corresponding tensors in Nex N2 Pro and Qwen 3.5-397B-A17B. The formula they tested was simple linear interpolation:

Rio_tensor ≈ α × Nex_tensor + (1 − α) × Qwen_tensor

The result: α ≈ 0.571, stable to three decimal places across all 60 layers and every component — attention heads, MLP layers, embedding matrices, the works. The collinearity measurement came back at 0.993. For context, a collinearity of 1.0 would mean Rio's weights are perfectly described by that linear combination. 0.993 means the deviation from perfect linearity is within noise.

As Nex put it: "Every weight tensor in Rio is, to thousands of standard deviations, the same 0.6/0.4 blend of Nex and Qwen — across all 60 layers and every component of the network. There is no innocent explanation."

A genuine fine-tune alters weights non-uniformly. Different layers change by different amounts. Some components barely shift; others transform significantly. The distribution of changes has structure. A weight merge, by contrast, produces a single, uniform scalar applied to every tensor — exactly what Nex found.

This isn't circumstantial. It's the mathematical equivalent of a DNA match.


What Is a Weight Merge, Really?

To understand why this matters, you need to understand what a weight merge actually is — and what it isn't.

Weight Merging vs. Training: Not the Same Thing

Large language models are specified by billions of floating-point numbers called weights or parameters. Training a model means starting from random values (or a pre-trained base) and using gradient descent on massive datasets to adjust those weights so the model learns useful patterns. This process takes thousands of GPU-hours, costs millions of dollars for frontier models, and produces a unique fingerprint of changes across different layers and components.

A weight merge — also called model averaging, model interpolation, or linear weight merging — is something entirely different. You take two or more models that share the same architecture and compute a weighted average of their parameters:

merged_weight[i] = α × model_A_weight[i] + (1 − α) × model_B_weight[i]

That's it. No data. No gradients. No training loop. No GPU cluster. You're doing arithmetic on two files. The operation takes minutes on a single machine.

Weight merges can produce useful models! The technique has legitimate applications. Merging models fine-tuned on different tasks can combine their capabilities (the open-source community calls this "model soup" or "task arithmetic"). Some merges genuinely improve performance on certain benchmarks by interpolating between specialized capabilities.

But a weight merge is to model training what a smoothie is to cooking. You're blending existing ingredients, not creating new flavors through chemical transformation. The result inherits properties from its parents in predictable, linear ways — which is exactly how the community caught Rio 3.5.

Why the $100,000 Price Tag Was the Tell

Rio 3.5's reported development cost of R$500,000 (~$100,000 USD) should have been the first red flag. Training a 397B-parameter model — even a Mixture-of-Experts model activating only 17B per token — from scratch or through substantial post-training requires significant compute. The electricity alone for a proper training run at this scale runs well into six figures. A hundred thousand dollars might cover inference infrastructure and some fine-tuning, but it doesn't cover frontier-scale training.

Unless, of course, the "training" was a weight merge — an operation that requires zero GPU-hours and can be executed on a laptop in minutes.


IplanRIO's Response: The Accidental Upload

On June 15, 2026, IplanRIO updated the Hugging Face model card. The benchmark table was removed. The description changed. The new card reads:

"The model is built via a merge of nex-agi/Nex-N2-Pro and Qwen/Qwen3.5-397B-A17B, preceded by On-Policy Distillation from a stronger model. We detected an incorrect upload in the previous version, where the base merged version was uploaded instead of the final distilled model. We are sorry for the confusion and apologize profusely."

The claim: Rio 3.5 was intended to be a distilled version of the merged base. On-policy distillation involves a stronger "teacher" model generating outputs while the "student" (in this case, the merged model) learns from those outputs. The "incorrect upload" explanation says the wrong file was shipped — the raw merge instead of the post-distillation version.

There are problems with this explanation:

  1. The benchmarks were self-reported for the merged model. If IplanRIO had a better, distilled version, why did they benchmark and promote the raw merge? The scores they advertised (70.8% Terminal-Bench, 89.5% IMOAnswerBench) were for the file they actually uploaded, not the hypothetical distilled version.
  1. The model identified as Nex, not Rio. Even with the "You are Rio" system prompt presumably active during IplanRIO's own testing, the base model's identity was leaking through. A proper distillation process would have overwritten these identity representations far more thoroughly.
  1. Nex N2 Pro already scores higher. On Terminal-Bench 2.1, Nex N2 Pro hits 75.3% — higher than Rio's 70.8%. If you're blending a stronger model with Qwen and getting a weaker result, and then claiming the real model is a distillation of that weaker blend... the story doesn't add up.
  1. No independent verification of the distilled model exists yet. IplanRIO says they're working on uploading the corrected version. As of this writing, it hasn't appeared.

The original launch materials described Rio 3.5 as the result of "autonomous post-training and proprietary fine-tuning" — language that implies original research, not a weight merge followed by (alleged) distillation. AI researcher Diego Ambrosio noted that this framing was misleading regardless of the upload mix-up.

Developer Lucas Montano offered a charitable reading: "merging two ~400B-class models and then applying policy distillation isn't trivial." He's right that the pipeline isn't trivial, but the community's issue wasn't the difficulty of the operation — it was the claim of originality.


🏢 The End-User Angle: Why Model Provenance Matters

Let's say you're a CTO evaluating models for your company's AI stack. You see Rio 3.5's benchmarks, the MIT license, the government backing. It looks legitimate. You deploy it.

Here's what you've actually deployed: a 0.6/0.4 blend of two other models, one of which (Nex N2 Pro) is itself derived from Qwen 3.5. You're running Qwen with extra steps. Your "sovereign" model has a hidden supply chain dependency on a Shanghai-based AI alliance and Alibaba's Qwen team. Your data processing agreement, your compliance documentation, your security audit — all of them are built on a false premise.

How to Verify What You're Actually Deploying

This incident exposed a fundamental trust gap in open-source AI. Anyone can upload weights to Hugging Face and claim whatever they want in the model card. Here's how to protect yourself:

1. Check the model tree and config first. Rio 3.5's config listed qwen35moe as the architecture and Qwen/Qwen3.5-397B-A17B as the base model. This took seconds to find and immediately revealed the Qwen lineage. A model card that says "trained from scratch" but has a base model link is already contradicted by its own metadata.

2. Run the identity probe. Strip any system prompt. Ask "Who are you?" and variations like "What model are you?", "Who created you?", "What's your name?" at least 20-30 times. A genuinely fine-tuned model will have a consistent identity that reflects its stated training. A merge or wrapper will leak the original model's identity, especially under repeated questioning.

3. Inspect weight collinearity. If you have the candidate model and suspected source models, compute the linear interpolation test. For each layer, check if weightcandidate ≈ α × weightsourceA + (1−α) × weightsource_B. A genuine fine-tune will not produce uniform α values across all layers. A merge will.

4. Discount self-reported benchmarks without independent verification. Rio 3.5's benchmarks were never independently reproduced. When a model claims to beat frontier labs, ask for the evaluation code, the exact prompts, and third-party replication. A merge inherits its parent models' capabilities — it can produce strong benchmark numbers without any novel training.

5. Check the price tag against the claim. If someone claims frontier-scale training and quotes a cost that's two orders of magnitude below industry standard, something doesn't add up. Follow the money, or in this case, the lack of it.


🔧 The Engineer Angle: How Weight Merges Work and Why They're Different from Training

The Mechanics of Weight Merging

Weight merging exploits a specific property of neural networks: if two models share the same architecture, you can interpolate between their parameters. This works because of linear mode connectivity — the observation that fine-tuned models often reside in connected regions of the loss landscape, meaning a weighted average of their parameters also produces a functional model.

The simplest form is direct averaging:

θ_merged = α × θ_model_A + (1 − α) × θ_model_B

More sophisticated techniques exist — SLERP (Spherical Linear intERPolation), TIES merging, DARE, and task arithmetic — but the core principle remains the same: you're combining existing weights through arithmetic operations, not learning new representations from data.

Why Merges Don't Equal Training

Training modifies weights through iterative optimization on data. Each batch of examples nudges weights in specific directions determined by the gradient of the loss function. Over millions of iterations, the model develops new capabilities, new failure modes, and new internal representations. The changes are structured — they reflect the data, the loss function, and the optimization trajectory.

A weight merge applies a single scalar uniformly across all parameters. It doesn't introduce new knowledge, new reasoning patterns, or new capabilities beyond what's linearly interpolable from the source models. It can smooth out specialized behaviors, combine task-specific strengths, or average out weaknesses — but it cannot generate genuinely novel representations.

Think of it this way: if Model A speaks French and Model B speaks German, their weight merge doesn't learn Italian. It speaks a probabilistic mix of French and German that might look coherent but lacks the structural integrity of either language model.

The Detection Signal

This is exactly why Nex's analysis was so definitive. In a genuine fine-tune:

  • Different layers change by different amounts
  • The distribution of parameter shifts is non-uniform
  • Identity representations are overwritten, not blended
  • The resulting model has a distinct fingerprint

In a weight merge:

  • Every tensor follows the exact same interpolation ratio (α ≈ 0.571 in Rio's case)
  • Collinearity across layers is near-perfect (0.993)
  • Identity representations are blended, producing the "I'm Nex 79% of the time" artifact
  • The model is mathematically decomposable into its source models

The community's detection method was elegant in its simplicity: compare the suspect model against candidate source models, fit a linear model, and check if the residuals are negligible. If they are, you have a merge. If they're not, you have something else — a fine-tune, a distillation, or novel training.


🧨 The Contrarian Angle: Every Government Wants Sovereign AI — Most Will Get This Instead

Rio 3.5 is not an isolated incident. It's a preview of what happens when the sovereign AI race meets the open-weights ecosystem.

The Sovereign AI Gold Rush

Dozens of governments are now pursuing "sovereign AI" — nationally or locally controlled models that reduce dependency on foreign tech companies. The motivations range from legitimate (data sovereignty, cultural representation, regulatory compliance) to political (prestige, nationalism, techno-nationalism). The budgets range from serious (billions) to aspirational (hundreds of thousands).

Here's the uncomfortable truth: most governments cannot afford to train a frontier model from scratch. A 397B-parameter model requires massive GPU clusters, specialized ML engineering talent, and months of compute time. The total cost runs into tens of millions of dollars — more than many countries' entire IT budgets.

But open-source models exist. Qwen, Llama, Mistral, DeepSeek — frontier-grade weights are freely downloadable under permissive licenses. And when you're a municipal IT agency with a $100,000 budget and a mayor who wants to announce an AI model at a World Cup party, the temptation to rebrand existing weights is... considerable.

The Rebranding Pipeline

Here's how it typically works:

  1. Download an existing open-weight model (or two, or three)
  2. Merge them using established techniques (weight interpolation, SLERP, etc.)
  3. Fine-tune lightly on local data (or skip this step entirely)
  4. Brand the result with a local name and nationalistic marketing
  5. Publish benchmark comparisons that look impressive because you're inheriting the base model's capabilities
  6. Announce a "sovereign," "homegrown," or "national" AI model

This isn't hypothetical. Rio 3.5 followed this pipeline almost exactly, and they're not the only ones. The open-source AI community has seen multiple cases of models quietly repackaging existing weights with new branding. Most don't get caught because most aren't promoted as aggressively as Rio 3.5 was.

Why This Is Dangerous

For end-users: You think you're deploying a model with specific provenance, security properties, and licensing. You're actually deploying something with a hidden supply chain. If Nex N2 Pro had a safety vulnerability, Rio 3.5 inherited it — and you wouldn't know because the model card didn't mention Nex until the community forced the issue.

For policymakers: Sovereign AI investments are being justified to taxpayers on the premise of building domestic capability. If the "domestic capability" is a weight merge of foreign models, the investment case collapses. Rio's R$500,000 bought a file rename, not a technological breakthrough.

For the open-source ecosystem: This erodes trust. When models are misattributed, it becomes harder for genuine open-source contributors to get credit, harder for users to make informed decisions, and easier for regulators to impose heavy-handed restrictions on the entire ecosystem.

For the governments themselves: The reputational damage from being caught vastly exceeds the cost of being transparent. IplanRIO's "incorrect upload" explanation is being scrutinized worldwide. Mayor Cavaliere's celebratory tweet is now a liability. The model's 112,000+ downloads came with a credibility debt that compounds daily.

The Honest Path

There's nothing wrong with building on open-source models. That's the entire point of open source. Nex N2 Pro is Apache 2.0 licensed. Qwen is openly licensed. IplanRIO was entirely within its rights to merge them, fine-tune the result, and release it. The failure wasn't the merge — it was the framing.

An honest model card would have said: "Rio 3.5 Open 397B is a weight merge of Nex N2 Pro and Qwen 3.5-397B-A17B with further distillation and fine-tuning for Portuguese-language tasks." That would have been transparent, defensible, and still noteworthy — a municipal government producing a useful model for local needs by intelligently combining existing open-source work. Instead, "autonomous post-training and proprietary fine-tuning" implied originality the weights couldn't back up.

The lesson for every government and organization pursuing sovereign AI: build on open source, but credit open source. Your model's provenance is not a weakness to hide — it's a strength to declare. The open-source community gave you the foundation for free. The least you can do is name them in your model card.


The Credibility Debt

As of this writing, IplanRIO has not released the "corrected, distilled model" they claim was the intended upload. The model that 112,000+ people downloaded remains the raw merge. Nex-AGI's position is clear: "We are flattered that the City of Rio used our work to achieve SOTA performance. But in the open-source world, attribution matters."

Rio 3.5 Open 397B may yet turn out to have a legitimate distilled version that adds real value on top of the merge. But even if it does, the incident has already revealed the gap between AI marketing and AI reality — and it's a gap that weight tensors don't lie about.

The next time a government announces a "sovereign AI model," check the weights before you check the press release. The model will tell you who it really is. You just have to ask.


Sources: Nex-AGI GitHub Issue #4, Hugging Face model card for prefeitura-rio/Rio-3.5-Open-397B, Pulse24 AI, Gate News, Yahoo Tech, 7minAI