Instructions to use saheedniyi/YarnGPT2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saheedniyi/YarnGPT2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-to-speech", model="saheedniyi/YarnGPT2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("saheedniyi/YarnGPT2") model = AutoModelForCausalLM.from_pretrained("saheedniyi/YarnGPT2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -25,7 +25,7 @@ pipeline_tag: text-to-speech
|
|
| 25 |
|
| 26 |
## Model Summary
|
| 27 |
|
| 28 |
-
YarnGPT2 is a text-to-speech (TTS) model designed to
|
| 29 |
|
| 30 |
<video controls width="600">
|
| 31 |
<source src="https://huggingface.co/saheedniyi/YarnGPT/resolve/main/audio/YearnGPT.mp4" type="video/mp4">
|
|
@@ -33,11 +33,11 @@ YarnGPT2 is a text-to-speech (TTS) model designed to synthesize Nigerian-accente
|
|
| 33 |
</video>
|
| 34 |
|
| 35 |
#### How to use (Colab)
|
| 36 |
-
The model can generate audio on its own but
|
| 37 |
|
| 38 |
-
##### Voices (arranged in order of
|
| 39 |
-
- English:
|
| 40 |
-
- Yoruba: yoruba_male2, yoruba_female2,
|
| 41 |
- Igbo: igbo_female2, igbo_male2,igbo_female1,
|
| 42 |
- Hausa: hausa_feamle1,hausa_female2, hausa_male2,hausa_male1
|
| 43 |
|
|
@@ -93,7 +93,7 @@ output = model.generate(
|
|
| 93 |
temperature=0.1,
|
| 94 |
repetition_penalty=1.1,
|
| 95 |
max_length=4000,
|
| 96 |
-
#num_beams=5,# using a beam size helps for the local languages but not
|
| 97 |
)
|
| 98 |
|
| 99 |
codes=audio_tokenizer.get_codes(output)
|
|
@@ -242,7 +242,7 @@ Trained on a dataset of publicly available Nigerian movies, podcasts ( using the
|
|
| 242 |
|
| 243 |
#### Preprocessing
|
| 244 |
|
| 245 |
-
Audio files were preprocessed and resampled to
|
| 246 |
|
| 247 |
#### Training Hyperparameters
|
| 248 |
- **Number of epochs:** 5
|
|
@@ -253,14 +253,14 @@ Audio files were preprocessed and resampled to 24Khz and tokenized using [wavtok
|
|
| 253 |
|
| 254 |
#### Hardware
|
| 255 |
|
| 256 |
-
- **GPUs:** 1 A100 (
|
| 257 |
|
| 258 |
#### Software
|
| 259 |
|
| 260 |
- **Training Framework:** Pytorch
|
| 261 |
|
| 262 |
## Future Improvements?
|
| 263 |
-
- Scaling up model size and human-
|
| 264 |
- Wrap the model around an API endpoint
|
| 265 |
- Voice cloning.
|
| 266 |
- Potential expansion into speech-to-speech assistant models
|
|
|
|
| 25 |
|
| 26 |
## Model Summary
|
| 27 |
|
| 28 |
+
YarnGPT2 is a text-to-speech (TTS) model designed to synthesise Nigerian-accented Languages (yoruba, igbo, hausa and english) leveraging pure language modelling without external adapters or complex architectures, offering high-quality, natural, and culturally relevant speech synthesis for diverse applications.
|
| 29 |
|
| 30 |
<video controls width="600">
|
| 31 |
<source src="https://huggingface.co/saheedniyi/YarnGPT/resolve/main/audio/YearnGPT.mp4" type="video/mp4">
|
|
|
|
| 33 |
</video>
|
| 34 |
|
| 35 |
#### How to use (Colab)
|
| 36 |
+
The model can generate audio on its own, but it's better to use a voice to prompt the model:
|
| 37 |
|
| 38 |
+
##### Voices (arranged in order of performance and stability)
|
| 39 |
+
- English: Idera, Chinenye, Jude, Emma, Umar, Joke, Zainab, Osagie, Remi, Tayo
|
| 40 |
+
- Yoruba: yoruba_male2, yoruba_female2, yoruba_female1
|
| 41 |
- Igbo: igbo_female2, igbo_male2,igbo_female1,
|
| 42 |
- Hausa: hausa_feamle1,hausa_female2, hausa_male2,hausa_male1
|
| 43 |
|
|
|
|
| 93 |
temperature=0.1,
|
| 94 |
repetition_penalty=1.1,
|
| 95 |
max_length=4000,
|
| 96 |
+
#num_beams=5,# using a beam size helps for the local languages but not English
|
| 97 |
)
|
| 98 |
|
| 99 |
codes=audio_tokenizer.get_codes(output)
|
|
|
|
| 242 |
|
| 243 |
#### Preprocessing
|
| 244 |
|
| 245 |
+
Audio files were preprocessed and resampled to 24KHz and tokenized using [wavtokenizer](https://huggingface.co/novateur/WavTokenizer).
|
| 246 |
|
| 247 |
#### Training Hyperparameters
|
| 248 |
- **Number of epochs:** 5
|
|
|
|
| 253 |
|
| 254 |
#### Hardware
|
| 255 |
|
| 256 |
+
- **GPUs:** 1 A100 (Google Colab: 50 hours)
|
| 257 |
|
| 258 |
#### Software
|
| 259 |
|
| 260 |
- **Training Framework:** Pytorch
|
| 261 |
|
| 262 |
## Future Improvements?
|
| 263 |
+
- Scaling up model size and human-annotated/ reviewed training data
|
| 264 |
- Wrap the model around an API endpoint
|
| 265 |
- Voice cloning.
|
| 266 |
- Potential expansion into speech-to-speech assistant models
|