Dreamworldsmile commited on
Commit
4825579
Β·
verified Β·
1 Parent(s): 161fb9c

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +19 -15
README.md CHANGED
@@ -28,16 +28,20 @@ Pre-trained neural decoder checkpoints for rotated surface codes, based on the
28
  - **Cross-attention readout** with learnable logical query tokens
29
  - Trained with **progressive knowledge distillation** from MWPM pseudo-labels
30
 
31
- ## Checkpoints
32
 
33
- | File | Distance | Size | Training Step |
34
- |------|----------|------|---------------|
35
- | `d7.pth` | d=7 | ~121 MB | scratch |
36
- | `d11.pth` | d=11 | ~121 MB | transfer from d7 |
37
- | `d15.pth` | d=15 | ~121 MB | transfer from d11 |
38
- | `d19.pth` | d=19 | ~121 MB | transfer from d15 |
39
- | `d23.pth` | d=23 | ~121 MB | transfer from d19 |
40
- | `d25.pth` | d=25 | ~122 MB | transfer from d23 |
 
 
 
 
41
 
42
  Each checkpoint contains:
43
  - `model_state` β€” OrderedDict of model weights
@@ -51,10 +55,10 @@ Each checkpoint contains:
51
  import torch
52
  from huggingface_hub import hf_hub_download
53
 
54
- # Download checkpoint
55
  ckpt_path = hf_hub_download(
56
  repo_id="Dreamworldsmile/ntu-surface-code-decoder",
57
- filename="d7.pth",
58
  )
59
 
60
  # Load into AlphaQubit V2
@@ -69,12 +73,12 @@ model.load_state_dict(
69
  ### With the official code
70
 
71
  ```bash
72
- # Inference
73
  python inference.py --hf_repo Dreamworldsmile/ntu-surface-code-decoder --d 7 --shots 100000
74
 
75
- # Transfer learning
76
- python transformer.py --mode train --d 11 \
77
- --hf_resume Dreamworldsmile/ntu-surface-code-decoder/d7.pth
78
  ```
79
 
80
  ## Authors
 
28
  - **Cross-attention readout** with learnable logical query tokens
29
  - Trained with **progressive knowledge distillation** from MWPM pseudo-labels
30
 
31
+ ## Repository Structure
32
 
33
+ ```
34
+ ntu-surface-code-decoder/
35
+ β”œβ”€β”€ README.md
36
+ β”œβ”€β”€ surface/ ← Surface code checkpoints (AlphaQubit V2)
37
+ β”‚ β”œβ”€β”€ d7.pth (~121 MB, scratch)
38
+ β”‚ β”œβ”€β”€ d11.pth (~121 MB, transfer from d7)
39
+ β”‚ β”œβ”€β”€ d15.pth (~121 MB, transfer from d11)
40
+ β”‚ β”œβ”€β”€ d19.pth (~121 MB, transfer from d15)
41
+ β”‚ β”œβ”€β”€ d23.pth (~121 MB, transfer from d19)
42
+ β”‚ └── d25.pth (~122 MB, transfer from d23)
43
+ └── bb/ ← BB code checkpoints (coming soon)
44
+ ```
45
 
46
  Each checkpoint contains:
47
  - `model_state` β€” OrderedDict of model weights
 
55
  import torch
56
  from huggingface_hub import hf_hub_download
57
 
58
+ # Download a surface code checkpoint
59
  ckpt_path = hf_hub_download(
60
  repo_id="Dreamworldsmile/ntu-surface-code-decoder",
61
+ filename="surface/d7.pth",
62
  )
63
 
64
  # Load into AlphaQubit V2
 
73
  ### With the official code
74
 
75
  ```bash
76
+ # Inference β€” auto-downloads surface/d{d}.pth
77
  python inference.py --hf_repo Dreamworldsmile/ntu-surface-code-decoder --d 7 --shots 100000
78
 
79
+ # Transfer learning β€” specify full path within the repo
80
+ bash train.sh --mode transfer \
81
+ --hf_ckpt Dreamworldsmile/ntu-surface-code-decoder/surface/d7.pth --d 11 ...
82
  ```
83
 
84
  ## Authors