Skip to main content

Logitly

Turn compatible causal LLMs into fast, bounded decision engines.

CI PyPI Python versions Typed MIT license

Logitly turns state, a question, and named choices into a probability distribution. It performs one prefill forward pass, reads the model's original next-token logits for fixed labels, and normalizes only the supplied choices.

pip install "logitly[transformers]"

Quick Start

from logitly import DecisionModel

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

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

No answer tokens are generated. Logitly does not fine-tune the model, replace its LM head, or run a completion loop.

Decision Primitives

model.noul(state, question)                  # yes/no probabilities
model.choice(state, question, choices)       # named choice distribution
model.score(state, question, levels)         # ordinal distribution + mean

model.decide_many(requests, batch_size=...) evaluates mixed decisions in a batch while preserving the same result schemas.

How It Works

state + question + choices
            ↓
      frozen causal LLM
            ↓
   original LM-head logits
            ↓
 select A/B/C/… label logits
            ↓
          softmax
            ↓
 named probability distribution

Logitly gathers the final-position vocabulary logit for each valid label and computes a softmax over only that restricted set. Every model profile verifies that its labels are distinct, single-token continuations at the exact native assistant-answer boundary before inference begins.

Models and Runtimes

Alias Pinned checkpoint Notes
lfm LiquidAI/LFM2.5-1.2B-Instruct Recommended starting point
qwen RedHatAI/Qwen3.8-27B-INT4 INT4; thinking disabled
glm mratsim/GLM-4-32B-0414.w4a16-gptq W4A16 GPTQ

Compatible Hugging Face model IDs and local checkpoints are also accepted. The Python package provides Transformers, vLLM, and llama.cpp runtimes behind the same API.

pip install "logitly[transformers,quantized]"
pip install "logitly[vllm]"
pip install "logitly[llama-cpp]"
pip install "logitly[browser]"

Transformers and vLLM should use separate environments because their pinned runtime dependencies differ. Python inference currently requires an NVIDIA CUDA GPU.

CLI

logitly validate lfm
logitly playground lfm --port 8000
logitly benchmark lfm --size 128 --output results/lfm

Documentation

Scope

confidence is the maximum probability in the restricted distribution, not an automatic correctness guarantee. Validate outcomes and calibration on data representative of your application.

License

Logitly is available under the MIT License.

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

Built distribution (wheel)

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

Total release size: 190.4 kB

Release files / logitly-0.2.1.tar.gz

Download URL logitly-0.2.1.tar.gz
Size 114.9 kB
Tags Source
SHA-256 checksum
How to use checksums
5e464deecfc3cd3674f60f90e34950d9513095a9316c1dab6a4a683b8705afc6
BLAKE2b-256 checksum
How to use checksums
9a9fd93993bd20137bd072beb19de6cfa549e55bb4e0ddee7faba1bbc182dd8b
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.1-py3-none-any.whl

Download URL logitly-0.2.1-py3-none-any.whl
Size 75.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dbe5401684328cccc64bb82de46b14bd965997d7852079eb09013f1fed6b4c20
BLAKE2b-256 checksum
How to use checksums
473bba6a06ed8b3b6b76b1982d3b8d41c2a2bd9ec5e02119b8ab2e829bdcb1b6
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

This release

0.2.1 This release

2 release files

0.2.0

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