SanSi is the model of the paper [SanSi: A Looped Typed Decision Model for System 1.5 Thinking](https://arxiv.org/abs/2610.07730).
It is a typed decision model: given a text (the state), a question and 2 to 26 declared options, it returns a
probability for each option, without generating text. It is built on
[Ouro-1.4B](https://huggingface.co/ByteDance/Ouro-1.4B), a language model pre-trained to loop: one stack of 24 shared
layers is applied T = 8 times. The option probabilities are read after every loop, so one forward pass gives the
decision at every budget from one loop to eight.
This repository holds what was trained: LoRA adapters of rank 64 and one small readout per loop, 60.8M parameters.
The backbone stays frozen; it is downloaded from `ByteDance/Ouro-1.4B` at the revision the model was trained on.
| Model | Backbone | Trained parameters | Accuracy after loop 8 |
|---|---|---:|---:|
| **SanSi** (this model) | Ouro-1.4B | 60.8M | 72.0 |
| [SanSi-2.6B](https://huggingface.co/minnesotanlp/SanSi-2.6B) | Ouro-2.6B | 121.4M | 75.8 |
Accuracy (%) on the 10,027 test items of the paper, mean of three training seeds.
## How to use
The loading code is in the [GitHub repository](https://github.com/minnesotanlp/Sansi). Use a GPU; the backbone runs
in bfloat16.
```bash
git clone https://github.com/minnesotanlp/Sansi
cd Sansi
pip install -r requirements.txt
```
```python
from sansi.hub import load, decide
model, tok = load("minnesotanlp/SanSi") # this adapter, and Ouro-1.4B at its pinned revision
probs = decide(
model, tok,
state="Mia is taller than Sam. Sam is taller than Lee.",
question="Who is the shortest?",
options=["Mia", "Sam", "Lee"],
)
print(probs[0]) # after loop 1, at an eighth of the computation: about [0.02, 0.07, 0.91]
print(probs[-1]) # after loop 8: about [0.00, 0.00, 1.00]
```
`decide` returns one list per loop, each with one probability per option in the order given. It writes the prompt
the model was trained on,
```
Question:
Options: (A)