ZOTitan
A codebase for Zeroth-Order Optimization (ZO) training and experiments.
Supported algorithms:
- MeZO
- MeZO with momentum from seed reconstruction
- MeZO-Adam
- SPSA
- Evolutionary Strategies
- EGGROLL
Plus some other experimental features. You can mix and match pieces of all the above algorithms. See ./train.py --help for more details.
Setup
Requires Python 3.11+ and a CUDA GPU.
python3 -m venv .venv
.venv/bin/pip install .
./train.py --help
Training
./train.py
First-order training requires a differentiable objective. Zeroth-order treats the loss as a black box, so any scalar works. We support both. If the loss your objective returns is differentiable, you can just do:
./train.py --optimizer zo # MeZO (implied by default)
./train.py --optimizer fo # Adam (with gradients)
Objectives
The --objective flag takes a +-joined mixture spec. Each component selects a
dataset by name, optionally with weights and per-objective keyword config:
# Combine and weight a data mix
./train.py --objective "(scijudge,.5,1)+(c4)"
This trains a model on the c4 and scijudge objectives, where the scijudge loss is weighted half as strongly as the c4 loss.
You can also pass kwargs to the constructor of an objective like so:
./train.py --objective "(c4,z_loss_weight=0.1,fused=True)"
Here is the full grammar for the spec.
spec := component ("+" component)*
component := NAME | "(" NAME ("," field)* ")"
field := VALUE | KEY "=" VALUE
KEY := identifier
VALUE := "'" CHARS "'" | '"' CHARS '"' | LITERAL
LITERAL := int | float | True | False | None
CHARS := ... # Whatever you can put in a python string
- A bare
NAMEand any omitted weight default to1.0, soscijudge==(scijudge,1,1)and(c4,.5)==(c4,.5,1). - Keyword fields (
KEY=VALUE) come after the positional weights and are forwarded to that objective's constructor. - Bare values must be numeric /
True/False/None(and keep their type —rank=64is an int).
Metadata
Release files for ZOTitan 0.1.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 | |
|---|---|---|---|---|
| zotitan-0.1.0.tar.gz | 47.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| zotitan-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 102.0 kB
Release files / zotitan-0.1.0.tar.gz
| Download URL | zotitan-0.1.0.tar.gz |
|---|---|
| Size | 47.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
635b3121a080fb5f43b2d025f408bb856396b59579e0382fde39819533e355d7
|
|
BLAKE2b-256 checksum How to use checksums |
a2f8e24bba9443f64cd4c709c7d190edc82da7500bbb4ff90e9c786b7a98d95a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 7, 2026.
Transparency logRelease files / zotitan-0.1.0-py3-none-any.whl
| Download URL | zotitan-0.1.0-py3-none-any.whl |
|---|---|
| Size | 54.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5aa446e93945408b9b28c89b79e0bf5cb77b3a23968622a40f8e003b9b5afaa3
|
|
BLAKE2b-256 checksum How to use checksums |
8a602adcf88777d6a2293349bb69b4485426c95a9a38dc87eee64bece1af876c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 7, 2026.
Transparency logSecurity for ZOTitan 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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for zotitan-0.1.0.tar.gz
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 Jul 7, 2026.
Transparency logA 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.