Lumma-Fev-4b-v2
Lumma-Fev-4B-v2 is a decision model. You give it a state (text) and typed questions; it returns a probability for every option in one forward pass. It never generates text, so there is nothing to parse. It works in English, Hindi, Tamil and Kannada (and Hinglish).
We used DecisionFormer for training our model.
What changed from Lumma-Fev-9B:
- Bidirectional attention. The full-attention layers read the whole prompt in both directions, like an encoder; the Gated DeltaNet (linear-attention) layers stay causal.
- About 300K training samples instead of about 100K:
Results (accuracy, same rows for every model)
Calibration (average over the eight benchmarks, lower is better):
| Lumma-Fev-4B-v2 | Lumma-Fev-27B-v2 | Jev | |
|---|---|---|---|
| Log loss | 0.401 | 0.307 | 1.315 |
| ECE | 0.045 | 0.024 | 0.088 |
| Brier | 0.237 | 0.178 | 0.291 |
Use it
Use the lumma-fev package, version 0.3 or later: this checkpoint needs
bidirectional attention, which older versions do not apply (they refuse to load it). It needs about 10 GB of GPU memory
in bf16.
pip install "lumma-fev>=0.3"
import lumma_fev
model = lumma_fev.load("FrontiersMind/Lumma-fev-4B-v2")
answers = model.decide(
state="My integration keeps failing. Please help.",
questions={
"team": {
"type": "choice",
"instructions": "Which team should handle this request?",
"criteria": {
"billing": "Charges and refunds",
"support": "Technical integration errors",
"sales": "Questions about buying a product",
},
},
"urgent": {"type": "noul", "instructions": "Does the customer need a reply today?"},
},
)
print(answers["team"])
# {"type": "choice", "choice": "support", "confidence": ..., "probabilities": {"billing": ..., "support": ..., "sales": ...}}
state can be text, a JSON object or an array. Each question reads the state and its own options only, so one answer
never changes another. Images: pass images=[...] (paths, PIL images or data: URLs) after
pip install "lumma-fev[images]". A question plus the state must fit in 8,192 tokens. The model was trained on noul
and choice questions; score questions are accepted but untested.
To serve it behind the TypeSafe-compatible POST /v1/systemone API:
pip install "lumma-fev[serve]"
lumma-fev-serve --model FrontiersMind/Lumma-fev-4b-v2 --host 0.0.0.0 --port 8000
If you load the weights yourself: decision_config.json has "attention_mode": "noncausal_full_attention". Set
config.is_causal = False on the text config and is_causal = False on every text attention module after loading;
setting only the config makes single unpadded requests run causally.
For speed, also install the flash-linear-attention and causal-conv1d kernels; without them transformers uses
slower PyTorch code.
- Downloads last month
- 96