MLGO is tensor library for machine learning in pure Golang that can run on MIPS.
The machine learning part of this project refers to the legendary ggml.cpp framework.
pip install -r requirements.txt
See examples/linear_model/
-
Export the AI model into ONNX
-
Use
./scripts/convert_onnx_to_ggml.py
to convert ONNX to ggmlpython3 ./scripts/convert_onnx_to_ggml.py ./examples/linear_model/onnx/simple_model.onnx ./examples/linear_model/ggml/simple_model.bin
-
Run
code_generator.py
to generate/dist/simple_model.go
mkdir dist python3 ./scripts/code_generator.py
-
Run following command to check this model work
go run ./dist/simple_model.go