Skip to main content

Quivers

A typed functional probabilistic programming language with a PyTorch runtime.

CI Docs PyPI Python 3.14+ License: MIT

Tutorial · Examples · Language reference · Python API


Quivers is a typed probabilistic programming language for compositional models. A QVR source file is parsed, checked, and lowered to one intermediate representation used by the PyTorch runtime, editor tooling, and transpilers. The Python API provides variational and Monte Carlo inference, while the compiler emits models for eleven probabilistic programming systems.

A model in QVR

This stochastic GRU language-model step draws update and reset gates, updates the hidden state, and scores the observed next token.

object Token : FinSet 256
object Embedded : Real 64
object Hidden : Real 128

morphism gate_z, gate_r : Embedded * Hidden -> Hidden ~ LogitNormal
morphism lm_head : Hidden -> Token ~ Categorical

program gru_step(x_t, h_prev) : Embedded * Hidden -> Token
    sample z <- gate_z(x_t, h_prev)
    sample r <- gate_r(x_t, h_prev)

    let reset_hidden = r * h_prev
    sample h_candidate <- Normal(reset_hidden, 0.5)

    let h = (1.0 - z) * h_prev + z * h_candidate
    observe next_token <- lm_head(h)
    return next_token

export gru_step

Install Quivers, download the full recurrent model, and check it through the command line:

pip install quivers
curl -LO https://raw.githubusercontent.com/FACTSlab/quivers/main/docs/examples/source/gru_lm.qvr
qvr check gru_lm.qvr

The tutorial starts with the core language and inference workflow. The examples gallery includes hierarchical and state-space models, mixture models, neural language models, formal grammars, and structural autoencoders.

Documentation

Installation and editors

Quivers requires Python 3.14 or later. Install optional interactive and editor support with:

pip install 'quivers[repl,lsp]'

The repository includes extensions for VS Code and Cursor and Zed. Both provide immediate syntax highlighting; qvr-lsp adds typed diagnostics, hover, definitions, references, completion, formatting, and semantic tokens.

Contributing

See CONTRIBUTING.md. Issues and pull requests are welcome at github.com/FACTSlab/quivers.

Acknowledgments

This project was developed by Aaron Steven White at the University of Rochester with support from the National Science Foundation (NSF-BCS-2237175 CAREER: Logical Form Induction, NSF-BCS-2040831 Computational Modeling of the Internal Structure of Events). It was architected and implemented with the assistance of Claude Code.

License

MIT. See LICENSE.

Metadata

Release files for quivers 0.20.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 quivers 0.20.1
File Size Uploaded
quivers-0.20.1.tar.gz 9.7 MB Details

Built distributions (wheels)

Table of built distributions (wheels) for quivers 0.20.1
File Interpreter ABI Platform
quivers-0.20.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
quivers-0.20.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.5+ x86-64 Details
quivers-0.20.1-cp314-cp314-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 macOS 11.0+ ARM64 Details

Total release size: 31.1 MB

Release files / quivers-0.20.1.tar.gz

Download URL quivers-0.20.1.tar.gz
Size 9.7 MB
Tags Source
SHA-256 checksum
How to use checksums
8ef3e603f66328f1faa42b8871352abf199474a9b40f46299fc9c0204991fc4b
BLAKE2b-256 checksum
How to use checksums
dc06c2a1056f43fff5c5b8d1d903a70e6c361ad27c69ac246a76e0b8d7735a83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release files / quivers-0.20.1-cp314-cp314-win_amd64.whl

Download URL quivers-0.20.1-cp314-cp314-win_amd64.whl
Size 7.7 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
9b11b39c3aadfa29fb1729028c5574aa1fac1c7f5ccf328b8e0a0ed5389bbd04
BLAKE2b-256 checksum
How to use checksums
88b512972daf8b19b65f67c9d3f515289efc339b2a6abe8a763ef44e20ed387b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release files / quivers-0.20.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl

Download URL quivers-0.20.1-cp314-cp314-manylinux1_x86_64.manylinux_2_28_x86_64.manylinux_2_5_x86_64.whl
Size 6.9 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
07b0a6f1dcb2044d63f3edb458154416baa51c4731bf294d048f50492d45e237
BLAKE2b-256 checksum
How to use checksums
49da2cd0b77b246be2501a8987cd430122e22b0979b6421d986de9f2c82043c7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release files / quivers-0.20.1-cp314-cp314-macosx_11_0_arm64.whl

Download URL quivers-0.20.1-cp314-cp314-macosx_11_0_arm64.whl
Size 6.9 MB
Tags CPython 3.14 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ee7dba03535a6e44994f7b4c7ea9c34a35491cb2c8ffcf040b65056935f7ddf1
BLAKE2b-256 checksum
How to use checksums
6e2367eda3af464c3b86c7bd96bba3a2a485af2eb17be55490acdf82a594c524
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.

Transparency log

Release history Release notifications | RSS feed

0.25.2

4 release files

0.25.1

4 release files

0.23.0

4 release files

0.22.0

4 release files

0.21.0

4 release files

This release

0.20.1 This release

4 release files

0.20.0

4 release files

0.19.0

4 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.5

2 release files

0.11.4

2 release files

0.11.3

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 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