Upload folder using huggingface_hub
Browse files- .gitattributes +4 -0
- README.md +52 -0
- config.json +49 -0
- generation_config.json +4 -0
- onnx/conditional_decoder_q4f16.onnx +3 -0
- onnx/conditional_decoder_q4f16.onnx_data +3 -0
- onnx/embed_tokens_q4f16.onnx +3 -0
- onnx/embed_tokens_q4f16.onnx_data +3 -0
- onnx/language_model_q4f16.onnx +3 -0
- onnx/language_model_q4f16.onnx_data +3 -0
- onnx/speech_encoder_q4f16.onnx +3 -0
- onnx/speech_encoder_q4f16.onnx_data +3 -0
- preprocessor_config.json +5 -0
- tokenizer.json +0 -0
- tokenizer_config.json +15 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
onnx/conditional_decoder_q4f16.onnx_data filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
onnx/embed_tokens_q4f16.onnx_data filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
onnx/language_model_q4f16.onnx_data filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
onnx/speech_encoder_q4f16.onnx_data filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: ResembleAI/chatterbox-turbo-ONNX
|
| 4 |
+
tags:
|
| 5 |
+
- text-to-speech
|
| 6 |
+
- tts
|
| 7 |
+
- onnx
|
| 8 |
+
- webgpu
|
| 9 |
+
- transformers.js
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# Chatterbox Turbo - WebGPU Compatible
|
| 13 |
+
|
| 14 |
+
This is a WebGPU-compatible version of [ResembleAI/chatterbox-turbo-ONNX](https://huggingface.co/ResembleAI/chatterbox-turbo-ONNX).
|
| 15 |
+
|
| 16 |
+
## Changes from Original
|
| 17 |
+
|
| 18 |
+
The original model contains `int64` Cast operations and tensors that WebGPU cannot execute.
|
| 19 |
+
This version converts all `int64` operations to `int32`, enabling direct WebGPU inference.
|
| 20 |
+
|
| 21 |
+
### Modifications Made:
|
| 22 |
+
- **speech_encoder**: 26 Cast ops, 36 initializers, 1 I/O type converted
|
| 23 |
+
- **conditional_decoder**: 3 Cast ops, 37 initializers, 1 I/O type converted
|
| 24 |
+
- **language_model**: 2 I/O types converted
|
| 25 |
+
- **embed_tokens**: 5 initializers, 1 I/O type converted
|
| 26 |
+
|
| 27 |
+
## Usage with Transformers.js
|
| 28 |
+
|
| 29 |
+
```javascript
|
| 30 |
+
import { AutoModel, AutoProcessor } from '@huggingface/transformers';
|
| 31 |
+
|
| 32 |
+
const model = await AutoModel.from_pretrained('spacekaren/chatterbox-turbo-webgpu', {
|
| 33 |
+
device: 'webgpu',
|
| 34 |
+
dtype: 'q4f16',
|
| 35 |
+
});
|
| 36 |
+
|
| 37 |
+
const processor = await AutoProcessor.from_pretrained('spacekaren/chatterbox-turbo-webgpu');
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
## Model Size
|
| 41 |
+
|
| 42 |
+
- **Total**: ~539 MB (q4f16 quantization)
|
| 43 |
+
- Same architecture as original, just int64→int32 conversion
|
| 44 |
+
|
| 45 |
+
## License
|
| 46 |
+
|
| 47 |
+
MIT (same as original)
|
| 48 |
+
|
| 49 |
+
## Credits
|
| 50 |
+
|
| 51 |
+
- Original model: [ResembleAI/chatterbox-turbo-ONNX](https://huggingface.co/ResembleAI/chatterbox-turbo-ONNX)
|
| 52 |
+
- Conversion script: [local.core/scripts/convert_int64_to_int32.py](https://github.com/anthropics/lama)
|
config.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_type": "chatterbox",
|
| 3 |
+
"text_config": {
|
| 4 |
+
"activation_function": "gelu_new",
|
| 5 |
+
"architectures": [
|
| 6 |
+
"GPT2LMHeadModel"
|
| 7 |
+
],
|
| 8 |
+
"attn_pdrop": 0.1,
|
| 9 |
+
"bos_token_id": 50256,
|
| 10 |
+
"embd_pdrop": 0.1,
|
| 11 |
+
"eos_token_id": 50256,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"layer_norm_epsilon": 1e-05,
|
| 14 |
+
"model_type": "gpt2",
|
| 15 |
+
"n_ctx": 8196,
|
| 16 |
+
"n_embd": 1024,
|
| 17 |
+
"n_head": 16,
|
| 18 |
+
"n_inner": null,
|
| 19 |
+
"n_layer": 24,
|
| 20 |
+
"n_positions": 8196,
|
| 21 |
+
"n_special": 0,
|
| 22 |
+
"predict_special_tokens": true,
|
| 23 |
+
"reorder_and_upcast_attn": false,
|
| 24 |
+
"resid_pdrop": 0.1,
|
| 25 |
+
"scale_attn_by_inverse_layer_idx": false,
|
| 26 |
+
"scale_attn_weights": true,
|
| 27 |
+
"summary_activation": null,
|
| 28 |
+
"summary_first_dropout": 0.1,
|
| 29 |
+
"summary_proj_to_labels": true,
|
| 30 |
+
"summary_type": "cls_index",
|
| 31 |
+
"summary_use_proj": true,
|
| 32 |
+
"task_specific_params": {
|
| 33 |
+
"text-generation": {
|
| 34 |
+
"do_sample": true,
|
| 35 |
+
"max_length": 50
|
| 36 |
+
}
|
| 37 |
+
},
|
| 38 |
+
"transformers_version": "5.0.0.dev0",
|
| 39 |
+
"use_cache": true,
|
| 40 |
+
"vocab_size": 6563
|
| 41 |
+
},
|
| 42 |
+
"transformers.js_config": {
|
| 43 |
+
"use_external_data_format": true,
|
| 44 |
+
"kv_cache_dtype": {
|
| 45 |
+
"fp16": "float16",
|
| 46 |
+
"q4f16": "float16"
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"eos_token_id": 6562,
|
| 3 |
+
"repetition_penalty": 1.2
|
| 4 |
+
}
|
onnx/conditional_decoder_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22572a6001425d5d067a78902472a26f5f585b39ec5ce4d9743f0bebcc6503e0
|
| 3 |
+
size 2393626
|
onnx/conditional_decoder_q4f16.onnx_data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3e53cc7cc05e72957797c620e1bf0c6d6b909df937de4756c6e534d50854ca3e
|
| 3 |
+
size 162996136
|
onnx/embed_tokens_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4135269ccfadaa5e084cec0ccbbd8d16a22121e0b3da771420df0644455f24ef
|
| 3 |
+
size 2528
|
onnx/embed_tokens_q4f16.onnx_data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37e96447b5f3ef46f46fb35cc599cfcb95b277e5528cc0c89bab78169da620ef
|
| 3 |
+
size 33648688
|
onnx/language_model_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:37573106c17cee1fd1af841b7cf39dc6ecfe65c7331380a90cb97e3a76002972
|
| 3 |
+
size 276803
|
onnx/language_model_q4f16.onnx_data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f084f21f977e365e76e622d2958c309ff894537f7b7133ac7fc5ce8fc055d6f9
|
| 3 |
+
size 183981430
|
onnx/speech_encoder_q4f16.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:52d6d01762a013c4e2e17c31717e638c45ab869b2be7d7aac1b4be54b2f9cbef
|
| 3 |
+
size 1217363
|
onnx/speech_encoder_q4f16.onnx_data
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c017ab57887418e0609afdef52b0cbc17f43cb304e78af44300c0292cd2b2fa9
|
| 3 |
+
size 177289008
|
preprocessor_config.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"feature_extractor_type": "ChatterboxFeatureExtractor",
|
| 3 |
+
"processor_class": "ChatterboxProcessor",
|
| 4 |
+
"sampling_rate": 24000
|
| 5 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"additional_special_tokens": null,
|
| 4 |
+
"backend": "tokenizers",
|
| 5 |
+
"bos_token": "<|endoftext|>",
|
| 6 |
+
"clean_up_tokenization_spaces": false,
|
| 7 |
+
"eos_token": "<|endoftext|>",
|
| 8 |
+
"errors": "replace",
|
| 9 |
+
"is_local": false,
|
| 10 |
+
"model_max_length": 1024,
|
| 11 |
+
"model_specific_special_tokens": {},
|
| 12 |
+
"pad_token": "<|endoftext|>",
|
| 13 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 14 |
+
"unk_token": "<|endoftext|>"
|
| 15 |
+
}
|