Energy Pocket
Energy Pocket is a compact class-conditional energy-based image model trained with persistent contrastive divergence. Positive digit examples are assigned low energy while replay-buffer negatives are refined with Langevin dynamics and pushed upward. A discriminative energy loss anchors the ten class landscapes.
The evaluation measures frozen-judge fidelity, within-class variance, quantized uniqueness, nearest-training-image distance, exact-copy rate, and the energy gap between training examples and generated samples.
Verified local result
The 17,226-parameter model reached 99.8% frozen-judge fidelity across 1,000 Langevin samples. Every quantized sample was unique, the exact training-copy rate was zero, and mean nearest-training-image MSE was 0.03345. Generated samples fell 0.38 energy units below real examples and 59.76% of pixels saturated near a boundary, a measured warning that extended Langevin descent over-optimizes this small learned landscape.
uv run python projects/energy-pocket/train.py
uv run pytest tests/test_energy_pocket.py
The Space performs actual gradient-based Langevin sampling. Local verification does not imply that the Hugging Face repository is currently deployed.