Skip to main content

Self-Play Pretraining with Zero Data (wip)

Implementation of Self-Play Pretraining with Zero Data

Paper Review from @hu-po

Usage

import torch
from self_play_pretrain_zero_data import Brainfuck, SelfPlay, Transformer

executor = Brainfuck()

generator = Transformer(num_tokens = executor.num_tokens, dim = 512, depth = 6)
learner = Transformer(num_tokens = 256 + 1, dim = 512, depth = 6)

self_play = SelfPlay(generator, learner, executor)
self_play(epochs = 10)

torch.save(learner.state_dict(), './learner.pt')

Citations

@misc{cowsik2026selfplaypretrainingzerodata,
    title    = {Self-Play Pretraining with Zero Data},
    author   = {Aditya Cowsik and Kfir Dolev and Michael Y. Li and G. Bruno De Luca and Nourya Cohen and Noah D. Goodman and Yoav Levine},
    year     = {2026},
    eprint   = {2609.30063},
    archivePrefix = {arXiv},
    primaryClass = {cs.AI},
    url      = {https://arxiv.org/abs/2609.30063},
}
@software{Morehead_JVP_Flash_Attention_2025,
    author  = {Morehead, Alex},
    doi     = {10.5281/zenodo.17050188},
    license = {MIT},
    month   = {sep},
    title   = {JVP Flash Attention},
    url     = {https://github.com/amorehead/jvp_flash_attention},
    version = {0.14.0},
    year    = {2025}
}
@misc{bloem2025universalpretrainingiteratedrandom,
    title   = {Universal pre-training by iterated random computation},
    author  = {Peter Bloem},
    year    = {2025},
    eprint  = {2506.20057},
    archivePrefix = {arXiv},
    primaryClass = {cs.LG},
    url     = {https://arxiv.org/abs/2506.20057},
}

Metadata

Release files for self-play-pretrain-zero-data 0.0.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for self-play-pretrain-zero-data 0.0.17
File Size Uploaded
self_play_pretrain_zero_data-0.0.17.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for self-play-pretrain-zero-data 0.0.17
File Interpreter ABI Platform
self_play_pretrain_zero_data-0.0.17-py3-none-any.whl Python 3 none any Details

Total release size: 33.7 kB

Release files / self_play_pretrain_zero_data-0.0.17.tar.gz

Download URL self_play_pretrain_zero_data-0.0.17.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
501e21cc28ed6d88b4ce1686c4143a91f25dd6f143c41451e4e1882a9a635c0a
BLAKE2b-256 checksum
How to use checksums
1e3992c160e80aa776103a2dabb32759e3ab7a891b668eceb11a0f3282d4716d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17

Release files / self_play_pretrain_zero_data-0.0.17-py3-none-any.whl

Download URL self_play_pretrain_zero_data-0.0.17-py3-none-any.whl
Size 17.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
475c628e19be25e62e8bd6ea1b240cde7b66885c79cc2a35e674fbe0bb9b1d94
BLAKE2b-256 checksum
How to use checksums
efc4937a83f87e1873a312c8d84682006a412ab03e30d83cc5ec2a5b32a62c06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.17
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