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: FrontiersMind/lumma-fev-0.1b (default) and other FrontiersMind/lumma-fev-* repos.

Install

pip install lumma-fev              # local inference and the client
pip install "lumma-fev[serve]"     # plus the API server

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) picks cuda, then mps, then cpu, and uses bf16 on accelerators and fp32 on cpu. The same model loads with transformers alone: AutoModel.from_pretrained("FrontiersMind/lumma-fev-0.1b", trust_remote_code=True).

Serve an API

lumma-fev-serve --model FrontiersMind/lumma-fev-0.1b --host 0.0.0.0 --port 8000
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/fp32
--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.

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 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. Long states are truncated to the model's context (see the model card).

License

Apache-2.0. See LICENSE and NOTICE.

Release files for lumma-fev 0.1.1

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.1.1
File Size Uploaded
lumma_fev-0.1.1.tar.gz 10.6 kB Details

Built distribution (wheel)

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

Total release size: 23.7 kB

Release files / lumma_fev-0.1.1.tar.gz

Download URL lumma_fev-0.1.1.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
95d4caf65d56473c95f758bf9b8c062eb4436ef4aa2910c607bf013738a8c104
BLAKE2b-256 checksum
How to use checksums
510ebdde7483d19c1be15fb5b4191023f6d25d06ea0de7a95a1c0fbc339f5275
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"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.1.1-py3-none-any.whl

Download URL lumma_fev-0.1.1-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ad67dca1ebb70c76fb417abb5909136089fdba17d53832a0df0b5b092906e821
BLAKE2b-256 checksum
How to use checksums
551b4385e3a2ba091229fe145cfad161203ea092f534832476449af22b097abb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.17 {"installer":{"name":"uv","version":"0.12.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

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