whatisgithub

What is spark-moe?

alfons-fhl/spark-moe — explained in plain English

Analysis updated 2026-07-23 · repo last pushed 2026-07-15

CAudience · developerComplexity · 5/5ActiveSetup · hard

In one sentence

A custom C and CUDA inference engine that runs the massive GLM-5.2 AI model on a single NVIDIA DGX Spark desktop, exposing an OpenAI-compatible API for local chat, text, and embedding requests.

Mindmap

mindmap
  root((repo))
    What it does
      Runs large AI model locally
      OpenAI-compatible API
      Chat and text completions
      Embeddings endpoint
    Tech stack
      C language
      CUDA kernels
      Docker support
      NVFP4 compression
    Hardware
      NVIDIA DGX Spark
      GB10 chip
      ASUS Ascent GX10
      262K token context
    Use cases
      Local chatbot prototype
      Agent pipeline testing
      API integration testing
      Stub fallback mode
    Audience
      Developers with DGX Spark
      Researchers
      Small teams
  

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Host a large AI chatbot on a DGX Spark and point existing OpenAI-compatible client code at it.

USE CASE 2

Build and test an agent pipeline locally without relying on a cloud provider.

USE CASE 3

Test API integration logic using the stub fallback mode when the full GPU or model isn't available.

USE CASE 4

Generate text completions and embeddings locally via a familiar API.

What is it built with?

CCUDADockerNVFP4

How does it compare?

alfons-fhl/spark-moeac000/find-flvacc4github/kdenlive-omnifade
Stars0
LanguageCCC
Last pushed2026-07-152013-04-05
MaintenanceActiveDormant
Setup difficultyhardmoderatemoderate
Complexity5/52/52/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Requires a specific NVIDIA DGX Spark desktop with a GB10 chip and roughly 433 GiB of model file downloads.

So what is it?

spark-moe lets you run a massive AI language model, GLM-5.2, on a single NVIDIA DGX Spark desktop system, and then talk to it through a familiar API. Instead of needing a whole rack of servers, you download roughly 433 GiB of model files, build the engine, and start a local web service that speaks the same protocol as OpenAI's API. Under the hood, the project is a custom inference engine written in C with CUDA kernels tailored to the DGX Spark's specific chip (the GB10). It loads the model in a compressed format called NVFP4 to fit within the hardware's memory, manages a very large conversation context window (up to 262,144 tokens), and exposes endpoints for chat completions, text completions, and embeddings. You can run it directly or inside a Docker container, and the provided scripts handle downloading, building, testing, and serving. This is for developers or researchers who already own or have access to an NVIDIA DGX Spark (specifically the ASUS Ascent GX10 variant) and want to run a large, cutting-edge model locally without relying on a cloud provider. A concrete use case would be a small team building a prototype chatbot or agent pipeline: they could host this on their Spark box, point their existing OpenAI-compatible client code at it, and test against a powerful local model. The project also includes a "stub" fallback mode, suggesting it can be useful for testing API integration logic even when the full model or GPU isn't present. The notable tradeoff here is the tight hardware coupling. The entire engine and its CUDA kernels are purpose-built for the DGX Spark's architecture, meaning this isn't a general-purpose tool you can deploy on just any machine with a graphics card. It is an optimization play, sacrificing portability to squeeze enough performance out of one specific piece of hardware to run a model that would normally require much larger infrastructure. The README does not go into detail on the model's benchmark performance or accuracy compared to other formats.

Copy-paste prompts

Prompt 1
I have an NVIDIA DGX Spark and want to run GLM-5.2 locally. Walk me through downloading the model files, building the spark-moe engine, and starting the OpenAI-compatible API server step by step.
Prompt 2
Help me configure my existing OpenAI Python client to point at a local spark-moe server running on my DGX Spark instead of the OpenAI cloud API.
Prompt 3
I want to use the stub fallback mode in spark-moe to test my chatbot API integration logic without the full model downloaded. Show me how to start the server in stub mode and send a test chat completion request.
Prompt 4
Explain how spark-moe uses NVFP4 compression to fit a 433 GiB model into the DGX Spark's memory and what tradeoffs that involves for accuracy and speed.

Frequently asked questions

What is spark-moe?

A custom C and CUDA inference engine that runs the massive GLM-5.2 AI model on a single NVIDIA DGX Spark desktop, exposing an OpenAI-compatible API for local chat, text, and embedding requests.

What language is spark-moe written in?

Mainly C. The stack also includes C, CUDA, Docker.

Is spark-moe actively maintained?

Active — commit in last 30 days (last push 2026-07-15).

How hard is spark-moe to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is spark-moe for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.