Sign inSign up

ascendai/ragsdk

By ascendai

•Updated 4 months ago

Image
0

2.1K

ascendai/ragsdk repository overview

⁠RAG SDK

⁠Quick Reference

⁠RAG SDK

RAG SDK is knowledge enhancement development kit for large language models. It addresses the issues of slow knowledge updates and weak domain-specific knowledge answering in large models. It provides features such as domain-specific tuning, generation enhancement, and knowledge management for large model knowledge bases, helping users build exclusive, high-performance, and accurate large model question-answering systems.

⁠Tag Naming Convention

Tags follow this pattern:

<ragsdk-version>-<chip-series>-<os>-<python-version>

FieldExample ValuesDescription
RAG SDK Version26.0.0RAG SDK version
Chip Series910, A3, atlas 300I ProTarget Atlas chip family
Operating Systemubuntu22.04, openeuler24.03Base operating system
Python Versionpy3.11Python version

⁠Version Notes

⁠RAG SDK Image Matching Table
IMAGE versionRAG SDK versionCANN version
26.0.026.0.09.0.0

⁠Quick Start

⁠How to Build

# Clone the repository on the host, enter the docker directory, select a Dockerfile for the target chip series and operating system, and replace {your_repo} with the actual image repository
git clone https://gitcode.com/Ascend/RAGSDK.git && cd RAGSDK/docker

docker build --network host -t {your_repo}/ragsdk:<ragsdk-version>-<chip-series>-<os>-<python-version> -f Dockerfile.<chip-series>.<os> .

Note

The CANN base image version is specified by the `FROM` instruction in the selected Dockerfile. Select the Dockerfile that matches the target chip series and operating system.

⁠Run RAG SDK Container

 docker run -itd --name=rag_sdk_demo --network=host \
     --device=/dev/davinci_manager \
     --device=/dev/hisi_hdc \
     --device=/dev/devmm_svm \
     --device=/dev/davinci0 \
     -v /usr/local/Ascend/driver:/usr/local/Ascend/driver:ro \
     -v /usr/local/sbin:/usr/local/sbin:ro \
     -v /path/to/model:/path/to/model:ro \
     {image-name}:{image-tag} bash
⁠Parameter Description
  • /path/to/model: Model storage directory. Place model files in this directory if you need to load models.
  • {image-name}:{image-tag}: Specify the RAG SDK image and tag to run.

⁠Enter the Container

docker exec -it rag_sdk_demo bash

⁠RAG SDK Usage

RAG SDK provides comprehensive sample code to help developers get started quickly. The sample code inside the container is located at /workspace/RAGSDK/example. You can also access the latest demo examples through the following link:

⁠Development

# Use the RAG SDK image as the base image and add user software
FROM swr.cn-south-1.myhuaweicloud.com/ascendhub/ragsdk:26.0.0-910b-ubuntu22.04-py3.11
RUN apt update -y &&
    apt install gcc ...
...

⁠Supported Hardware

Chip SeriesProduct ExamplesArchitecture
Atlas 910Atlas 800T A2, Atlas 900 A2 PoDARM64/ X86_64
Atlas A3Atlas 800T A3ARM64/ X86_64
Atlas 300I ProAtlas 300I Pro、 Atlas 300V ProARM64/ X86_64

⁠License

View the license information⁠ for RAG SDK and Mind series software included in these images. As with all container images, pre-installed packages (Python, system libraries, etc.) may be subject to their own licenses.

Tag summary

Content type

Image

Digest

sha256:4259cc71a…

Size

6.7 GB

Last updated

4 months ago

docker pull ascendai/ragsdk:26.0.0-a3-ubuntu22.04-py3.11