This repository is dedicated to the creation of a Morpheus Mistral AI Chatbot and Voice Bot, powered by the amazing Cartesia technology! This has been a super fun project, and Iโm excited to share it with you!
Morpheus AI combines the power of Mistral AI's fine-tuning capabilities with Cartesia's voice synthesis to create an interactive chatbot that can respond in a natural and engaging manner. Whether you're looking to chat or just want to hear Morpheus' voice, this project has got you covered!
morpheus_fine_tuning_script.py
: The Python script for fine-tuning the Mistral AI model.morpheus_fine_tuning_data.jsonl
: The training data in JSONL format, ready for fine-tuning.morpheus_voice_samples/
: Directory containing original MP3 files of Morpheus' voice.cartesia_cloned_voice/
: Directory containing the cloned voice files from Cartesia.
First, clone this repository to your local machine:
git clone https://github.com/your-username/morpheus-ai-fine-tuning.git
cd morpheus-ai-fine-tuning
- Go to Google Colab.
- Create a new notebook.
- In the first cell, mount your Google Drive to access the files:
from google.colab import drive
drive.mount('/content/drive')
- Navigate to the directory where you want to save the project files:
%cd /content/drive/MyDrive/path/to/project/folder
- Clone the GitHub repository in Colab:
!git clone https://github.com/your-username/morpheus-ai-fine-tuning.git
%cd morpheus-ai-fine-tuning
Run the following command to install the necessary libraries:
!pip install requests tqdm tenacity mistralai
- Copy the contents of
morpheus_fine_tuning_script.py
into a new cell in your Colab notebook. - Run the cell to execute the script.
- When prompted, enter your Mistral AI API key.
- Upload the
morpheus_fine_tuning_data.jsonl
file when requested.
The script will provide real-time updates on the fine-tuning process. Keep an eye on the output for any errors or completion messages.
The morpheus_fine_tuning_data.jsonl
file follows the Mistral AI fine-tuning format. Each line should be a valid JSON object with the following structure:
{
"messages": [
{"role": "user", "content": "User message"},
{"role": "assistant", "content": "Assistant response"}
]
}
Feel free to add more data to this file, ensuring each new entry follows the same structure!
The original Morpheus voice samples are located in the morpheus_voice_samples/
directory. The cloned voice files from Cartesia can be found in the cartesia_cloned_voice/
directory.
If you encounter any issues during the fine-tuning process, please check the following:
- Ensure your Mistral AI API key is valid and has sufficient credits.
- Verify that the JSONL file is correctly formatted and follows Mistral AI's guidelines.
- Check your internet connection, as the process requires a stable connection to communicate with the Mistral AI API.
For any persistent issues, please open an issue in this GitHub repository, and I'll be happy to help!
If you'd like to contribute to this project, please fork the repository and submit a pull request with your proposed changes. Your contributions are welcome!