Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.5.0 instead.
Reason given by maintainers: fails to import on Python 3.13+; use 0.3.2

sysone

PyPI Python Tests Docs License: MIT

Fine-tune small transformers to answer typed questions about text, in one forward pass.

sysone trains "system one" decision models: fast models that read a piece of text, such as a support ticket, an email or a log, and answer questions about it:

type example question the answer
choice Which team should handle it? one label from a list, with a probability for each
score How severe is it, from none to critical? a level on an ordered scale
noul Is the customer asking for a refund? the probability of yes

You pick a base model (ModernBERT or Qwen3), call fit on labelled examples and predict on new text, as in scikit-learn. sysone handles tokenization, attention masks, layer freezing, LoRA and QLoRA adapters, the training loop, early stopping and calibration.

Documentation: sysone.readthedocs.io

Install

pip install sysone

Python 3.10+. Training runs on an NVIDIA GPU, Apple Silicon or the CPU; 4-bit QLoRA needs an NVIDIA GPU. See Installation.

Quickstart

from sysone import DecoderModel

questions = {
    "team":     {"type": "choice", "instructions": "Which team should handle it?",
                 "criteria": ["sales", "operations", "servicing"]},
    "severity": {"type": "score", "instructions": "How severe is it?",
                 "criteria": ["none", "minor", "major", "critical"]},
    "refund":   {"type": "noul", "instructions": "Is the customer asking for a refund?"},
}

rows = [
    {"state": "Hi, my order is stuck in the warehouse and our line is down.",
     "questions": questions,
     "expected": {"team": "operations", "severity": 3, "refund": False}},
    # ... more labelled rows; rows may mix different question sets
]

model = DecoderModel(tuning="head").fit(rows)   # head only: minutes, even on a laptop

model.predict("I'd like my money back for the broken unit.", questions)
# {"answers": {"team":     {"type": "choice", "choice": "servicing", "probabilities": {...}, ...},
#              "severity": {"type": "score", "score": 1.2, ...},
#              "refund":   {"type": "noul", "noul": 0.97, ...}},
#  "usage": {"input_tokens": 118, "output_tokens": 0}}

model.save("ticket-model")
model = DecoderModel.load("ticket-model")

Leave out tuning="head" to fine-tune the backbone as well (QLoRA for DecoderModel, full tuning for EncoderModel). To check a model against simple baselines on held-out rows:

from sysone import baselines, compare

results = baselines(test_rows, train=rows)     # random guess, average answer
results["trained"] = model.evaluate(test_rows)
compare(results)                               # accuracy per question type

Features

  • One model, many questions: questions are passed at prediction time, and training data can mix question sets.
  • Hard or soft labels: one right answer, or a probability per option from several raters.
  • Data in the form you have it: lists of dicts, .jsonl, .csv or .parquet files, DataFrames, or Hugging Face datasets.
  • Training modes: head only, LoRA, QLoRA or full fine-tuning, with counts that work on any model depth.
  • Calibrated probabilities: temperatures fitted on held-out data, so answer_confidence matches how often answers are right.
  • Long runs that survive: early stopping, exact resume after Ctrl-C, optional autosave, and an on-disk feature cache for fast head-only experiments.
  • Evaluation: accuracy, log loss, Brier score, calibration error, score error and AUC, per question type, category and question, next to baselines.

Examples

Notebooks on public datasets, each runnable on Google Colab, are listed in the examples gallery. Start with the quickstart notebook.

Status

sysone is in early development (0.3): the API may change between minor versions, and every change is listed in the changelog. Supported base models are ModernBERT and Qwen3; others can be added with one architecture class.

Contributing

Issues and pull requests are welcome. See Development for running the tests and building the docs, and the design document for how sysone works.

Acknowledgements

sysone builds on Laya, the tutorials and code of Neural AVB, ModernBERT, Qwen3, the Typed Decisions benchmark, the System One format of TypeSafe AI and many open-source libraries; see Acknowledgements.

License

MIT

Metadata

Release files for sysone 0.3.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 sysone 0.3.1
File Size Uploaded Provenance
sysone-0.3.1.tar.gz 127.3 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 199.4 kB

Release files / sysone-0.3.1.tar.gz

Download URL sysone-0.3.1.tar.gz
Size 127.3 kB
Tags Source
SHA-256 checksum
How to use checksums
725f716f4e6ebd3a2b539ee16c958a5daac6742a43dbb2311b8e25dd78d2d4b2
BLAKE2b-256 checksum
How to use checksums
2d277de68e2edec4b24ae892482a36fd1d7912972097206250594a831a6f1fb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / sysone-0.3.1-py3-none-any.whl

Download URL sysone-0.3.1-py3-none-any.whl
Size 72.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7ac4156f0435c96aadbef9a3a1eb4c28b7ebcfc1a75ccec861280210e87e1c9d
BLAKE2b-256 checksum
How to use checksums
d45277c86536732190857321f845df957b6fb2feb596ef85dedf9bb01057b156
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for sysone 0.3.1

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.

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files No provenance

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