go-skynet/go-llama.cpp

LLama.cpp golang bindings

What it solves

This project provides Go (Golang) bindings for llama.cpp, allowing developers to integrate Large Language Model (LLM) inference capabilities directly into Go applications without needing to write C++ code.

How it works

It acts as a high-level wrapper around the llama.cpp library. To maintain performance and avoid the overhead associated with calling C functions from Go (CGO), the project keeps most of the computational heavy lifting in C/C++ code while providing a simplified Go interface for the developer.

Who it’s for

Go developers who want to run LLMs locally using the gguf file format and leverage hardware acceleration.

Highlights

  • Hardware Acceleration: Supports multiple backends including OpenBLAS, CuBLAS (NVIDIA), ROCM (AMD), OpenCL, and Metal (Apple Silicon).
  • GGUF Support: Fully compatible with the new gguf model format.
  • High-Level Interface: Designed to be simple to use while minimizing the computational cost of the CGO bridge.

Related

  • Project
  • Project
  • Project
  • Project
  • Project