Skip to main content

Flide: Accelerating Decision Inference with Exact State Forking

English · 简体中文 · 日本語

PyPI GitHub Website License Python PyTorch

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

Flide serves decision models. A request holds a state, such as an agent's trajectory or a document, and typed questions about it. Flide forks the state into all of its questions inside one forward pass, so the state is read once and every question gets the answer it would get if it were asked alone. Answers come back as probabilities through the /v1/systemone API that vLLM and SGLang also serve.

🔥 News

  • 🔥 2026-10-24 We released Flide 0.1.0 on PyPI. Welcome to have a try.

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

Speed

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

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

Quick start

1. Install

pip install flide

The NVIDIA driver is all a machine needs. PyTorch brings the CUDA runtime, and Flide ships its kernels compiled for the H100 and H200 and for the A40, A10 and RTX 30 series. On other GPUs they compile once at the first start. Images and video also need torchvision, installed from the same index as torch.

PyTorch's wheels on PyPI need driver 580 or newer. With an older driver, install PyTorch's CUDA 12.6 build first, with torchvision.

pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
pip install flide

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 and Open-Jev models read their answers their own way, and Flide serves them as they are too.

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

flide serve listens on all interfaces at port 8000, as vLLM does; 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?"}
  }
}'

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

Models

Backbone Sizes Inputs
Qwen3.5 0.8B, 2B, 4B, 9B, 27B text, images, video
Gemma 4 E2B, E4B, 12B, 26B-A4B, 31B text, images

OneJev and Open-Jev, which read their answers their own way, come with Flide. A new family is 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.

Stars

Flide stars on GitHub

Metadata

Release files for flide 0.1.0

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.0
File Interpreter ABI Platform
flide-0.1.0-py3-none-any.whl Python 3 none any Details

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

Download URL flide-0.1.0-py3-none-any.whl
Size 12.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
460a31e325105a1a37d55368deede7d5421eda999c15a2d0c41bc9a4187a83fb
BLAKE2b-256 checksum
How to use checksums
e7b505459ff66c08d8c06d166abf304a3ddb7477645c5f6b8b5bbb6fd834b4fc
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.0

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