Skip to content

Commit 33acb15

Browse files
ivanbasovclaude
andauthored
docs: reference published ColorCode-1-Fast model; use SafeTensors inference path (#93)
* docs: reference published ColorCode-1-Fast model; use SafeTensors inference path Add nvidia/Ising-Decoder-ColorCode-1-Fast to the published pre-trained models in the README (badge + models list) and document loading it via the color-code path. Also correct the surface inference instructions: the published checkpoints are distributed as fp16 .safetensors (not .pt), so load them with PREDECODER_SAFETENSORS_CHECKPOINT (which reads model_id and precision from file metadata) and reference the actual published filenames. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * docs: trim repeated SafeTensors mentions in the inference steps Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent b0a32fe commit 33acb15

1 file changed

Lines changed: 31 additions & 10 deletions

File tree

README.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
[![Python 3.11+](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/)
88
[![Model: Surface Fast](https://img.shields.io/badge/🤗%20HuggingFace-Surface%20Fast-ffd21e)](https://huggingface.co/nvidia/Ising-Decoder-SurfaceCode-1-Fast)
99
[![Model: Surface Accurate](https://img.shields.io/badge/🤗%20HuggingFace-Surface%20Accurate-ffd21e)](https://huggingface.co/nvidia/Ising-Decoder-SurfaceCode-1-Accurate)
10+
[![Model: Color Fast](https://img.shields.io/badge/🤗%20HuggingFace-Color%20Fast-ffd21e)](https://huggingface.co/nvidia/Ising-Decoder-ColorCode-1-Fast)
1011

1112
This repo offers AI training recipes to build, customize and deploy scalable quantum error correction **decoders**:
1213

@@ -237,11 +238,17 @@ If you are not training locally, you can run inference using pre-trained models.
237238
```
238239

239240
2. **Get the pre-trained models**
240-
Two surface-code models are published on Hugging Face (they are licensed
241-
separately from the code in this repo and are not part of it):
241+
Pre-trained pre-decoders are published on Hugging Face as fp16 SafeTensors
242+
files (they are licensed separately from the code in this repo and are not
243+
part of it):
244+
245+
Surface code:
242246
- [nvidia/Ising-Decoder-SurfaceCode-1-Fast](https://huggingface.co/nvidia/Ising-Decoder-SurfaceCode-1-Fast) (receptive field R=9)
243247
- [nvidia/Ising-Decoder-SurfaceCode-1-Accurate](https://huggingface.co/nvidia/Ising-Decoder-SurfaceCode-1-Accurate) (receptive field R=13)
244248

249+
Color code:
250+
- [nvidia/Ising-Decoder-ColorCode-1-Fast](https://huggingface.co/nvidia/Ising-Decoder-ColorCode-1-Fast) (receptive field R=13) — run through the color-code path (`code: color`); see the color example below.
251+
245252
The models are access-controlled: sign in with a Hugging Face token
246253
(create one at <https://huggingface.co/settings/tokens>), then download
247254
the files into `models/`:
@@ -251,26 +258,40 @@ If you are not training locally, you can run inference using pre-trained models.
251258
hf auth login
252259
hf download nvidia/Ising-Decoder-SurfaceCode-1-Fast --local-dir models/
253260
hf download nvidia/Ising-Decoder-SurfaceCode-1-Accurate --local-dir models/
261+
hf download nvidia/Ising-Decoder-ColorCode-1-Fast --local-dir models/
254262
```
255263

256-
See each model card for the available files and formats. The scripts below
257-
expect `models/Ising-Decoder-SurfaceCode-1-Fast.pt` and
258-
`models/Ising-Decoder-SurfaceCode-1-Accurate.pt`.
264+
Each repo ships a single checkpoint (see the model card for the exact file
265+
and any additional formats):
266+
- `models/ising_decoder_surface_code_1_fast_r9_v1.0.77_fp16.safetensors`
267+
- `models/ising_decoder_surface_code_1_accurate_r13_v1.0.86_fp16.safetensors`
268+
- `models/ising_decoder_color_code_1_fast_r13_v1.0.400_fp16.safetensors`
259269

260270
These checkpoints target the uniform circuit-level depolarizing setting
261271
encoded by the public configs. Custom, non-uniform 25-parameter noise models
262272
are supported for training by the pipeline below; they are a training-time
263273
customization rather than a property of the published checkpoints.
264274

265-
3. Set:
275+
3. **Run surface-code inference** by pointing the runner at the downloaded
276+
checkpoint. `PREDECODER_SAFETENSORS_CHECKPOINT` reads the model architecture
277+
and precision from file metadata, so you do not need to set `model_id` in
278+
`conf/config_public.yaml`:
279+
280+
```bash
281+
PREDECODER_SAFETENSORS_CHECKPOINT=models/ising_decoder_surface_code_1_fast_r9_v1.0.77_fp16.safetensors \
282+
WORKFLOW=inference EXPERIMENT_NAME=predecoder_model_1 bash code/scripts/local_run.sh
283+
```
266284

267-
- `EXPERIMENT_NAME=predecoder_model_1`
268-
- `model_id: 1` in `conf/config_public.yaml`
285+
Swap in `ising_decoder_surface_code_1_accurate_r13_v1.0.86_fp16.safetensors`
286+
for the Accurate (R=13) model.
269287

270-
4. **Run inference**:
288+
4. **Run color-code inference** with the published color checkpoint. Set
289+
`code: color` in `conf/config_public.yaml` (see [Color code support](#color-code-support)
290+
for the color runtime), then load the checkpoint the same way:
271291

272292
```bash
273-
WORKFLOW=inference EXPERIMENT_NAME=predecoder_model_1 bash code/scripts/local_run.sh
293+
PREDECODER_SAFETENSORS_CHECKPOINT=models/ising_decoder_color_code_1_fast_r13_v1.0.400_fp16.safetensors \
294+
WORKFLOW=inference EXPERIMENT_NAME=predecoder_color_1_fast bash code/scripts/local_run.sh
274295
```
275296

276297
Inference output is written to `outputs/<EXPERIMENT_NAME>/` with a full log in

0 commit comments

Comments
 (0)