ggerganov / ggml

Tensor library for machine learning

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Automatically convert pytorch model to ggml

Maknee opened this issue · comments

Is there a way to automatically convert any pytorch model and its functionality to gguf format + ggml framework? Has anyone worked on such a feature?

I think what should exist is documentation of the functions in ggml and their equivalents in PyTorch, and then each person can figure out how to port any model. The above is more realistic than creating a program that magically reads an entire PyTorch project and converts the models into a ggml executable and gguf model.

This is surprisingly non trivial because pytorch models often have a variable computational graph defined at runtime based on conditional logic.

This is surprisingly non trivial because pytorch models often have a variable computational graph defined at runtime based on conditional logic.

Interesting. How does onnx handle variable computation graphs?

commented

How about .onnx model? Is there any way can convert .onnx model to gguf format automatically?