Turn compatible causal LLMs into fast, bounded decision engines.
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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| logitly-0.2.2.tar.gz | 114.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| logitly-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 190.4 kB
Release files / logitly-0.2.2.tar.gz
| Download URL | logitly-0.2.2.tar.gz |
|---|---|
| Size | 114.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
242a60a44c94c55d0d4604411f7944a94bb5a1a711426152122425c47bb577c0
|
|
BLAKE2b-256 checksum How to use checksums |
9f130e1c477402017f856894bd8a6f7792b74a2b0e1c6914db73031d21867bf2
|
| 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.2-py3-none-any.whl
| Download URL | logitly-0.2.2-py3-none-any.whl |
|---|---|
| Size | 75.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a69024aca98ff2184a0c709a3ff19f6bc30382a33119f5dce7f69ce4b5e7916e
|
|
BLAKE2b-256 checksum How to use checksums |
f5dcb9717fd871ad520601a110b38a7cd88b9fc528bbae5a6f4e02d15c1a5727
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|