Skip to main content

Flide: Accelerating Decision Inference with Exact State Forking

English · 简体中文 · 日本語

PyPI GitHub Website Docs License Python PyTorch

News · Speed · Exact answers · Quick start · Models · Options

Flide is fast inference infrastructure for Jev-style decision models. With exact state forking it is up to 9.4 times faster than vLLM and SGLang, and every answer is the one the model gives the question alone. It serves the Jev /v1/systemone API.

🔥 News

Fork the state into every question: a generation engine runs every question as a sequence and computes part of the state again, multi-item scoring adds delimiters that change the answers, and Flide forks the state at its last token

With three questions, a generation engine runs three sequences and computes 4 cells of the state again, and multi-item scoring adds 3 delimiters that change the answers. Flide runs one sequence, computes nothing twice, adds no tokens, and gives each question the answer it gets when asked alone.

Speed

Speed of Flide, vLLM and SGLang on one H200 with Qwen3.5-0.8B

On one H200 with Qwen3.5-0.8B, Flide is up to 9.4 times faster than both vLLM and SGLang (QuALITY, where it is 14 times faster than vLLM), 3.6 to 4 times faster on RACE and the Decision Index, and serves 2.4 times the throughput with 64 clients. The more questions a state carries, the bigger the gap.

Exact answers

Shared work, exact answers: Flide stays within 1.1 points of a float32 reference, multi-item scoring moves 0.9 to 14.8 points; with --batch-invariant a request gets the same bits however it is batched

Flide stays within 1.1 points of a float32 reference, the closest of any engine, and flips at most 2.3% of decisions at 0.5. Multi-item scoring moves answers by up to 14.8 points and flips up to 28.9%. With --batch-invariant, a request gets the same bits however it is batched.

Quick start

See the docs for every model, the API and all options.

1. Install

uv venv -p 3.12 && source .venv/bin/activate
uv pip install flide torchvision

2. Start a server

Any chat model on Qwen3.5 or Gemma 4 serves as it is and answers through its next token.

flide serve --model Qwen/Qwen3.5-4B

OneJev models read their answers their own way, and Flide serves them as they are too.

flide serve --model OmniJev/OneJev1.6-0.8B

An Open-Jev release is an adapter on a Qwen3.5 base. Merge it into a checkpoint once, then serve that.

python -m flide_open_jev.prepare ZefanCai/Open-Jev-2B open-jev-2b
flide serve --model open-jev-2b

flide serve listens on all interfaces at port 8000; pass --host 127.0.0.1 to keep it local.

3. Send a request

curl http://localhost:8000/v1/systemone -H "Content-Type: application/json" -d '{
  "state": "Order #1182 arrived with a cracked screen. The customer asks for a refund and attached two photos.",
  "questions": {
    "action": {"type": "choice", "instructions": "What should support do next?",
               "criteria": {"refund": "refund the order", "replace": "send a replacement", "escalate": "ask a human"}},
    "urgent": {"type": "noul", "instructions": "Does this need a reply within the hour?"}
  }
}'

OneJev models also read images. Put <image:1> where the photo belongs in the state and send the photo in media.

IMG=$(base64 -w0 photo.jpg)
curl http://localhost:8000/v1/systemone -H "Content-Type: application/json" -d @- <<EOF
{
  "state": {"ticket": "Order #1182 arrived with a cracked screen. The customer asks for a refund.", "photo": "<image:1>"},
  "media": [{"type": "image", "data": "data:image/jpeg;base64,$IMG"}],
  "questions": {
    "cracked": {"type": "noul", "instructions": "The photo shows a cracked screen"},
    "action": {"type": "choice", "instructions": "What should support do next?",
               "criteria": {"refund": "refund the order", "replace": "send a replacement", "escalate": "ask a human"}}
  }
}
EOF

Every answer carries the probability of each option, ready for a threshold.

Models

Model Inputs DI MultiRC QuALITY
AJev text 3.7× 9.3× 2.6×
Bespoke-Nimble text 2.6× 2.1× 1.6×
cerno text 3.4 to 4.7× 8.1 to 9.1× 1.1×
Darwin text 1.6× 7.0× 1.2×
Gemma 4 text, images 1.1 to 1.5× 1.1 to 2.5× 1.0 to 1.1×
Intern-Decision text, images 4.4× 1.1× 1.5×
JADE text 2.0× 9.2× 1.7×
Jeffan text 3.1× 2.6× 1.9×
JevAny text, images 1.5× 5.8× 1.2×
jiwo text 1.7 to 2.1× 5.0 to 6.9× 1.8×
Kev text 5.6 to 10.1× 1.3 to 1.7× 1.1 to 2.2×
Linne text 2.3× 8.6× 1.2×
Lumma text, images 1.7× 7.1× 1.2×
Lychee text 1.4× 1.5× 1.4×
mammoth text, images 3.3 to 5.3× 2.3 to 3.4× 1.6 to 2.0×
mogan text 1.6× 8.5× 1.8×
OneJev text, images, video 3.2 to 11.9× 7.3× 4.7×
Open-Jev text 4.2× 5.0× 1.3 to 1.7×
pplx-decider text, images 3.1× 1.4× 1.2×
Quyet text 1.9 to 5.9× 7.0 to 7.2× 1.4 to 1.9×
Qwen3.5 text, images 1.2 to 3.3× 2.4 to 7.7× 1.0 to 2.0×
Senova text 3.1× 28.1× 1.2×
Sieve text 3.0× 14.3× 2.6×
StartLux text 2.6× 1.1× 1.2×
torchcast text, images 1.6× 8.4× 1.4×

The last three columns say how much faster Flide answers one request than the engine its release ships, as the median latency over the requests of each workload on one H200, where DI is the Decision Index. The chat models run against the faster of vLLM and SGLang, OneJev against qev, the engine it used before Flide, and Open-Jev against vllm-jev, and a range spans the sizes tested.

Any chat model on Qwen3.5 or Gemma 4 serves as it is; their rows name the official ones. The other rows are decision models, each read the way its release reads it. AJev, Bespoke-Nimble, JADE, mogan, Sieve and the smaller Kev models ship as LoRA adapters, which Flide runs beside their base weights as peft does. JevAny ships as LoRA adapters too, and Flide merges them into the base weights as its release does. A new family is one JSON file in flide/formats/known/ when a prompt template describes it, else one folder in plugins/ and one line in pyproject.toml; a separate package can also join through the flide.formats entry point.

Options

Option What it does
--session-cache-gb 40 keeps the states of earlier requests, so an agent's next step reads only what is new
--batch-invariant the same bits for a request whatever it is batched with, at some cost in speed
--quantize fp8 Qwen3.5 in FP8 on Ada, Hopper and Blackwell GPUs
--frontends 2 HTTP, rendering and tokenizing in two processes of their own, for many clients

License

Apache-2.0. flide/kernels/gdn.py holds a kernel derived from two kernels of flash-linear-attention (MIT); THIRD_PARTY_NOTICES lists it with the other code Flide builds on.

Metadata

Release files for flide 0.1.5

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

Built distribution (wheel)

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

Release files / flide-0.1.5-py3-none-any.whl

Download URL flide-0.1.5-py3-none-any.whl
Size 18.0 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c7993756abffd4556a5021a5b0fa112095546275f74513d937908c3c6df243f7
BLAKE2b-256 checksum
How to use checksums
aea50cd0f72c7d3738e7e4be419cdccd8c9c2cb7f447afb9b2dd501326ad8b9b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for flide 0.1.5

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.

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