Spaces:
Running
Running
File size: 1,016 Bytes
582ea12 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# MiCRo Expert Routing Visualizer (Gradio)
This demo visualizes how modular language models allocate computation across specialized experts—Language, Logic, Social, and World—when processing a given prompt.
Each expert corresponds to a cognitive domain inspired by human brain networks. Enter a prompt to see how tokens are dynamically routed across modules, revealing the model’s internal reasoning structure.
## How it works
- Choose a model (dropdown) or type a custom model id.
- Enter a *User prompt*. Optionally add an *Assistant prompt*; if provided, the app concatenates them as:
```
User: <user text>
Assistant: <assistant text>
```
- When the prompt fails, the demo falls back to "mock data", which generates deterministic, pseudo-random percentages from the prompt.
### Backend contract
`get_expert_routing(model_id: str, prompt: str)` must return 4 values (percentages) for the experts in this fixed order:
`["Language", "Logic", "Social", "World"]`
or a dict with those exact keys.
|