Kickpi-Book
  • KICKPI Document
  • K5(A133)
    • A133中文文档
      • 02-KICKPI-K5C硬件介绍
      • 02-KICKPI-K5硬件介绍
      • 10-系统镜像烧录
      • 11-SDK源码编译
      • 12-硬件功能使用说明
      • 13-硬件工厂测试
      • 20-LCD功能调试
      • 21-LRADC按键配置
      • 31-Android10.0 Tablet系统定制
      • 32-Ubuntu16.04 系统定制
      • 33-Kernel 驱动定制
      • 34-K5C主板供电
  • K2B/K2C(H618)
    • H618 English Document
      • 00-Board Function List
      • 01-Quick Start Guide
      • 02-Image Burnning
      • 03-SDK Compilation
      • 04-Hardware Factory Test
      • 13-I2C3-pcf8563rtc
      • 14-Secure Boot
      • 20-Ubuntu2204 system
      • 21-Android12.0 system customization
      • 30-Kernel defconfig configuration
      • 31-Extended pin configuration
      • 33-Linux QT application compilation environment construction
      • 44-Keybox
    • H618 中文文档
      • 02-KICKPI-K2B硬件介绍
      • 03-KICKPI-K2C硬件介绍
      • 10-系统镜像烧录
      • 11-SDK源码编译
      • 12-硬件功能使用说明
      • 13-I2C3-pcf8563rtc
      • 14-Secure Boot
      • 硬件工厂测试
      • 20-Ubuntu2204系统
      • 21-Android12.0 系统定制
      • 30-Kernel defconfig配置
      • 31-扩展引脚配置
      • QT开发环境搭建
      • 33-linux QT应用编译环境搭建
      • 44-Keybox
  • K1/K1B/K3/K8(RK356X/RK3588)
    • RK3568 English Document
      • 02-KICKPI-K1 Hardware introduction
      • 03-KICKPI-K1B Hardware Introduction
      • 04-KICKPI-K3 Hardware Introduction
      • 05-KICKPI-TX66 Hardware Introduction
      • 06-KICKPI-K8 Hardware Introduction
      • 10-System image burning
      • 11-SDK source code compilation
      • 12-Hardware function instructions
      • 13-Hardware Factory Test
      • 14-Hardware Aging Test
      • 20- Linux system customization
      • 21-Android13.0 system customization
      • 22 - Kernel driver customization
      • 30- Linux NPU YOLOV5S object detection
      • 31-Android NPU YOLOV5 object detection
      • 32-Linux Docker
      • 33-Linux QT Environment
      • 40-RK3568 LCD Configuration
      • 50 - Frequently Asked Questions
    • RK3568 中文文档
      • 01-RK芯片对比介绍
      • 02-KICKPI-K1硬件介绍
      • 03-KICKPI-K1B硬件介绍
      • 04-KICKPI-K3硬件介绍
      • 05-KICKPI-TX66硬件介绍
      • 06-KICKPI-K8硬件介绍
      • 10-系统镜像烧录
      • 11-SDK源码编译
      • 12-硬件功能使用说明
      • 13-硬件工厂测试
      • 14-硬件老化测试
      • 20-Linux系统定制
      • 21-Android13.0系统定制
      • 22-Kernel 驱动定制
      • 30-Linux NPU YOLOV5S 目标检测
      • 31-Android NPU YOLOV5 目标检测
      • 32-Linux Docker环境搭建
      • 33-Linux QT环境搭建
      • 40-RK3568 LCD配置
      • 41-固件解包和打包
      • 50-常见问题
  • K7(RK3576)
    • RK3576中文文档
      • 02-KICKPI-K7硬件介绍
      • 10-系统镜像烧录
      • 11-SDK源码编译
      • 12-硬件功能使用说明
      • 13-硬件工厂测试
      • 14-硬件老化测试
      • 20-Android系统定制
      • 21-Linux系统定制
      • 22-Kernel驱动定制
      • 23-Linux NPU YOLOV5S 目标检测
      • 24-Deepseek大模型
      • 32-Linux Docker环境搭建
      • 05-Linux_VNC远程控制
      • 41-固件解包和打包
  • K4B(T113-S3)
    • T113-S3中文文档
      • 01-KICKPI-K4B硬件介绍
      • 10-系统镜像烧录
      • 11-SDK源码编译
      • 12-硬件功能测试
      • 13-硬件工厂测试
      • LCD功能调试
      • 20-Ubuntu20.04系统定制
      • Buildroot_QT5配置
      • Buildroot系统定制
Powered by GitBook
On this page
  • 24-DeepSeek大模型
  • 一、开发环境搭建
  • RKLLM SDK 说明文档
  • RKNPU驱动
  • RKLLM-Toolkit
  • 模型下载
  • runtime下载
  • 二、部署运行
  • 板端部署环境
  • 运行测试
  • 性能分析
  1. K7(RK3576)
  2. RK3576中文文档

24-Deepseek大模型

24-DeepSeek大模型

本文将讲解如何使用 RKLLM 将提炼后的模型DeepSeek-R1-Distill-Qwen-1.5B部署到Rockchip平台,利用 NPU 进行硬件加速推理。

芯片平台:RK3576/RK3588

系统版本:Debian12/Debian11

一、开发环境搭建

RKLLM SDK 说明文档

doc
└──Rockchip_RKLLM_SDK_CN.pdf

RKNPU驱动

rknpu-driver
└──rknpu_driver_0.9.6_20240322.tar.bz2

RKLLM-Toolkit

rkllm-toolkit
├──examples
│ └── huggingface
│ └── test.py
├──packages
│ └── md5sum.txt 
│ └── rkllm_toolkit-1.0.0-cp38-cp38-linux_x86_64.whl

模型下载

runtime下载

rkllm-runtime
├──example
│ └── src
│ └── main.cpp
│ └── build-android.sh
│ └── build-linux.sh
│ └── CMakeLists.txt
│ └── Readme.md
├──runtime
│ └── Android
│ └── librkllm_api
│ └──arm64-v8a
│ └── librkllmrt.so # RKLLM Runtime 库
│ └──include
│ └── rkllm.h # Runtime 头文件
│ └── Linux
│ └── librkllm_api
│ └──aarch64
│ └── librkllmrt.so
│ └──include
│ └── rkllm.h

二、部署运行

板端部署环境

百度网盘目录:3-SoftwareData软件资料 / rk35xx-rkllm-deepseek.tar.gz

$ ls /rkllm-DeepSeek/
	DeepSeek-R1-Distill-Qwen-1.5B.rkllm
	lib/librkllmrt.so
	llm_demo

测试包说明:

DeepSeek-R1-Distill-Qwen-1.5B.rkllm 是转换后的模型

llm_demo 是编译后的llm测试程序

  • 拷贝测试包到RK3588

  • 设置环境变量

$ export LD_LIBRARY_PATH=./lib

运行测试

$ ./llm_demo DeepSeek-R1-Distill-Qwen-1.5B.rkllm 10000 10000

性能分析

对于数学问题:Solve the equations x+y=12, 2x+4y=34, find the values of x and y,RK3588 实现每秒 14.93 个令牌。

阶段
总时间(毫秒)
代币
每个令牌的时间(毫秒)
每秒令牌数

预填

429.63

81

5.30

188.53

产生

56103.71

851

66.99

14.93

export RKLLM_LOG_LEVEL=1

Last updated 19 hours ago