Downloads · 30 days
0
zhenaaa3/yingjibisai
yingjibisai is a machine learning model from zhenaaa3. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
- Python 3.x - CUDA 支持的 GPU - 已安装 vLLM 和相关依赖
Downloads · 30 days
0
Access
Public
Updated Nov 17, 2025
Repo size
34.4 GB
Likes
0
Public
Click a slice to open those files.
.safetensors34 GB · 99%
From the Hugging Face model README
启动 vLLM 服务
bash vllm.sh
该脚本会启动 vLLM 服务,使用 ../models/ckpt-best 模型,服务运行在 http://localhost:8000
运行主程序
bash run.sh 政务
该脚本会运行 main.py,处理政务任务并生成结果文件 result.csv
如果需要切换到应急任务,需要执行以下步骤:
修改 vllm.sh 中的模型路径
将 vllm.sh 中的模型路径从 ckpt-best 改为 ckpt-best-beta:
# 原路径
vllm serve ../models/ckpt-best \
# 修改为
vllm serve ../models/ckpt-best-beta \
启动 vLLM 服务
bash vllm.sh 政务
运行主程序(传递"应急"关键字)
bash run.sh 应急
run.sh 之前,vllm.sh 启动的服务已经正常运行http://localhost:8000,确保该端口未被占用tasks/{task_type}/ 目录下读取测试数据和文档result.csvvllm.sh: 启动 vLLM 服务的脚本run.sh: 运行主程序的脚本,需要传递任务类型参数main.py: 主程序,实现 RAG 问答系统result.csv: 程序运行后生成的结果文件| Stage | 脚本 | 说明 |
|---|---|---|
| 文档接入 | src/ocr_ingest.py | RapidOCR/Whoosh 风格转换,写出 Markdown + manifest |
| 数据入库 | src/postgres_builder.py | Excel → PostgreSQL,同时落实 delete/check 过滤 |
| 索引构建 | src/vector_index.py | FAISS dense + BM25 sparse,供 DocAgent 混合检索 |
| Text2SQL 训练 | src/train_text2sql.py | 利用固定模板和 1024/128 滑窗生成 SQL 指令,在 Flan-T5 上做 LoRA |
| Agent 调度 | src/agents.py | DocAgent、SQLAgent 与 Orchestrator 的业务逻辑都写在这里 |
| 推理脚本 | src/infer.py | 读取 question.csv,调用智能体,再通过 AsyncOpenAI(Qwen2.5-14B) 输出答案 |
conda create -n lc_router python=3.10 -y
conda activate lc_router
pip install -r requirements.txt
export DATA_ROOT="../1/data"
python -m src.ocr_ingest --raw-dir docs_bucket --output artifacts/md
python -m src.postgres_builder --db-url postgresql+psycopg2://user:pwd@localhost:5432/emergency
python -m src.vector_index --markdown-dir artifacts/md --faiss-dir artifacts/faiss
python -m src.train_text2sql --db-url postgresql+psycopg2://user:pwd@localhost:5432/emergency
bash scripts/serve_vllm.sh artifacts/qwen_lora 8100
python -m src.infer --question-csv $DATA_ROOT/question.csv --output $DATA_ROOT/result.csv
如需直接启动现有模型(已放在 model_cache/):
bash scripts/serve_vllm.sh
python -m src.infer --question-csv $DATA_ROOT/question.csv --output $DATA_ROOT/result.csv
数据/模型摆放建议:
docs_bucket/:放 OCR 前的原始文档。sql_training/:自建的 Text2SQL 语料(可存 train_text2sql_placeholder.jsonl)。pg_store/:PostgreSQL 初始化脚本、备份、docker-compose 等。model_cache/:Qwen2.5-14B 基座模型或 LoRA 权重统一保存的位置。src.infer 默认读取 $DATA_ROOT/question.csv,参赛测试集请直接放在 ../1/data/question.csv 或通过 --question-csv 显式指定。
提示:推理脚本默认使用环境变量 SERVED_MODEL_NAME(若未设置则取模型目录名);如启动 vLLM 时自定义了 --served-model-name,请导出相同的 SERVED_MODEL_NAME 再运行 python -m src.infer。