Skip to main content

Logitly

Logitly turns a compatible LLM into a decision model. Give it a state, a question, and named choices; it returns a probability distribution using one forward pass and the model's existing LM-head logits. The model weights stay unchanged, and no answer tokens are generated.

Install

Python 3.11–3.13 and an NVIDIA CUDA GPU are required for inference.

python -m pip install "logitly[transformers]"

For supported quantized checkpoints, also install logitly[quantized]. The vllm and llama-cpp extras are available for their respective GPU runtimes; use separate environments when their dependency versions differ.

Example

from logitly import DecisionModel

with DecisionModel.from_pretrained("lfm") as model:
    result = model.choice(
        state={"amount": 9700, "device": "unknown"},
        question="What action should we take?",
        choices={
            "close": "Close as benign",
            "review": "Request analyst review",
            "block": "Block immediately",
        },
    )

print(result.choice)
print(result.probabilities)

The lfm, glm, and qwen aliases select pinned checkpoints. Compatible Hugging Face model IDs and local checkpoints are also accepted. model.noul(state, question) returns yes/no probabilities; model.score(state, question, levels) returns an ordered distribution and expected score; model.decide_many(requests, batch_size=...) processes batches.

Logitly selects single-token label logits after the assistant answer boundary and normalizes only those logits. It does not use generate(), change model weights, or add a new prediction head. Returned confidence is the maximum choice probability and is not a calibrated correctness guarantee.

The CLI provides logitly validate, logitly playground, and logitly benchmark.

Release files for logitly 0.2.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 logitly 0.2.0
File Size Uploaded
logitly-0.2.0.tar.gz 113.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for logitly 0.2.0
File Interpreter ABI Platform
logitly-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 188.2 kB

Release files / logitly-0.2.0.tar.gz

Download URL logitly-0.2.0.tar.gz
Size 113.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e4e1183b02a9eaa3d495c8482dfac43157eb29133e5b4529aa96a4bd7f2c0fc7
BLAKE2b-256 checksum
How to use checksums
2077a9f98237b3850b94ea62a0a18a5309391ff954c942c81f9f1614592146b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release files / logitly-0.2.0-py3-none-any.whl

Download URL logitly-0.2.0-py3-none-any.whl
Size 74.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
742449ad15b7de8db19926a281adc27c6c556b247d150503dfc857a9c3b5e9ac
BLAKE2b-256 checksum
How to use checksums
646d138856acf6a27d5977bfea703a40e28bc03eed2a8b64c6a712444fb4cea7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Release history Release notifications | RSS feed

0.2.2

2 release files

0.2.1

2 release files

This release

0.2.0 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