Jev-for-MoR-and-MoE
Research code using the Canopy-Jev decision model to route tokens to experts and extra recursion steps under explicit budgets.
Overview
Jev for MoR and MoE is a research implementation by Ruoxi Qiu (MIT licence) that lets a router see the problem, the available computations and what has already been computed. It uses Canopy-Jev, a 27B numerical decision model from a companion repository, to decide which tokens receive which experts and how many additional recursive steps (MoR meaning Mixture of Recursions here), under explicit budgets and expert capacities.
Four policies are implemented: a joint plan router choosing one expert and depth action per token via constrained MAP over Choice preferences; a utility router using Score gain bins under integer costs; an adaptive recursion router that reads an execution receipt and decides to stop or pick another expert; and a plan slate router choosing among up to ten complete feasible plans. The README stresses that Choice probabilities are treated as preferences, Score values remain heuristics until calibrated, and CPU replay examples use hand-authored probabilities only to exercise the code. Parts of the README are in Chinese.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which expert and how many extra recursion steps should this token get? | — |
| Score | What is the expected gain of each candidate action? | — |
| Choice | Which complete feasible plan should run? | — |
How it works
- Describe tokens, available experts and budgets as state
- Query Canopy-Jev with Choice or Score questions
- Project preferences onto the feasible set under capacity limits
- Execute and optionally re-query after reading a receipt
Strengths
- Explicit budget and capacity handling
- Several routing hypotheses in one codebase
- Honest labelling of hand-authored test probabilities
Caveats
- Research code; no reported results in the excerpt
- Requires the 27B Canopy model for real runs
At a glance
- Type
- Project
- Status
- research
- Language
- Python
- Runtime
- Research library
- Has code
- yes
- License
- MIT
Use cases and integrations
How curated lists describe it
Jev for MoR and MoE: context-complete Canopy-Jev computation plans by Ruoxi Qiu.
wh000wh000/awesome-jev-live
Frequently asked questions
What decision is made?
Which tokens get which experts and how many extra recursive steps, under budgets.
Does it use TypeSafe's Jev?
It uses Canopy-Jev, an open 27B decision model with a Jev-style API.
Are there results?
The excerpt describes algorithms and hypotheses, not measured outcomes.
Related projects
- TypeAR★ 946
TypeLLM: Jev-inspired type-safe decoding for existing autoregressive LLMs on SGLang, with schema-guaranteed typed outputs.
ProjectbetaPython llama.cpp-based C++ server that turns any LLM into a System One decision model, reading answers from next-token logits.
ProjectbetaC++MLX library that turns an existing local model into a decision engine by reading candidate logits, with no fine-tuning, on Apple Silicon.
ProjectprototypePythonPython library that turns an open LLM into a Jev-style classifier via constrained single-token choice indexes in one forward pass.
ProjectprototypePythonOpen Jev-style decision model built on Gemma 3 270M with a scoring head, scoring all options in one forward pass on CPU.
ProjectresearchPythonOfficial code for the FastJEV paper: training-free reduction of redundant candidate computation in multimodal JEV-style models.
ProjectresearchPython