Shadow0482 commited on
Commit
b0c4c1b
·
verified ·
1 Parent(s): 30f3e2a

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +16 -30
README.md CHANGED
@@ -1,11 +1,10 @@
1
- # Supertonic – FP16 vs INT8 Quantized Benchmark (by Shadow0482)
2
 
3
  This README documents a simple benchmark comparing **FP16** and **INT8** quantized
4
  versions of the [Supertonic](https://huggingface.co/Supertone/supertonic) TTS
5
  pipeline using the quantized models hosted at:
6
 
7
  - Quantized models repo: **Shadow0482/supertonic-quantized**
8
- - This model card: **Shadow0482/supertonic-quantized**
9
 
10
  All tests were run in Google Colab on CPU using the official `py/example_onnx.py`
11
  script from the Supertonic GitHub repository.
@@ -22,11 +21,10 @@ The same text was used for both FP16 and INT8 runs:
22
 
23
  ## Results
24
 
25
- | Variant | Precision | ONNX directory | Time (s) | Output WAV | Status |
26
- |--------:|-----------|-----------------------|---------:|----------------------------------|--------|
27
- | FP16 | float16 | `onnx_fp16/` | 0.289 | `NONE` | FAILED |
28
- | INT8 | int8 | `onnx_int8/` | 0.248 | `NONE` | FAILED |
29
-
30
 
31
 
32
  > Note:
@@ -36,45 +34,33 @@ The same text was used for both FP16 and INT8 runs:
36
 
37
  ---
38
 
39
- ## How to reproduce this benchmark
40
-
41
- In a fresh Colab notebook:
42
 
43
- 1. Install dependencies and run the benchmark cell (the one that created this README).
44
- 2. Make sure you have write access to both:
45
- - `Shadow0482/supertonic`
46
- - `Shadow0482/supertonic-quantized`
47
-
48
- The core of the benchmark is simply:
 
 
49
 
50
  ```bash
51
  python py/example_onnx.py \
52
  --onnx-dir onnx_fp16 \
53
  --voice-style assets/voice_styles/M1.json \
54
- --text "... your test text ..." \
55
  --n-test 1 \
56
  --save-dir results_fp16
57
 
58
  python py/example_onnx.py \
59
  --onnx-dir onnx_int8 \
60
  --voice-style assets/voice_styles/M1.json \
61
- --text "... the same test text ..." \
62
  --n-test 1 \
63
  --save-dir results_int8
64
  ````
65
 
66
- Where `onnx_fp16/` and `onnx_int8/` contain drop-in copies of the original
67
- Supertonic ONNX files, but converted/quantized to FP16 or INT8 respectively.
68
-
69
- ---
70
-
71
- ## Model notes
72
-
73
- * **FP16** models are converted from the original FP32 weights using float16 conversion.
74
- * **INT8** models are dynamically quantized (MatMul/Gemm) using ONNX Runtime.
75
- * The quantized models live in `{QUANT_REPO_ID}` and can be plugged into the
76
- Supertonic pipeline via the `--onnx-dir` argument in `example_onnx.py`.
77
-
78
  ---
79
 
80
  ## License
 
1
+ # Supertonic – FP16 vs INT8 Quantized Benchmark (Shadow0482)
2
 
3
  This README documents a simple benchmark comparing **FP16** and **INT8** quantized
4
  versions of the [Supertonic](https://huggingface.co/Supertone/supertonic) TTS
5
  pipeline using the quantized models hosted at:
6
 
7
  - Quantized models repo: **Shadow0482/supertonic-quantized**
 
8
 
9
  All tests were run in Google Colab on CPU using the official `py/example_onnx.py`
10
  script from the Supertonic GitHub repository.
 
21
 
22
  ## Results
23
 
24
+ | Variant | Precision | ONNX directory | Time (s) | Output WAV | Status |
25
+ |--------:|-----------|----------------|---------:|-----------:|--------|
26
+ | FP16 | float16 | `onnx_fp16/` | 0.914 | `NONE` | FAILED |
27
+ | INT8 | int8 | `onnx_int8/` | 6.644 | `Greetings__You_are_l_1.wav` | OK |
 
28
 
29
 
30
  > Note:
 
34
 
35
  ---
36
 
37
+ ## How this benchmark was run
 
 
38
 
39
+ 1. Clone the official Supertonic repository and download its assets (configs + voice styles).
40
+ 2. Download `Shadow0482/supertonic-quantized` and copy:
41
+ - `fp16/*.fp16.onnx` → `onnx_fp16/*.onnx`
42
+ - `int8_dynamic/*.int8.onnx` → `onnx_int8/*.onnx`
43
+ 3. Copy configuration files:
44
+ - `assets/configs/*.json`
45
+ - `assets/onnx/tts.json`, `assets/onnx/unicode_indexer.json`
46
+ 4. Run:
47
 
48
  ```bash
49
  python py/example_onnx.py \
50
  --onnx-dir onnx_fp16 \
51
  --voice-style assets/voice_styles/M1.json \
52
+ --text "..." \
53
  --n-test 1 \
54
  --save-dir results_fp16
55
 
56
  python py/example_onnx.py \
57
  --onnx-dir onnx_int8 \
58
  --voice-style assets/voice_styles/M1.json \
59
+ --text "..." \
60
  --n-test 1 \
61
  --save-dir results_int8
62
  ````
63
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  ---
65
 
66
  ## License