Skip to main content

lumma-fev

Run FrontiersMind Lumma-Fev decision models: give a document (the state) and typed questions, and get a probability distribution for every question in one forward pass. No text is generated, so there is nothing to parse.

  • lumma_fev.load(): run a model locally (cuda, mps or cpu).
  • lumma-fev-serve: a TypeSafe-compatible HTTP API (POST /v1/systemone), so existing TypeSafe clients work by changing their base URL.
  • lumma_fev.Client: a small client for that API.

Models (pass the Hub id or the short size to load() and --model):

Size Hub id Notes
0.1b FrontiersMind/Lumma-fev-0.1b default; runs on a CPU
0.1b-v2 FrontiersMind/Lumma-fev-0.1B-v2 Nandi-Mini-150M backbone, text-only, 2,048-token context; needs lumma-fev >= 0.4
0.6b FrontiersMind/Lumma-fev-0.6b
4b FrontiersMind/Lumma-fev-4b
4b-v2 FrontiersMind/Lumma-fev-4b-v2 bidirectional attention, needs lumma-fev >= 0.3
9b FrontiersMind/Lumma-fev-9b
27b FrontiersMind/Lumma-fev-27B about 55 GB of GPU memory in bf16; also accepts images
27b-v2 FrontiersMind/Lumma-fev-27B-v2 same as 27b; bidirectional attention, needs lumma-fev >= 0.3

Install

pip install lumma-fev              # local inference and the client
pip install "lumma-fev[serve]"     # plus the API server
pip install "lumma-fev[large]"     # plus accelerate, for device_map="auto" (27B on several GPUs)
pip install "lumma-fev[images]"    # plus Pillow and torchvision, for image states (27B)

Run locally

import lumma_fev

model = lumma_fev.load()           # FrontiersMind/lumma-fev-0.1b; load("FrontiersMind/<repo>", revision=...) for others

answers = model.decide(
    state="I was charged twice for my March invoice. Please refund one of them.",
    questions={
        "billing": {"type": "noul", "instructions": "Is this about billing?"},
        "team": {"type": "choice", "instructions": "Which team should handle this?",
                 "criteria": {"billing": "Payments and refunds", "shipping": "Delivery problems", "technical": "Bugs and outages"}},
        "urgency": {"type": "score", "instructions": "How urgent is this?",
                    "criteria": ["can wait", "this week", "today"]},
    },
)
# {"billing": {"noul": 0.97}, "team": {"choice": "billing", "confidence": ..., "probabilities": {...}},
#  "urgency": {"score": ..., "confidence": ..., "legend": [...], "probabilities": {...}}}

load(model, revision=None, device=None, dtype=None, device_map=None) picks cuda, then mps, then cpu, and uses bf16 on accelerators and fp32 on cpu (27B always defaults to bf16, the dtype it is stored in). The sizes up to 9B also load with transformers alone: AutoModel.from_pretrained("FrontiersMind/lumma-fev-0.1b", trust_remote_code=True).

Lumma-fev-27B

model = lumma_fev.load("27b")                        # one GPU with about 55 GB free (an 80 GB card)
model = lumma_fev.load("27b", device_map="auto")     # or spread over several GPUs (pip install "lumma-fev[large]")

model.decide("My integration keeps failing. Please help.",
             {"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"}}})
# {"team": {"type": "choice", "choice": "support", "confidence": 0.99..., "probabilities": {...}}}

model.decide("What is shown?", {"red": {"type": "noul", "instructions": "Is the product red?"}},
             images=["photo.png"])                   # paths, PIL images or data: URLs (pip install "lumma-fev[images]")

27B uses a different checkpoint format from the smaller sizes (a Qwen3.5 backbone plus a readout over answer codes); load() detects it from the repo's decision_config.json, and the call and the answers are the same. Its prompt follows the AutoJev reference code bundled in the repo, so probabilities match it. A question plus the state must fit in 8,192 tokens (nothing is truncated: longer input raises ValueError), and score questions need at least two levels. 27B was trained on noul and choice questions only, so check score answers on your own data. For speed, install the optional flash-linear-attention and causal-conv1d kernels; without them transformers falls back to slower PyTorch code.

