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.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 | Provenance | Actions |
|---|---|---|---|---|
| miniworld_engine-2.5.0.tar.gz | 2.8 MB | Without provenance | Details for miniworld_engine-2.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| miniworld_engine-2.5.0-py3-none-any.whl | Python 3 | none | any | Details for miniworld_engine-2.5.0-py3-none-any.whl |
Total release size: 6.2 MB
Release files / miniworld_engine-2.5.0.tar.gz
| Download URL | miniworld_engine-2.5.0.tar.gz |
|---|---|
| Size | 2.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eae2c67f5b4b47409f85308ab96012ae60609ecd5a4be21eca04c50133b31e3d
|
|
BLAKE2b-256 checksum How to use checksums |
1a1c4a6fc6019e72d6788b27e20882bc0ef302997caf4d50e7d64934377cdc63
|
| 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.0-py3-none-any.whl
| Download URL | miniworld_engine-2.5.0-py3-none-any.whl |
|---|---|
| Size | 3.4 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b76af649cb50679c8f468847f81fa80dc469d87df8d2ef606b1f164e974fb11
|
|
BLAKE2b-256 checksum How to use checksums |
fd72934a81b7a67aa7814b3ac06d9ded4c9271aef7757c83e27922c8d6b5f91b
|
| 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.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.