This loads the pickle file, converts the input file to use cpu, because that is all I have, ignores persistent ids and saves the safetensor file. I used this to convert the pony embeddings to safetensor format because I couldn't use them otherwise. I worked with both pi ai and claude 3.5 to figure this out. I went as far as pi could go and feed that info and the error returns into claude and got the program that seems to work. The filenames are hard coded in the file.
This is my first try to convert pickle files to safetensor. Don't really see a need to go the other way right now.
See attached file.
New and improved now you can run the program with
python conv_pt2st.py filename.ext
This checks if the file exists, asks if you want to overwite filename.safetensor, if it exists. It complains if you try to run it without one and only one parameter.
Working on a merge tool and an info tool next.
Converting from a pickle file format to safetensor.
1
.jpeg)
1