Lumma-fev-0.1B-v2 (0.1b-v2, lumma-fev >= 0.4) uses the same readout format on the text-only Nandi-Mini-150M backbone: a plain-text prompt (no chat template, no images), causal attention, and a 2,048-token limit per question plus state. Its backbone ships custom modeling code, which load() runs with trust_remote_code=True.

Serve an API

lumma-fev-serve --model FrontiersMind/lumma-fev-0.1b --host 0.0.0.0 --port 8000
lumma-fev-serve --model 27b --host 0.0.0.0 --port 8000                 # add --device-map auto for several GPUs
Flag Default
--model FrontiersMind/lumma-fev-0.1b Hub id or local folder
--revision latest branch, tag or commit
--name repo name model name reported by the API
--host, --port 127.0.0.1, 8000 use 0.0.0.0 to accept other machines
--device, --dtype auto cuda/mps/cpu, bf16/fp16/fp32
--device-map none auto to spread a large model over several GPUs (needs lumma-fev[large])
--api-key $LUMMA_FEV_API_KEY when set, requests need Authorization: Bearer <key>
--cors off allow browser pages on any origin

Endpoints: POST /v1/systemone, GET /v1/models, GET /health. Requests run one at a time. With 27B, a request may also carry "images": [...], up to four base64 PNG, JPEG or WebP data: URLs.

curl -s localhost:8000/v1/systemone -H 'content-type: application/json' -d '{
  "state": "I was charged twice. Please fix this ASAP.",
  "questions": {"billing": {"type": "noul", "instructions": "Is this ticket about billing?"}}
}'
# {"model": "lumma-fev-latest", "answers": {"billing": {"noul": 0.98}}, "usage": {"input_tokens": 31, "output_tokens": 9}}

Call it from Python

from lumma_fev import Client

with Client("http://127.0.0.1:8000", api_key=None) as client:
    print(client.decide("I was charged twice.", {"billing": {"type": "noul", "instructions": "Is this about billing?"}}))
    print(client.models())

client.system_one(...) returns the full response (model, answers, usage); errors raise lumma_fev.LummaFevError with the HTTP status and detail.

The TypeSafe SDK works against the same server:

from typesafe_sdk import Noul, TypeSafeClient

with TypeSafeClient(api_key="local", base_url="http://127.0.0.1:8000") as ts:
    result = ts.system_one(state="I was charged twice.", questions={"billing": Noul(instructions="Is this about billing?")})
    print(result.nouls["billing"].noul)

The SDK always sends an API key; any value works when the server has no --api-key.

Questions and answers

Type Criteria Answer
noul optional {"true": ..., "false": ...} noul: probability of yes
choice {name: description or null}, 1–255 options choice, confidence, probabilities by name
score ordered list of 1–255 levels (2–255 for 27B) score (expected level), confidence, legend, probabilities by level

state and instructions can be text or any JSON value. Each question reads the state and its own instructions and options only, so questions never influence each other. Up to 9B, long states are truncated to the model's context (see the model card); 27B rejects input over 8,192 tokens instead.

License

Apache-2.0. See LICENSE and NOTICE.

Metadata

Release files for lumma-fev 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lumma-fev 0.4.0
File Size Uploaded Provenance Actions
lumma_fev-0.4.0.tar.gz 18.1 kB Without provenance Details for lumma_fev-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lumma-fev 0.4.0
File Interpreter ABI Platform Actions
lumma_fev-0.4.0-py3-none-any.whl Python 3 none any Details for lumma_fev-0.4.0-py3-none-any.whl

Total release size: 39.8 kB

Release files / lumma_fev-0.4.0.tar.gz

Download URL lumma_fev-0.4.0.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b8f2314a02dc31703cafcbe8b88ace1b70f6585dd3370cecf65eadece92ee73c
BLAKE2b-256 checksum
How to use checksums
1398474801acc31b12559609768f4d50461dc36e293bc768bf5447efcb83cc07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / lumma_fev-0.4.0-py3-none-any.whl

Download URL lumma_fev-0.4.0-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65fdd882e9cd3b0cd373c0a35b1fa6bfa2e76a2c1b8abc65d2c5ef39f43751b7
BLAKE2b-256 checksum
How to use checksums
23183692becfc83e72d5de0f8d772023e4015dd9a548aec20146397e732d3729
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for lumma-fev 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page