Jacob Garcia · Hugging Face Model Foundry
Glyph Forge Cvae
Interactive conditional digit generator. This showcase backs up the trained artifacts, measured evaluation, and complete runnable source.
Verified project card
# 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.
Evaluation snapshot
{
"model": "GlyphForge Conditional VAE",
"parameters": 9504,
"latent_dimensions": 8,
"best_epoch": 158,
"test": {
"reconstruction_mse": 0.023938464456134373,
"mean_kl": 0.3978222034595631,
"examples": 270
},
"generation": {
"judge_accuracy": 0.9990000128746033,
"judge_accuracy_by_class": {
"0": 1.0,
"1": 0.9900000095367432,
"2": 1.0,
"3": 1.0,
"4": 1.0,
"5": 1.0,
"6": 1.0,
"7": 1.0,
"8": 1.0,
"9": 1.0
},
"mean_pixel_variance_by_class": {
"0": 0.0066222199238836765,
"1": 0.01683112047612667,
"2": 0.012290791608393192,
"3": 0.010615515522658825,
"4": 0.011259874328970909,
"5": 0.011659887619316578,
"6": 0.010034985840320587,
"7": 0.012352265417575836,
"8": 0.011395774781703949,
"9": 0.011373817920684814
},
"samples": 1000
},
"judge": "Tiny Vision labels-only student, 98.52% real-image test accuracy"
}
Backed-up artifact tree
README.md__pycache__/app.cpython-311.pyc__pycache__/model.cpython-311.pycapp.pyartifacts/glyph-forge-cvae/evaluation.jsonartifacts/glyph-forge-cvae/model.safetensorsartifacts/glyph-forge-cvae/samples.pngmodel.pyrequirements.txttrain.py