Spaces:
Sleeping
Sleeping
metadata
title: Compiler Tetris — Toy-IR RL Demo
emoji: 🧩
colorFrom: gray
colorTo: indigo
sdk: docker
sdk_version: 5.12.0
app_file: app.py
pinned: false
license: mit
Compiler Tetris (Toy-IR) — Hugging Face Space
Interactive CPU demo for the Meta / OpenEnv-style compiler phase-ordering project:
- Deliverable 2 — state translation: JSON Toy-IR → compact pseudo-assembly for the LLM.
- Deliverable 2 — format enforcement: resilient extraction of a JSON pass array from noisy model text.
- CompilerOptimizationEnv (mock Role 1 engine + mock passes): step through passes and inspect rewards.
Full GRPO / Unsloth training is not run here (heavy GPU + long installs). Use your notebooks on Colab or a GPU Space for training.
Source notebooks (parent repo)
compiler_optimization_grpo.ipynbrole2_deliverable3_training_loop (2) (1).ipynbcompiler_tetris (1).ipynbmetahack1 (1).ipynb
Deploy this folder as a new Space
- Create a new Space on Hugging Face (SDK: Gradio).
- Upload the contents of this
hf_space/directory to the Space repository root (app.py,requirements.txt,README.md). - Optional: add
Dockerfileonly if you switch the Space to Docker (see below).
Optional: Docker SDK instead of Gradio SDK
If you want the Space to build from Dockerfile, change the YAML header to:
sdk: docker
and remove Gradio-specific keys (sdk_version, app_file). The container runs python app.py, which listens on the PORT environment variable provided by Spaces.
Local run
cd hf_space
pip install -r requirements.txt
python app.py
Then open http://127.0.0.1:7860.