Skip to content

schineaj23/magnet.cpp

Repository files navigation

magnet.cpp

Implementation of MAGNeT (Masked Audio Generation using a Single Non-Autoregressive Transformer) in C++ with the tensor library GGML This is a work in progress and not considered production-stable. This project was inspired by encodec.cpp. Model architecture

Usage

Get the weights

Download MAGNeT's weights from huggingface and convert them into the GGUF format. Ensure that you have the state_dict.bin as this is MAGNeT's model. Note that compression_dict.bin is the state dict for EnCodec.

python convert.py --dir-model=/path/to/hf/weights --out-dir=/path/to/gguf/weights

Get the code

git clone --recurse-submodules https://github.com/schineaj23/magnet.cpp.git

Build from source

mkdir build
cd build
cmake ..
make

Run the executable

magnet /path/to/gguf/weights

Roadmap

  • Inference in FP32
  • FP8/INT8 Quantization

About

MAGNeT implementation in C++

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published