Skip to main content

miniworld-engine

PyTorch modules of AF3-style structure-prediction models (pair stack, MSA ops, token / atom diffusion transformers, sampler glue, ProteinMPNN, losses), each with a PyTorch reference and hand-written H100 kernels as alternative backends, plus the tooling that states what each module must serve and judges whether a backend is accurate and fast enough.

Scope: H100 (sm90) only. The cuda backends are built for sm_90a; the launch-config tables, the prebuilder's default target and the judge's recorded environment are H100.

The four parts

part where what
requirements src/miniworld_engine/requirements/ requirements_module.csv: every (module class, dims, options) a downstream model builds, with lengths, dtypes, modes. requirements_kernel.csv: every kernel a module backend launches, its family, role and human-managed version.
modules + backends src/miniworld_engine/modules/ One BackendModule per op. pytorch is the reference; cuda / triton are the engine's kernels; anthropic / cueq are external baselines. A backend states its range in _supports_<backend> and never falls back.
kernels src/miniworld_engine/kernels/ Kernel families (CUDA and Triton), per-GPU launch-config tables, the prebuilder (CUDA artifacts ahead of time) and the pretuner (launch-config tables).
measure + judge src/miniworld_engine/measure/, src/miniworld_engine/judge/ Measurers for accuracy (fp64 gold) and speed (CUDA graphs); the judge turns records into tokens and decides which cases are owed a measurement, by human-managed versions.

Quick usage

Build a module with a backend:

import torch
from miniworld_engine.modules import TriangleMultiplication, TokenDiT

tri = TriangleMultiplication(128, backend="cuda").cuda()     # H100 kernels
ref = TriangleMultiplication(128).cuda()                     # backend="pytorch", the reference
ref.load_state_dict(tri.state_dict())                        # same parameter names for every backend
tri.set_backend("triton")                                    # switch later; ValueError if the class has no such backend

dit = TokenDiT(model="boltz2", ...)                          # selector: builds the model's own class (TokenDiTBoltz2)

A call outside a backend's range raises BackendUnsupported with the reason; it is never run by another backend.

Prebuild the CUDA kernels (CPU node, no GPU needed):

python -m miniworld_engine.kernels._prebuild --list            # plan from the code + requirements, what is missing
python -m miniworld_engine.kernels._prebuild --jobs 16 --cutlass $CUTLASS_PATH

Measure and judge (the measurers need a GPU; the judge runs on a CPU):

python -m miniworld_engine.judge owed --plan $DIR             # which cases are owed; writes configs + groups G1..G4
# one 1-GPU, 10-minute job per group: for each line "<kind> <module> <cfg>" of $DIR/G<i>
python -m miniworld_engine.measure.<kind> <cfg> --out $DIR/out/<kind>.<module>.jsonl
python -m miniworld_engine.judge issue $DIR/out               # records made by current versions -> tokens
python -m miniworld_engine.judge status

Documentation

docs/README.md is the index: requirements, modules, kernels, measurement, judge, and per-family H100 kernel notes.

License

MIT (copyright 2026 Sanggeun Park). The license text and third-party notices are LICENSE and licenses/ at the repository root; the external release used by the anthropic backends is under third_party/anthropic/.

Metadata

Release files for miniworld-engine 2.5.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 miniworld-engine 2.5.1
File Size Uploaded Provenance Actions
miniworld_engine-2.5.1.tar.gz 4.1 MB Without provenance Details for miniworld_engine-2.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for miniworld-engine 2.5.1
File Interpreter ABI Platform Actions
miniworld_engine-2.5.1-py3-none-any.whl Python 3 none any Details for miniworld_engine-2.5.1-py3-none-any.whl

Total release size: 9.3 MB

Release files / miniworld_engine-2.5.1.tar.gz

Download URL miniworld_engine-2.5.1.tar.gz
Size 4.1 MB
Tags Source
SHA-256 checksum
How to use checksums
ada3bc2e662b142bf4e28f5d57c1ef6b97df4e0542dd13a8a1d13eddf37fd3d9
BLAKE2b-256 checksum
How to use checksums
0476502a90a29831aa556c3585b23b191ac6900be95b1c24e4a55ba21b405b29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Release files / miniworld_engine-2.5.1-py3-none-any.whl

Download URL miniworld_engine-2.5.1-py3-none-any.whl
Size 5.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1a734ae41df3f977a3e502fc72a022b3e50de8dfcbde3f570f14bcefcd744072
BLAKE2b-256 checksum
How to use checksums
5cfd45daa8af6de449a695c7962df46162c3f40a2665dec201888178a0aacb6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.13

Security for miniworld-engine 2.5.1

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.

Release history Release notifications | RSS feed

This release

2.5.1 This release

2 release files No provenance

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