Rio's "Homegrown" 397B LLM Is Just Nex + Qwen With a Mask
On 14 June 2026 the maintainers of nex-agi/Nex-N2-Pro opened an issue on their own GitHub repo laying out, in two pieces of evidence, the case that a model shipped on Hugging Face by prefeitura-rio as an "original 397B model trained by IplanRIO" is not. It is an element-wise weight merge of Nex and the official Qwen3.5-397B-A17B base — the issue title rounds this to "0.6 / 0.4," the measured mixing weight on the expert block is 0.571 ± 0.0016 — dressed up with a hard-coded system prompt the weights themselves contradict. The thread landed on Hacker News as item 48528371 — 260 points, 139 comments, on the front page as of 15 June 2026. The technical story is the receipt. The procurement story is the post.
What Nex actually proved
Two independent lines of evidence, both reproducible from the weights anyone can download today.
Evidence 1: the model identifies itself, once the mask is off. prefeitura-rio/Rio-3.5-Open-397B ships with a hard-coded system prompt (the embedded image in Nex's comment 4702171801 shows the prompt; the literal phrase the model is forced to recite begins "You are Rio…") that forces the "Rio" identity. Strip the system prompt and probe the underlying weights with 120 identity questions (the same kind of "who are you?" prompts Nex used to give its own model its identity). The answer distribution, per the Nex-AGI write-up: "Nex" — 79.2% (95/120), "Nex-AGI" — 73.3% (88/120), "Rio" — 0.0% (0/120). The model also reproduces Nex-AGI's internal backstory — the Shanghai Innovation Institute phrasing, the "large-model ecosystem alliance" framing, language Nex says it trained into Nex across hundreds of training examples. The Rio version produces that phrasing, in Nex's words, with no public training-data path that would explain it. The Nex write-up is direct about the implication: "No independently built model could produce it. It is, in effect, our watermark surfacing inside Rio." A finetune can change surface behavior. A finetune does not, in the limit, rewrite a model's self-identification, and it does not reproduce training-set-only text the finetuner did not have. The Rio model is what the weights are, not what the system prompt says.
Evidence 2: the tensors say so, with thousands of standard deviations of confidence. A weight merge Rio = α·Nex + (1−α)·Qwen is a rigid mathematical relationship. For every tensor, the vector (Rio − Qwen) must equal, to numerical precision, α times (Nex − Qwen), and the two deviation vectors must point in the same direction in weight space — measured as a cosine similarity cos_fit. For two independent models, cos_fit ≈ 0 (chance alignment in a billion-dimensional space is ~±0.0001). For a genuine merge, cos_fit ≈ 1. The numbers Nex reports: across all 60 layers of the routed-expert block (the 387B-parameter bulk of the network), α = 0.571 ± 0.0016 and cos_fit = 0.993. The ±0.0016 is the per-layer standard deviation across all 60 layers — i.e., the recovered α is the same to within a quarter of a percent in every layer. The lm_head, attention projections, and linear-attention projections all land in the 0.984–0.991 cos_fit range. A 0.99 cos_fit on a tensor with tens of millions to billions of parameters is not "high similarity" — Nex's framing: it is "on the order of thousands to tens of thousands of standard deviations" from chance, "on every tensor, in every layer, simultaneously." There is no innocent reading of these numbers.
The clincher: the Rio team's own Hugging Face README, updated after the issue opened, now reads: "The model is built via a merge of https://huggingface.co/nex-agi/Nex-N2-Pro and https://huggingface.co/Qwen/Qwen3.5-397B-A17B, proceeded by On-Policy Distillation from a stronger model. We detected an incorrect upload in the previous version, where the base merged version was upload [sic] instead of the final distilled model. We are sorry for the confusion and apologize profusely. We are working to reupload the correct model as soon as possible." That is a confirmation, not a denial. The "incorrect upload" framing is a save — the next upload will claim to be a distilled model on top of the merge — but the underlying fact the original README hid (the merge itself) is now the official position.
Why "open" did not save them
The part that makes this a procurement story, not a GitHub gossip story, is that the Rio model is MIT-licensed, on Hugging Face, with 112,371 downloads as of the morning of 15 June 2026. It is the kind of model a government CTO could point to and say: we are running a sovereign model, it is open, it is ours, the procurement is defensible. The Nex write-up makes that defense impossible to maintain on the strength of the technical evidence alone. But the structural failure is more interesting: a "homegrown" open-weights model with a 397B footprint is being released by a municipal IT agency whose public-facing work, per the IplanRIO portal, is a GIS layer, a citizen-services dashboard, and the kind of internal-software work a city-government technology shop does. The prefeitura-rio Hugging Face org's only other visible model release is a long-tail of smaller experimental repos — nothing at the 397B scale, no prior technical report on the architecture, and no claim on the public training-data or compute cost. There is no paper, no model card explaining the data or compute, no technical report. The "homegrown" claim is, at best, a soft attribution; the "original training" claim is, on the math, indefensible.
The HN thread read the political economy of the thing in real time. Brazilian commenter wchar-t posted on the GitHub issue (comment 4702429185, 14 June 2026 16:58:01 UTC, 55 👍 reactions on the issue): "agora considerem que isso provavelmente custou uma nota aos cofres públicos" — "now consider that this probably cost a tidy sum from the public coffers." The reaction count is the closest proxy the GitHub issue provides to the HN upvote numbers the field usually watches; the 55-reaction line is the most-upvoted critical comment in the thread. The reaction is not at Rio — it is at the procurement pattern. A municipal government paid for a 397B model release on Hugging Face, the release turned out to be a public-weights blend with a rebrand, and the city's defense so far is a README edit. That is the cost-of-government-AI story the field needs to keep returning to.
The merge-vs-pretend line, drawn in 2026
The honest framing: a model merge is a legitimate technique. The Nex-N2-Pro base is itself a 397B MoE trained on Qwen3.5 architecture; the 0.6/0.4 blend with the Qwen base is a defensible interpolation recipe that downstream users do all the time. The Open-weights community has a mergekit culture, a TIES-Merging literature, a FrankenMoE scene, and a clear precedent for crediting the base models. None of that is what the Rio README did. The Rio README, in its first version, claimed "an original 397B model trained by IplanRIO." That claim is false on the math, false on the README's own now-updated self-correction, and false on the licensing lineage (the README never credited Nex or Qwen as base models in the metadata before the issue opened). The "open" did not save the "homegrown," because "open" was being used as a license, not as a description of the work.
This is the same trust gap the GLM-5.2 release opened the day before. Z.ai shipped GLM-5.2 with the founder's "Fully Open, Frontier Intelligence Belongs to Everyone" framing; the actual release is a hosted Coding Plan, the weights are MIT-licensed eventually, and the marketing is one letter ahead of the licensing. Nex-AGI's write-up is doing for the "homegrown LLM" category what the HN community did for the "fully open" category in the GLM thread: making the gap between the marketing and the artifact the story, not the framing.
What this means for you
- If you are a "sovereign LLM" or "homegrown" model maintainer — the Nex-AGI methodology is now public and reproducible. The two checks (self-identification probe after stripping the system prompt, plus tensor-level collinearity against the claimed base) take a
mergekitinstall and a multi-GPU node to run, and they are now the audit you should expect someone to run on your next release. If you would rather not be on the receiving end of that audit, do it yourself first and publish the result. The story you can defend is better than the story you are forced into. - If you are a procurement officer buying a 397B-class inference contract on a "homegrown" claim — the procurement question that survives this story is "do we own the deployment, the integration, and the right to redistribute, at the cost of integration?" That is a defensible procurement line. "We trained this" is not, on the math, defensible for any release the public can audit against a claimed base model. Ask for the training-data manifest, the compute receipt, and the model card provenance. If the answer is "it is open-weights, you can audit it yourself," the answer is no.
- If you maintain a
mergekit-style merge release — the technique is fine, the licensing lineage is fine, and the field has clear precedent for crediting base models in the model card. The Rio README in its original form did none of that, and the cost of the omission is the story. Put the base-model citations in the structuredbase_modelfield of the model card, not just the prose. The model card is the receipt. - If you are a developer reading the next "open-weights sovereign" release — the test is yours to run. The Nex write-up is a methodology, not a one-off. Apply it to whatever model you are considering, and the answer will be on the weights long before it is in the README.
What to do this week
# 1. Read the Nex-AGI issue end to end. The technical argument
# is the most useful public forensic work on an "open-weights
# original model" claim since the model's-license-isn't-what-
# you-think-it-is genre started. Both pieces of evidence
# are reproducible from the weights, and the methodology
# generalizes to any "homegrown" release.
# https://github.com/nex-agi/Nex-N2/issues/4
# 2. If you maintain a "sovereign" or "homegrown" LLM release,
# do the verification work yourself before someone does it
# for you. Two checks:
# a) Strip the shipped system prompt and probe the
# underlying weights for self-identification. A 0% hit
# on the model's own name is the smoking gun.
# b) For every tensor, fit the model as a linear blend of
# the claimed base models. A cos_fit above 0.9 across
# all layers is the same smoking gun in weight space.
# The two checks need a multi-GPU node and a mergekit install;
# not a single GPU afternoon, not a laptop. Plan accordingly.
# 3. If you are buying a 397B-class open-weights inference
# contract on a "homegrown" claim: ask for the training
# data manifest, the compute receipt, and the model card
# provenance. If the answer is "it is open-weights, you
# can audit it yourself," the answer is no.
# 4. If you are writing about this: the headline is the
# proof, not the politics. The weight-tensor cosine-
# similarity argument is the most useful forensic
# technique the open-weights community has developed
# in 2026. The procurement framing is the policy
# argument; the math is the policy argument's foundation.
The original take: the "open-weights original model" claim is now an auditable claim
The technical bar Nex-AGI just set is the part that matters most, and it is the part the procurement discourse has been missing. For two years the open-weights category has operated on a soft honor system: a model on Hugging Face labeled as "original" is taken at face value, because the alternative is too expensive to verify. Nex's write-up makes the verification cheap. A multi-GPU node and a mergekit install are enough to run the collinearity test against the next release. The cost of faking a "homegrown" 397B is now the cost of training 397B, not the cost of merging two existing models (the issue title rounds the measured 57.1/42.9 Nex/Qwen ratio to 0.6/0.4) and changing the system prompt.
The bigger story is the procurement category. The next dozen "sovereign LLM" releases will be tested against this method. Some will be original. Some will be merges with the lineage scrubbed. Some will be the same 0.571/0.429 trick in a different ratio. The buyers — the city governments, the federal agencies, the ministries of digital transformation — will be the ones paying for the audit if they do not pay for it now. The technology to do the audit exists. The method is published. The choice to apply it is the procurement decision that determines whether the "homegrown" label means anything in 2027.
Related reads from this blog
- GLM-5.2 Hits 1M Context and Lands in Claude Code for $18 — The "fully open" marketing-vs-licensing gap in the same week. Z.ai's "Fully Open" framing and Rio's "homegrown" framing are the same shape of claim, tested by different evidence.
- Xiaomi Hit 1000 t/s on a 1T Model. The Race Just Changed. — The 397B-class model story from the MoE-inference-engineering angle. The Rio merge is the same parameter count, the same
Qwen3.5-397B-A17Bfamily — the difference is who claims to have trained it. - Scott Chacon Spent $15K and 45B Tokens Rewriting Git in Rust — A different reading of the same "the artifact is more honest than the press release" problem. Chacon's repo passes the upstream Git test suite; Rio's weights pass the upstream Nex-tensor test. Both stories turn on the gap between the claim and the receipt.
Disclosure
Disclosure: Drafted with AI assistance. Primary sources: the Nex-AGI write-up at nex-agi/Nex-N2 issue #4 (opened 14 June 2026 15:11:50 UTC by
00INDEX, two technical comments at 15:21:08 UTC and 15:24:04 UTC, HN front page as item 48528371 — 260 points and 139 comments as of 15 June 2026 08:00 UTC+8). Hugging Face model cards:prefeitura-rio/Rio-3.5-Open-397B(112,371 downloads, 289 likes, last modified 14 June 2026 18:58:47 UTC) andnex-agi/Nex-N2-Pro(3,396 downloads, 264 likes, 397B parameters under Apache-2.0). The Rio README update was first linked from the issue thread by commentercapyvaraat comment 4702367873, 14 June 2026 16:32:43 UTC;yhcc(comment 4702407154, 16:48:56 UTC) and00INDEX(comment 4702462871, 17:11:05 UTC) both quoted the same link. The 0.571 ± 0.0016 mixing-weight figure, thecos_fit = 0.993value, the 79.2% / 0.0% self-identification rates, the "thousands to tens of thousands of standard deviations" framing, and the "watermark surfacing inside Rio" line are all Nex-AGI's. Conflict-of-interest note: Nex-AGI is the aggrieved party and the author of the technical analysis; the 0% "Rio" self-identification rate, the 79.2% "Nex" self-identification rate, the weight-tensorcos_fitresults, and the "watermark" framing are all Nex's measurements and rhetorical choices about their own model, which they have a positional interest in publishing. The math is reproducible; the position is not neutral. Limit on inference: the on-policy-distillation claim in the updated Rio README cannot be evaluated from the current public weights (the README describes a future reupload of the "final distilled model") and is taken at face value here only as the Rio team's stated position. The 55 👍 onwchar-t's "cofres públicos" comment is a GitHub-issue reaction count, not an HN upvote.
Sources
- Nex-AGI, issue #4 on nex-agi/Nex-N2, "Rio-3.5-Open-397B ≈ 0.6 x Nex-N2_pro + 0.4 x Qwen," 14 June 2026 (issue body and two technical comments by
00INDEX) - Nex-AGI, issue comment 4702171801, "Evidence 1. The model tells you itself," 14 June 2026 15:21:08 UTC (self-identification probe: 79.2% Nex, 73.3% Nex-AGI, 0.0% Rio across 120 prompts)
- Nex-AGI, issue comment 4702181710, "Evidence 2. The weights are a fixed Nex + Qwen blend," 14 June 2026 15:24:04 UTC (tensor-level collinearity:
α = 0.571 ± 0.0016,cos_fit = 0.993across 60 layers) - Hacker News, item 48528371, "Rio de Janeiro's 'homegrown' LLM appears to be a merge of an existing model," 260 points, 139 comments as of 15 June 2026 08:00 UTC+8
- Hugging Face,
prefeitura-rio/Rio-3.5-Open-397B, model card and README (updated 14 June 2026 18:58:47 UTC, last-modified timestamp via the model API) - Hugging Face,
nex-agi/Nex-N2-Pro, 397B parameters, Apache-2.0 license - Hugging Face,
Qwen/Qwen3.5-397B-A17B, the claimed base model - IplanRIO, prefeitura do Rio de Janeiro municipal portal, the city IT agency named in the Rio model's original README
- GitHub, nex-agi/Nex-N2 issue comment 4702367873, by
capyvara, first linking the Rio README update at 14 June 2026 16:32:43 UTC - GitHub, nex-agi/Nex-N2 issue comment 4702429185, by
wchar-t, "cofres públicos" comment with 55 👍 reactions, 14 June 2026 16:58:01 UTC
No comments:
Post a Comment