Phonon 31M weights converted for WebGPU (int8, from gradium/phonon-31m-en@92741c5)
Browse files- README.md +36 -0
- phonon-31m-en.int8.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
base_model: gradium/phonon-31m-en
|
| 6 |
+
pipeline_tag: text-to-speech
|
| 7 |
+
tags:
|
| 8 |
+
- text-to-speech
|
| 9 |
+
- webgpu
|
| 10 |
+
- phonon
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Phonon 31M for WebGPU
|
| 14 |
+
|
| 15 |
+
This repository holds one file, `phonon-31m-en.int8.bin`: the weights of [gradium/phonon-31m-en](https://huggingface.co/gradium/phonon-31m-en) at revision `92741c5b07d085ff840e26fea8ce43110b87852f`, converted for [blixt/phonon](https://github.com/blixt/phonon), a WebGPU runtime that runs the model in the browser. A browser downloads this 43.7 MB file in place of the 103 MB checkpoint.
|
| 16 |
+
|
| 17 |
+
The model is by [Gradium](https://gradium.ai). Gradium did not make this conversion. The weights stay under the Apache License 2.0.
|
| 18 |
+
|
| 19 |
+
## What the conversion does
|
| 20 |
+
|
| 21 |
+
- Tensors with 16,384 values or more become int8, with one f16 scale for each 32 values (scale = max |value| / 127, values rounded to f16 first, quantized values rounded half to even). All other tensors are f16.
|
| 22 |
+
- The rows of q and k move from interleaved rotary pairs to halves in each head.
|
| 23 |
+
- The flow head's time embedding for its one step is added to the bias of `cond_embed`.
|
| 24 |
+
- The codec's latent projection is merged into its upsampling weights, and its layer scales into the weights they scale.
|
| 25 |
+
- Convolution weights are reordered so that each output gathers its inputs.
|
| 26 |
+
|
| 27 |
+
The file starts with a JSON header (each tensor's offset, length and scale offset, and the vectors the speed control needs), followed by the vectors and the weights. `packModel` and `unpackModel` in [src/checkpoint.ts](https://github.com/blixt/phonon/blob/main/src/checkpoint.ts) write and read it.
|
| 28 |
+
|
| 29 |
+
## Rebuild it
|
| 30 |
+
|
| 31 |
+
```sh
|
| 32 |
+
git clone https://github.com/blixt/phonon && cd phonon && npm install
|
| 33 |
+
npm run build-weights -- path/to/gradium/phonon-31m-en/model.safetensors phonon-31m-en.int8.bin
|
| 34 |
+
shasum -a 256 phonon-31m-en.int8.bin
|
| 35 |
+
# 94f9899fe623251260f30892db8356c7293da09196dc9df9c3c4bb1ddc4f5a85
|
| 36 |
+
```
|
phonon-31m-en.int8.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94f9899fe623251260f30892db8356c7293da09196dc9df9c3c4bb1ddc4f5a85
|
| 3 |
+
size 43690044
|