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.
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
| ASR | Automatic Speech Recognition |
| Vision | Image classification, object detection |
| TTS | Text-to-Speech synthesis |
| VAD | Voice Activity Detection |
| LLM | Large Language Model inference |
| VLM | Vision-Language Model (multimodal) |
| Voiceprint | Speaker identification |
| RL | Reinforcement Learning inference |
Platform Support
| Platform | Buildroot | Bianbu | OpenHarmony |
|---|---|---|---|
| K1 | Supported | Supported | Not supported |
| K3 | Supported | Supported | Not 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:
- TensorFlow / Keras -> ONNX
- PyTorch -> ONNX
- ONNX -> Quantized ONNX (INT8)
Quantization is handled by the SDK's built-in tools, leveraging K1's custom RISC-V vector instructions for INT8 acceleration.
Supported Frameworks
- ONNX Runtime (with hardware acceleration)
- TensorFlow Lite
- TensorFlow
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:
- Remote model deployment
- REST API for inference
- Model versioning
- Performance monitoring