A Go inference engine for sparse mixture-of-experts models, including DeepSeek V4 Flash, ported from antirez's C implementation. It provides a command-line chat client and an OpenAI-compatible API server, with CPU, CUDA and Vulkan backends. Metal support is experimental.
The default build has no mandatory C/C++ runtime dependency. Model weights are memory-mapped rather than copied into a separate loading buffer.
The inference pipeline reads model weights from disk through memory mapping and runs attention and expert layers using the selected compute backend. CPU execution uses SIMD kernels; GPU backends handle supported operations on the device. The command-line client and HTTP server share this inference engine.
SIMD matrix operations for CPU inference, including work shared with go-pherence.
CUDA and Vulkan compute paths, with experimental Metal support.
Inference support for mixture-of-experts models, including DeepSeek V4 Flash.
A /v1/chat/completions server with streaming.
Build the CLI with go build ./cmd/ds4chat, without a mandatory C/C++ runtime.
Accesses model weights through memory mapping; inference still needs to read the required pages from storage.