DALL路E Mini weights for the browser
These are the DALL路E Mini model and its VQGAN as fp16 safetensors. They're used by dalle-js, which runs them entirely in the browser on WebGPU with jax-js. You can try it at https://www.lieric.com/dalle.
| File | Contents |
|---|---|
encoder.q8.safetensors, decoder.q8.safetensors, detoker.q8.safetensors |
int8 versions of the three files below (465 MB in total instead of 925), used by the site |
encoder.f16.safetensors |
BART text encoder: 12 layers, 1024 dims |
decoder.f16.safetensors |
BART image decoder: 12 layers, image vocabulary of 16,384 |
detoker.f16.safetensors |
VQGAN decoder (16脳16 tokens to 256脳256 pixels); run it in float32 |
vocab.json, merges.txt |
BPE tokenizer |
config.json |
model dimensions |
preview_head.safetensors |
linear map from the VQGAN's mid-block features to 16脳16 preview colors, trained for dalle-js |
token_colors.bin |
average RGB color of each image token (16384 脳 3 uint8), trained for dalle-js |
Where they come from
The weights are from DALL路E Mini by Boris Dayma et al.
(Apache-2.0) and its VQGAN, in the
PyTorch form packaged by min-dalle (Brett Kuprel). The
conversion is python/convert.py in dalle-js. Tensors keep PyTorch names and layout, and the LayerNorm
scales the checkpoints omit (Flax use_scale=False) are written out as ones. The transformer
checkpoints were already fp16, so those files are exact. The VQGAN weights are rounded from fp32.
int8 files
The *.q8.safetensors files store large matrices as int8 with one float32 scale per row
(<name>.scale; dequantize as q * scale[:, None]). The VQGAN's conv kernels use one scale per
output channel, and small tensors stay fp16. Compared with the fp32 model, teacher-forced over 256
decoder steps, int8 moves 5% of the sampling probability per step on average. The model picks the same
top token 236 times out of 256, and the VQGAN image comes out at 49 dB PSNR. fp16 compute alone moves
2.7% per step. The script is python/quantize.py in dalle-js.
- Downloads last month
- 67