File size: 1,428 Bytes
36072d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
license: apache-2.0
task_categories:
- unconditional-image-generation
tags:
- conditional-vae
- generative-model
- pytorch
- gradio
---

# GlyphForge CVAE

GlyphForge is a compact conditional variational autoencoder that generates 8x8
handwritten digits. A requested digit label conditions the decoder while an
eight-dimensional Gaussian latent captures style.

The benchmark measures:

- held-out reconstruction MSE;
- KL divergence to the unit-Gaussian prior;
- generated-class fidelity through the frozen Tiny Vision classifier;
- within-class sample diversity.

## Reproduce

```powershell
uv run python projects/tiny-vision-foundry/prepare_data.py
uv run python projects/glyph-forge-cvae/train.py
```

The saved sample grid and Gradio app are model outputs, not hand-authored examples.

## Verified results

- Parameters: **9,504**
- Latent dimensions: **8**
- Held-out reconstruction MSE: **0.02394**
- Mean held-out KL divergence: **0.3978**
- Conditional samples evaluated: **1,000**
- Frozen-judge class fidelity: **99.90%**

Nine digit classes achieved 100% judge fidelity; digit `1` achieved 99%. Every class
had nonzero mean pixel variance across its 100 samples, ranging from 0.0066 to 0.0168.
The judge is the 2,198-parameter Tiny Vision labels-only student with 98.52% accuracy
on real held-out images, so this metric measures recognizability to that specific
classifier rather than human perceptual quality.