Instructions to use prefeitura-rio/Rio-3.5-Open-397B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prefeitura-rio/Rio-3.5-Open-397B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prefeitura-rio/Rio-3.5-Open-397B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("prefeitura-rio/Rio-3.5-Open-397B") model = AutoModelForMultimodalLM.from_pretrained("prefeitura-rio/Rio-3.5-Open-397B", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use prefeitura-rio/Rio-3.5-Open-397B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prefeitura-rio/Rio-3.5-Open-397B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prefeitura-rio/Rio-3.5-Open-397B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/prefeitura-rio/Rio-3.5-Open-397B
- SGLang
How to use prefeitura-rio/Rio-3.5-Open-397B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "prefeitura-rio/Rio-3.5-Open-397B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prefeitura-rio/Rio-3.5-Open-397B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "prefeitura-rio/Rio-3.5-Open-397B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prefeitura-rio/Rio-3.5-Open-397B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use prefeitura-rio/Rio-3.5-Open-397B with Docker Model Runner:
docker model run hf.co/prefeitura-rio/Rio-3.5-Open-397B
Rio-3.5-Open-397B ≈ 0.6 x Nex-N2_pro + 0.4 x Qwen
There are allegations that this model is a weighted-average of two other models (namely Nex-N2 Pro and Qwen3.5 397B), do you have any comment?
https://x.com/NexEcosystem/status/2066213803877175636
1h ago after being caught, they changed the README.md
https://huggingface.co/prefeitura-rio/Rio-3.5-Open-397B/commit/a778c1ec4e21180ee55c3ea016a348e549e75f09
hmm entao temos GPUs pra brincar?
hmm entao temos GPUs pra brincar?
Algumas DGX B200, pra carregar modelos e alterar template .jinja, aparentemente.
Os dois modelos são Apache 2.0, pega nada não.
Valeu Dudu Paes e IplanRio, mostre aos brasileiros e ao mundo a força dos modelos open weights!
Os dois modelos são Apache 2.0, pega nada não.
Valeu Dudu Paes e IplanRio, mostre aos brasileiros e ao mundo a força dos modelos open weights!
Recomendo ler https://www.apache.org/licenses/LICENSE-2.0, principalmente o que diz respeito à redistribuição.
Os dois modelos são Apache 2.0, pega nada não.
Valeu Dudu Paes e IplanRio, mostre aos brasileiros e ao mundo a força dos modelos open weights!
Yeah, if they had disclosed that in advance, there probably wouldn't have been a problem.
But the issue is that they promoted it from the beginning as if it were a post-training model they had developed themselves.
If they had clearly stated that, there’s no way it would have become as controversial as it is now.
the funniest part of the “but apache 2.0!!” argument is that apache 2.0 is exactly why this is weird lol
nobody is saying open weights are forbidden. that’s literally not the point. the point is: apache 2.0 does not mean “take it, rename it, imply you trained it, and fix attribution later when the weights people catch the genealogy.” it requires preserving license/copyright/notice information on redistribution. so yes, permissive license, but not provenance amnesia.
if you merge Nex + Qwen, say “we merged Nex + Qwen.” if you distribute a derivative, carry the license and notices properly. don’t package it as some big “we developed / trained / post-trained this frontier model” municipal tech miracle, wait for the weights people to reverse-engineer the family tree, then quietly patch the README after the public autopsy starts.
permissive license ≠ permission to misrepresent origin, authorship, training effort, institutional responsibility, or public-sector governance. especially when the namespace is literally prefeitura-rio, not some random hobby account.
if this had been “hey, we made a useful Rio-branded merge of Nex + Qwen, here are the credits, here are the licenses, here is what we actually added, here is what public infrastructure/resources were or weren’t used”, probably nobody would care beyond normal model nerd drama.
but “oops wrong upload, actually it was a base merged version, final distilled model later bro trust me” after the README gets corrected under pressure is exactly why people are asking questions. open weights are great. open weights are also why the receipts exist.
A maldição do Brasil é o seu jeitinho brasilieiro de fazer as coisas.
Things being stolen and Rio de Janeiro sound very familiar together lol 😁
I AM Brazilian, and I will leave a word for reflection: (ETHICS). Ethics in Science is the set of principles and rules that govern honest, responsible, and transparent conduct in the production, validation, and dissemination of scientific knowledge.
Main pillars (the living-off-the-land of good science):
Integrity and honesty: Do not falsify data, do not plagiarize, and do not hide bad results.
Transparency: Show all methods, full comparisons (including merge vs. FT vs. base), costs, and limitations. Hiding the use of a merge to inflate performance is pure data manipulation.
Social responsibility: When public money is involved, the researcher has a duty to be accountable. Spending taxpayer funds to pull a bait-and-switch violates the ethical code.
Reproducibility and verification: Results must be testable by the community. Hiding a merge is the exact opposite — a dark pattern used by those who want fake metrics for elections or resumes.
Avoid conflict of interest: Especially during election season, when things "sprouting from the ground" turn into state marketing disguised as technological advancement. ###HOPING IT'S JUST A MISUNDERSTANDING, BUT IF NOT, I APOLOGIZE FOR THIS NONSENSE!!
Brazil being Brazil... let's move on and ignore this model.
"We tried to recover the final model, but it was not possible."
"We tried to recover the final model, but it was not possible."
“we tried to recover the final model, but it was not possible” brother this is a public-sector AI project, not a save file from a pirated copy of Pokémon. where are the hashes, checkpoints, logs, model registry, release approvals, technical report, license review, anything
I have TB drives which are 70% checkpoints and they have nothing... strange. Werent a bunch of checkpoints deleted a few days ago? They are, at best, grossly incompetent 😒



