burn
burn copied to clipboard
Support importing GGUF files
I apologize if this seems too far fetched, but it seemed in line with how ONNX generation works.
If gguf contains the model graph information, then we can use what burn-import ONNX facility. In our burn-import, we convert ONNX graph to IR (intermediate representation) (see this doc). So, it would possible to convert the model graph to IR and generate source code + weights.
If gguf contains only weights, we can go burn-import pytorch route, where we only download weights.
From my brief research, GGUF format contains metadata + tensor weights. This aligns with burn-import pytorch route and not burn-import/ONNX. This will mean model needs to be constructed in Burn first and use the weights to load.
Here is one Rust lib to parse GGUF file: https://github.com/Jimexist/gguf
GGUF spec: https://github.com/ggerganov/ggml/pull/302
Parser in Rust: https://github.com/Jimexist/gguf