Converting .pth files
Hello, I found a fine-tuned model to handle French : https://huggingface.co/Snowad/French-Tortoise , but the files are in Torch format. Is there any way to convert it to ggml's format ?
Yeah I'll publish those scripts in the next few days. Let me know if you decide to publish the converted files for the french model and I can link to them in the readme.
I'm also going to try converting it myself out of curiosity.
I'd be keen to try the result, as a French speaker
hi @balisujohn can you provide script to convert tortoise to ggml format, thank you
hi @balisujohn can you provide script to convert tortoise to ggml format, thank you
`import torch import numpy as np
voice = "your_voice.pth" # Replace with your actual file path
pth_file = torch.load(voice, map_location=torch.device('cpu'))
tensor_to_convert = pth_file[0] numpy_array = tensor_to_convert.numpy()
file_path = voice.replace('.pth', '.bin')
Save NumPy array as binary file
numpy_array.tofile(file_path)
exit()`