Skip to main content

TurboJev

Typed decisions from local open-weight models

Turn text, structured state, images, audio, or video into a typed decision with auditable probabilities.

Website and docs · Samples · Documentation · Multimodal input · Order robustness

License Rust Local inference GitHub Actions

state + typed questions → candidate scores → probabilities → typed answers

TurboJev is a Rust-first decision layer for applications that need a model to choose, route, assess, or approve. It scores the allowed candidates directly and returns structured choice, noul, and score answers. The optimized path does not ask a model to generate JSON and does not rely on parsing a natural-language reply.

It runs locally with open-weight models, keeps inference and decision semantics separate, and exposes the same contract through Rust, Node/TypeScript, Python, C, .NET, and browser/WASM hosts.

Get a real model running

The fastest path is one of the runnable samples. It builds the native libraries, downloads a small verified GGUF model, then runs the same local model through four language bindings.

py samples/build.py native --download-model
py samples/run.py ts
py samples/run.py python
py samples/run.py csharp
py samples/run.py rust

On Linux or macOS, use python in place of py. See the complete samples guide, including architecture selection and the browser-only JavaScript example.

Ask a typed question

from turbojev import TurboJev

with TurboJev.load("./model.gguf", n_gpu_layers=0) as jev:
    result = jev.classify(
        "My package arrived broken.",
        ["billing", "shipping", "technical", "other"],
    )

print(result["choice"])
print(result["probabilities"])

Use evaluate when one state needs several typed decisions at once:

{
  "state": {"message": "My package arrived broken.", "customerTier": "plus"},
  "questions": {
    "route": {
      "type": "choice",
      "instructions": "Which team should handle this?",
      "criteria": {
        "billing": "Payments, invoices, or refunds",
        "shipping": "Delivery, damage, or replacement",
        "technical": "Product or application problem"
      }
    },
    "urgent": {
      "type": "noul",
      "instructions": "Does this need urgent human intervention?"
    },
    "resolution": {
      "type": "score",
      "instructions": "How complete is the proposed resolution?",
      "criteria": ["Not started", "Partly resolved", "Resolved"]
    }
  }
}

The response preserves each question's type, candidate distribution, selected answer, zero-generation usage, execution path, and calibration provenance.

Why TurboJev

Need TurboJev approach
Route a request choice returns a stable named option and its full distribution.
Gate an action noul represents a typed yes/no decision without string parsing.
Evaluate a state score returns an ordered, expected-value assessment.
Avoid output parsing Backends score candidates; TurboJev owns validation and response construction.
Keep data local Local inference is supported with no mandatory telemetry or service.
Use one contract everywhere Native bindings and browser/WASM share the same decision schema.
Bring a new model Implement a small scoring adapter instead of rewriting decision logic.

Stable option ordering when order is irrelevant

Many models favor the first or last presented option. For unordered choice questions, enable cyclic order robustness:

{
  "model": "./model.gguf",
  "execution": { "orderRobustness": "cyclic" }
}

TurboJev evaluates each cyclic option order, maps scores back to the original keys, averages the raw logits, and then calibrates the result. The response records both the active policy and the actual number of model evaluations. The feature applies to classify as well as evaluate; it deliberately leaves ordered scores and boolean decisions unchanged. Read the full contract and cost model.

Calibrated confidence is explicit

A softmax distribution is useful for ranking but is not automatically a calibrated probability. TurboJev keeps calibration separate from inference and records whether a fitted calibration profile was used. This lets applications set thresholds based on evidence instead of treating every high model score as a guarantee. See calibration tooling.

Text and multimodal models

Text models can use the built-in llama.cpp/GGUF route or a custom runtime adapter. For models that accept media, TurboJev carries a model-independent envelope for text, image, audio, and video evidence. The selected runtime owns the processor and candidate scoring; TurboJev still validates the input and produces the same typed response.

The repository includes local CPU examples for:

The generic protocol does not claim that every GGUF, ONNX, or safetensors model is multimodal. Runtime support is declared by the adapter and documented in multimodal compatibility.

Pick your host

Host Starting point Runtime path
Rust Rust sample Rust crates + llama.cpp
Node / TypeScript Node sample Node-API + llama.cpp
Python Python sample PyO3 + llama.cpp or worker
C / .NET C# sample Stable C ABI + P/Invoke
Browser Vanilla JS sample Rust/WASM + Transformers.js
Custom model runtime Adapter contract Candidate-scoring backend

Built for evidence, not opaque claims

The Windows validation run used a real small GGUF model with complete response parity across Node/TypeScript, Python, C, and .NET, including typed answers and the zero-generation invariant. The multimodal SmolVLM2 CPU sample also has a recorded real image/video validation run. Reproduce the commands and inspect the limits in Windows validation and multimodal validation.

TurboJev keeps an independent reference path and treats runtime optimizations as capabilities that require parity evidence. It does not advertise cross-request fusion merely because a runtime can batch tokens.

Design commitments

  • Portable core: semantic logic has no operating-system, filesystem, network, hardware, tokenizer, or model dependency.
  • Truthful runtime boundaries: adapters use the real model template and tokenizer; they never invent candidate token IDs.
  • Local by default: no mandatory hosted service and no mandatory telemetry.
  • Typed output: model backends return scores; TurboJev validates, normalizes, calibrates, and builds one canonical response.
  • Open integration: custom runtimes and model families plug into the scoring contract without forking the decision engine.

Documentation

License

TurboJev is available under the Apache License 2.0, which permits commercial use and redistribution subject to its terms.

Release files for turbojev 0.28.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for turbojev 0.28.3
File Interpreter ABI Platform
turbojev-0.28.3-cp39-abi3-win_arm64.whl CPython 3.9 abi3 Windows ARM64 Details
turbojev-0.28.3-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details
turbojev-0.28.3-cp39-abi3-win32.whl CPython 3.9 abi3 Windows x86-32 Details

Total release size: 1.6 MB

Release files / turbojev-0.28.3-cp39-abi3-win_arm64.whl

Download URL turbojev-0.28.3-cp39-abi3-win_arm64.whl
Size 518.7 kB
Tags CPython 3.9 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
cc93bcd31cad7ec051aeb91cc2622de0be068c41427b24804d587108197a42b0
BLAKE2b-256 checksum
How to use checksums
3316b325f1a4084c429596f0cc23eae3d923e5b3d5541d400023fdc86377787a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release files / turbojev-0.28.3-cp39-abi3-win_amd64.whl

Download URL turbojev-0.28.3-cp39-abi3-win_amd64.whl
Size 540.2 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
41dfcff157156400de1f734a6d258f66df2c10728bd8dee2d38120aede86d76c
BLAKE2b-256 checksum
How to use checksums
13726afa89e2c992258a519ec65d538e1d927866ea065e7195612373c4eac4ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release files / turbojev-0.28.3-cp39-abi3-win32.whl

Download URL turbojev-0.28.3-cp39-abi3-win32.whl
Size 500.1 kB
Tags CPython 3.9 Windows x86-32 abi3
SHA-256 checksum
How to use checksums
663b7648d885f715166c9287c3e21dd5a5b4f61f0ce1b91dd5d4a3442a7cc1c2
BLAKE2b-256 checksum
How to use checksums
abaa016b915334fefa915b0c1ee33900c293cfda57f1546bcba0e230aab77e37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.28.3 This release

3 release files

0.28.2

3 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