Document the conditioning-tutorial checkpoints
Browse files
README.md
CHANGED
|
@@ -13,7 +13,7 @@ tags:
|
|
| 13 |
Small checkpoints used by the [`stip`](https://github.com/instadeepai/stip) tutorial
|
| 14 |
notebooks, so that a tutorial can demonstrate sampling without spending ten
|
| 15 |
minutes training first. They are toy models (a two-layer MLP, ~50k parameters,
|
| 16 |
-
trained for
|
| 17 |
use outside the notebooks.
|
| 18 |
|
| 19 |
Checkpoints are [Orbax](https://orbax.readthedocs.io) directories written by
|
|
@@ -52,3 +52,15 @@ checkpointer = Checkpointer(
|
|
| 52 |
gen_model = nnx.merge(graphdef, checkpointer.restore_ema(params))
|
| 53 |
```
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
Small checkpoints used by the [`stip`](https://github.com/instadeepai/stip) tutorial
|
| 14 |
notebooks, so that a tutorial can demonstrate sampling without spending ten
|
| 15 |
minutes training first. They are toy models (a two-layer MLP, ~50k parameters,
|
| 16 |
+
trained for 3000 steps on a 4-component 2D Gaussian mixture) and have no
|
| 17 |
use outside the notebooks.
|
| 18 |
|
| 19 |
Checkpoints are [Orbax](https://orbax.readthedocs.io) directories written by
|
|
|
|
| 52 |
gen_model = nnx.merge(graphdef, checkpointer.restore_ema(params))
|
| 53 |
```
|
| 54 |
|
| 55 |
+
`restore_ema` reads only `ema_params` and `extra`, and applies the same bias
|
| 56 |
+
correction the training loop uses for evaluation.
|
| 57 |
+
|
| 58 |
+
## Reproducing
|
| 59 |
+
|
| 60 |
+
```bash
|
| 61 |
+
uv run python tutorials/scripts/train_conditioning_checkpoints.py
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
The script mirrors the notebook's model definitions and PRNG chain, so it
|
| 65 |
+
reproduces these exact weights. A checkpoint pins the parameter structure: if a
|
| 66 |
+
notebook's network changes, re-run the script and re-upload.
|