eqx-zoo provides pretrained models as plain Equinox modules, loaded straight from Hugging Face checkpoints and numerically verified against the reference implementation in 🤗 Transformers.
Every model is an ordinary pytree, so jax.jit, jax.grad, jax.vmap and the rest of the JAX ecosystem work on it directly.
Installation
pip install eqx-zoo
Requires Python 3.12+. The example below also uses pip install tokenizers.
Quick example
import jax.numpy as jnp
from tokenizers import Tokenizer
from eqx_zoo import CausalLM, generate
tokenizer = Tokenizer.from_pretrained("Qwen/Qwen3-0.6B")
model = CausalLM.from_pretrained("Qwen/Qwen3-0.6B")
prompt = jnp.array(tokenizer.encode("The capital of France is").ids)
tokens = generate(model, prompt, max_new_tokens=30)
print(tokenizer.decode(tokens.tolist()))
# Paris. The capital of Italy is Rome. The capital of Spain is Madrid. ...
Batched generation
Prompts of different lengths are left-padded and generated together. With greedy decoding, each row is identical to generating that prompt on its own.
from eqx_zoo import generate_batch
tokenizer.enable_padding(direction="left")
prompts = ["The capital of France is", "The largest planet in the solar system is"]
batch = tokenizer.encode_batch(prompts)
ids = jnp.array([e.ids for e in batch])
mask = jnp.array([e.attention_mask for e in batch])
tokens = generate_batch(model, ids, mask, max_new_tokens=20)
Models
Any checkpoint with a supported architecture loads with CausalLM.from_pretrained, from the Hugging Face Hub or a local directory. These checkpoints are verified by the test suite:
| Architecture | Verified checkpoints |
|---|---|
LlamaForCausalLM |
SmolLM2-135M, Llama 3.2 1B |
Qwen3ForCausalLM |
Qwen3-0.6B |
Qwen2ForCausalLM |
Qwen2.5-0.5B |
Qwen3MoeForCausalLM |
MiniMind-3 MoE |
Mixture-of-experts models, including Qwen3-30B-A3B, use the same Qwen3MoeForCausalLM architecture; experts are computed with grouped matrix multiplications. generate_batch currently processes their prompts one after another (#23).
Each verified checkpoint is tested against Hugging Face activations in two tiers:
- float32: every layer's output must match, and greedy generation must reproduce the reference output token for token.
- bfloat16: logits must be about as accurate as Hugging Face's own bfloat16, measured against its float32 output. Exact greedy agreement isn't required in bf16, since it drifts even between Hugging Face's own bf16 and float32 runs.
Every architecture is also tested on tiny randomly initialised models, which cover code paths that no single checkpoint exercises. See tests/.
Development
git clone https://github.com/xquantize/eqx-zoo && cd eqx-zoo
uv sync
uv run pytest -m "not checkpoint" # fast: tiny random models, no downloads
uv run pytest # full: also downloads and verifies checkpoints
uv run python benchmarks/generation.py Qwen/Qwen3-0.6B # load, compile and throughput
Contributions are welcome. See CONTRIBUTING.md for setup, conventions and how to add a model.
See also
- Neural networks: Equinox.
- Typing: jaxtyping.
- Other JAX model collections: Levanter (LLM training), Bonsai (Flax NNX), Equimo (vision).
License
Apache 2.0. Pretrained weights are distributed by their original authors under their own licenses.
Metadata
Release files for eqx-zoo 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| eqx_zoo-0.3.0.tar.gz | 20.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| eqx_zoo-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.9 kB
Release files / eqx_zoo-0.3.0.tar.gz
| Download URL | eqx_zoo-0.3.0.tar.gz |
|---|---|
| Size | 20.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6544e3edf40b8b4abf64bd1eddc0251ffd31dbd4477120ae05984656c5a41f77
|
|
BLAKE2b-256 checksum How to use checksums |
240af89d42360f2f8d6b748b43b4e424559a709abf31aa13d6cc9a3695a2ee4f
|
| 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 Oct 1, 2026.
Transparency logRelease files / eqx_zoo-0.3.0-py3-none-any.whl
| Download URL | eqx_zoo-0.3.0-py3-none-any.whl |
|---|---|
| Size | 26.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6156dfd670ffcfee6ef96d59c2f75b1f6c70dd46432261b0f3d40ae248154719
|
|
BLAKE2b-256 checksum How to use checksums |
b884336b3c89428af15fcd370da7165eb04e2f5af705e6cb05e9dfa4c492f811
|
| 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 Oct 1, 2026.
Transparency log