数据准备
准备知识库数据,用户可根据脚本选择数据切分粒度及知识库大小。
- 进入KunpengRAG仓库进入到test-utils/performance-test的data-preparation目录
git clone --branch v2.0.0 https://gitee.com/kunpeng_compute/KunpengRAG.git cd KunpengRAG/test-utils/performance-test/data-preparation
- 下载中文语料库(json文件),语料库链接。
- 使用pyhthon运行cute_file.py脚本,运行前用户需要自行配置以下参数。
input_file = "wiki_pretrain_part1.json" # 输入的 .json 文件路径(注意是普通 JSON 数组) output_prefix = "output_chunk_" # 输出文件前缀 chunk_size = 1000 # 每个文件最多保存多少条 text output_dir = "your_store_path" # 输出文件夹路径 max_chunks = 100 # 最多生成多少个文件(防止无限生成)
- 完成中文语料库数据准备。
父主题: 性能测试