add finetuning instructions
Browse files
README.md
CHANGED
|
@@ -378,6 +378,16 @@ sf.write("tts_jp.wav", waveform.cpu()[0], 24_000)
|
|
| 378 |
</tr>
|
| 379 |
</table>
|
| 380 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 381 |
## 📬 Contact
|
| 382 |
|
| 383 |
- Got questions or want to connect? [Join our Discord community](https://discord.com/invite/liquid-ai)
|
|
|
|
| 378 |
</tr>
|
| 379 |
</table>
|
| 380 |
|
| 381 |
+
## Finetuning
|
| 382 |
+
|
| 383 |
+
To finetune on your own data, make use of the `ChatMessage` interface. This requires you to:
|
| 384 |
+
|
| 385 |
+
1. map your raw dataset rows into `list[ChatMessage]`
|
| 386 |
+
2. use the [`LFM2AudioChatMapper`](src/liquid_audio/data/mapper.py) to create a preprocessed dataset
|
| 387 |
+
3. train a model from the preprocessed dataset with `LFM2DataLoader`
|
| 388 |
+
|
| 389 |
+
To finetune our Japanese model on your own data in interleaved generation mode, instantiate the `LFM2AudioChatMapper` class with `interleaved_text_tokens=6` and `interleaved_audio_tokens=9`. These values reflect the predefined Japanese interleaving ratio of 6 text tokens to 9 audio tokens, based on tokenization statistics.
|
| 390 |
+
|
| 391 |
## 📬 Contact
|
| 392 |
|
| 393 |
- Got questions or want to connect? [Join our Discord community](https://discord.com/invite/liquid-ai)
|