SpacemiT K1
2026-06-2014 min read

K1 AI SDK: Running ML Models on RISC-V Hardware

From Docker setup to model deployment — run ASR, vision, and LLM inference on the K1's 2 TOPS AI engine.

K1AISDKONNXMachine Learning

Overview

The SpacemiT K1 integrates 2.0 TOPS (INT8) of AI compute directly into the RISC-V CPU via custom instructions — no separate NPU. The AI SDK provides hardware-accelerated inference for ASR, vision, TTS, LLM, VLM, and more.

AI SDK Components

ASRAutomatic Speech Recognition
VisionImage classification, object detection
TTSText-to-Speech synthesis
VADVoice Activity Detection
LLMLarge Language Model inference
VLMVision-Language Model (multimodal)
VoiceprintSpeaker identification
RLReinforcement Learning inference

Platform Support

PlatformBuildrootBianbuOpenHarmony
K1SupportedSupportedNot supported
K3SupportedSupportedNot supported

Development Environment

SpacemiT provides a Docker image with all tools pre-installed. This is the recommended approach:

1. Get Docker Image

# Pull from harbor
sudo docker pull harbor.spacemit.com/spacemit-ai/spacemit-ai-sdk:latest

# Or download manually
# https://archive.spacemit.com/spacemit-ai/spacemit-ai-sdk/

2. Get SDK Source

git clone --recurse-submodules https://github.com/spacemit-com/ai-sdk.git
cd ai-sdk

3. Build

source build/envsetup.sh
# Build all components
m

# Or build individual components
cd asr && mm
cd vision && mm
cd llm && mm

Running ASR (Speech Recognition)

# Example: Offline ASR
cd output/staging
./asr_demo --model ./models/asr_model.onnx   --audio ./test.wav --lang zh

Running Vision (Image Classification)

# Example: Image classification
./vision_demo --model ./models/resnet50.onnx   --image ./test.jpg --labels ./labels.txt

Model Conversion

The SDK supports converting models from:

Quantization is handled by the SDK's built-in tools, leveraging K1's custom RISC-V vector instructions for INT8 acceleration.

Supported Frameworks

Gateway Service

The SDK includes a Python-based gateway service with HTTP/WebSocket API and a web console for managing AI models and inference endpoints. This enables:

Resources