krzonkalla commited on
Commit
f468367
·
verified ·
1 Parent(s): a4065df

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +158 -1
README.md CHANGED
@@ -7,4 +7,161 @@ base_model:
7
  - Qwen/Qwen3-235B-A22B-Thinking-2507
8
  pipeline_tag: text-generation
9
  library_name: transformers
10
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  - Qwen/Qwen3-235B-A22B-Thinking-2507
8
  pipeline_tag: text-generation
9
  library_name: transformers
10
+ ---
11
+
12
+ # Rio 3.0 Open
13
+
14
+ **Rio 3.0 Open** is a frontier-class reasoning model developed by [IplanRIO](https://iplanrio.rio.rj.gov.br/), the municipal IT company of Rio de Janeiro's city government. Built through distillation on top of Qwen3-235B-A22B-Thinking-2507 using reasoning traces from our to be announced Rio 3.0 model, Rio 3.0 Open achieves state-of-the-art results across mathematics, STEM, and code benchmarks — surpassing its base model by significant margins and competing with the world's best open and proprietary reasoning models.
15
+
16
+ Rio 3.0 Open features **SwiReasoning**, a training-free inference framework based on [Shi et al. (2025)](https://arxiv.org/abs/2510.05069) that dynamically switches between explicit chain-of-thought and latent-space reasoning, guided by entropy-based confidence signals. This enables both higher accuracy and dramatically improved token efficiency. This model was explicitly trained to maximize the efficiency gained via latent reasoning.
17
+
18
+ ## Key Features
19
+
20
+ - **235B total / 22B active parameters** (Mixture-of-Experts)
21
+ - **262,144 token context window**
22
+ - **SwiReasoning integration** — dynamic explicit/latent reasoning switching for Pareto-superior accuracy and efficiency
23
+ - **Distilled from Qwen3-235B-A22B-Thinking-2507** with advanced post-training optimization
24
+ - **Multilingual** — strong performance in Portuguese, English, Chinese, and dozens of other languages
25
+ - **MIT License** — fully open for commercial and research use
26
+
27
+ ## Benchmark Results
28
+
29
+ ### Mathematics & STEM
30
+
31
+ | Model | GPQA Diamond | LiveCodeBench | Composite Math* | AIME 2025 | AIME 2026 I | HMMT 2025 I | HMMT 2025 II | BRUMO 2025 | CMIMC 2025 | SMT 2025 |
32
+ |:---|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|:---:|
33
+ | **Rio 3.0 Open** | **85.10%** | **76.00%** | **91.78%** | **96.67%** | **93.33%** | **90.00%** | **90.00%** | **95.00%** | **86.88%** | **90.57%** |
34
+ | Rio 3.0 Open (w/o latent) | 83.20% | 76.00% | 89.84% | 95.00% | 89.17% | 85.83% | 90.83% | 92.50% | 85.00% | 90.57% |
35
+ | Qwen3-235B-A22B-2507 (base) | 81.10% | 74.10% | 86.83% | 91.67% | 87.50% | 83.33% | 89.17% | 87.50% | 83.75% | 84.91% |
36
+ | Kimi K2.5 Thinking | 87.60% | 85.00% | 93.12% | 95.83% | 93.33% | 93.33% | 89.17% | 98.33% | 91.25% | 90.57% |
37
+ | DeepSeek V3.2 | 82.40% | 83.30% | 90.93% | 94.17% | 91.67% | 92.50% | 90.00% | 96.67% | 83.75% | 87.74% |
38
+ | GLM 4.6 | 81.00% | 82.80% | 91.69% | 91.67% | 91.67% | 93.33% | 91.67% | 94.17% | 88.75% | 90.57% |
39
+ | GPT OSS 120B | 80.10% | 77.97% | 89.17% | 90.00% | 89.17% | 90.00% | 90.00% | 91.67% | 85.62% | 87.74% |
40
+ | GPT OSS 20B | 71.50% | 70.26% | 82.34% | 89.17% | 85.00% | 76.67% | 83.33% | 86.67% | 72.50% | 83.02% |
41
+
42
+ *Composite Math is the average across all other mathematics benchmarks in this table.
43
+
44
+ ### Rio Model Family Comparison
45
+
46
+ | Model | GPQA Diamond | LiveCodeBench | Composite Math* | AIME 2025 |
47
+ |:---|:---:|:---:|:---:|:---:|
48
+ | **Rio 3.0 Open** | **85.10%** | **76.00%** | **91.78%** | **96.67%** |
49
+ | Rio 2.5 Open | 77.20% | 69.60% | 87.53% | 93.33% |
50
+ | Rio 3.0 Open Mini | 71.90% | 63.50% | 78.11% | 89.17% |
51
+
52
+ ### Gains Over Base Model (Qwen3-235B-A22B-2507)
53
+
54
+ | Benchmark | Base Model | Rio 3.0 Open | Δ |
55
+ |:---|:---:|:---:|:---:|
56
+ | GPQA Diamond | 81.10% | 85.10% | **+4.00%** |
57
+ | LiveCodeBench | 74.10% | 76.00% | **+1.90%** |
58
+ | Composite Math | 86.83% | 91.78% | **+4.95%** |
59
+ | AIME 2025 | 91.67% | 96.67% | **+5.00%** |
60
+ | AIME 2026 I | 87.50% | 93.33% | **+5.83%** |
61
+ | HMMT 2025 I | 83.33% | 90.00% | **+6.67%** |
62
+ | BRUMO 2025 | 87.50% | 95.00% | **+7.50%** |
63
+ | CMIMC 2025 | 83.75% | 86.88% | **+3.13%** |
64
+ | SMT 2025 | 84.91% | 90.57% | **+5.66%** |
65
+
66
+ ## SwiReasoning: Latent/Explicit Reasoning
67
+
68
+ Rio 3.0 Open integrates [SwiReasoning](https://arxiv.org/abs/2510.05069) (Shi et al., 2025), a training-free inference framework that dynamically alternates between two reasoning modes:
69
+
70
+ - **Explicit reasoning** — standard chain-of-thought in natural language, where the model commits tokens to a single reasoning path
71
+ - **Latent reasoning** — continuous reasoning in hidden space, where the model explores multiple implicit paths simultaneously without emitting tokens
72
+
73
+ The switching is governed by **block-wise confidence** estimated from entropy trends in the next-token distribution. When confidence is low (entropy trending upward), the model enters latent mode to explore alternatives. When confidence recovers, it switches back to explicit mode to commit to a solution.
74
+
75
+ This approach achieves a **Pareto-superior** trade-off: higher accuracy at unlimited budgets *and* dramatically better token efficiency under constrained budgets.
76
+
77
+ The benchmark table above includes **(w/o latent)** rows showing performance with standard explicit-only reasoning, demonstrating the consistent gains from SwiReasoning across all benchmarks.
78
+
79
+ ## How to Use
80
+
81
+ ```python
82
+ from transformers import AutoModelForCausalLM, AutoTokenizer
83
+
84
+ model_name = "prefeitura-rio/Rio-3.0-Open"
85
+
86
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
87
+ model = AutoModelForCausalLM.from_pretrained(
88
+ model_name,
89
+ torch_dtype="auto",
90
+ device_map="auto"
91
+ )
92
+
93
+ prompt = "Write a poem about Rio de Janeiro."
94
+
95
+ messages = [
96
+ {"role": "user", "content": prompt}
97
+ ]
98
+
99
+ text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
100
+ inputs = tokenizer([text], return_tensors="pt").to(model.device)
101
+
102
+ outputs = model.generate(
103
+ **inputs,
104
+ max_new_tokens=81920,
105
+ temperature=0.6,
106
+ top_p=0.95,
107
+ )
108
+
109
+ response = tokenizer.decode(outputs[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True)
110
+ print(response)
111
+ ```
112
+
113
+ ### Using with vLLM
114
+
115
+ ```bash
116
+ vllm serve prefeitura-rio/Rio-3.0-Open \
117
+ --tensor-parallel-size 4 \
118
+ --max-model-len 262144 \
119
+ --trust-remote-code
120
+ ```
121
+
122
+ ### Using with SGLang
123
+
124
+ ```bash
125
+ python -m sglang.launch_server \
126
+ --model-path prefeitura-rio/Rio-3.0-Open \
127
+ --tp 4 \
128
+ --context-length 262144 \
129
+ --trust-remote-code
130
+ ```
131
+
132
+ ## Model Details
133
+
134
+ | | |
135
+ |:---|:---|
136
+ | **Developer** | IplanRIO — Empresa Municipal de Informática e Planejamento S.A. |
137
+ | **Base Model** | Qwen3-235B-A22B-Thinking-2507 |
138
+ | **Architecture** | Mixture-of-Experts (MoE) Transformer |
139
+ | **Total Parameters** | ~235B |
140
+ | **Active Parameters** | ~22B |
141
+ | **Context Length** | 262,144 tokens |
142
+ | **Default Max Output Length** | 81,920 tokens |
143
+ | **Training Method** | Distillation + post-training optimization |
144
+ | **Inference Enhancement** | SwiReasoning (latent/explicit switching) |
145
+ | **License** | MIT |
146
+ | **Languages** | Multilingual (en, pt, zh, ja, ko, fr, de, es, ar, and more) |
147
+
148
+ ## Citation
149
+
150
+ If you use SwiReasoning, please also cite:
151
+
152
+ ```bibtex
153
+ @misc{shi2025swireasoning,
154
+ title={SwiReasoning: Switch-Thinking in Latent and Explicit for Pareto-Superior Reasoning LLMs},
155
+ author={Dachuan Shi et al.},
156
+ year={2025},
157
+ eprint={2510.05069},
158
+ archivePrefix={arXiv},
159
+ primaryClass={cs.CL}
160
+ }
161
+ ```
162
+
163
+ ## Acknowledgments
164
+
165
+ Rio 3.0 Open is built upon the exceptional work of the [Qwen Team](https://github.com/QwenLM) and their Qwen3 model family. We also acknowledge the authors of [SwiReasoning](https://github.com/sdc17/SwiReasoning) for their innovative inference framework.
166
+
167
+ Developed in Rio de Janeiro 🇧🇷 by [IplanRIO](https://iplanrio.rio.rj.gov.br/).