feature: add

This commit is contained in:
2025-08-27 17:52:42 +08:00
parent 0fbaf2a917
commit cd486c2768

View File

@@ -5,6 +5,40 @@
* MiniCPMLlama3V2.5 是 openbmb 的 8B multimodal 模型,基于 SigLip400M 与 Llama3-8B-Instruct 构建,在 OCR 能力、多语言支持、部署效率等方面表现优秀,整体性能达到 GPT4V 级别
* MiniCPMV2.6 是 MiniCPMV 系列中最新且最强大的 8B 参数模型,具备更优的单图、多图与视频理解能力、卓越 OCR 效果、低 hallucination 率,并支持端侧设备(如 iPad实时视频理解
## Quick Start
1. 首先从modelscope上下载文本生成大模型`Qwen1.5-1.8B-Chat`
```bash
modelscope download --model LLM-Research/gemma-3-4b-it --local_dir /mnt/contest_ceph/wenyunqing/models/gemma-3-4b-it
```
2. 拉取vllm server 镜像.
```
docker pull harbor.4pd.io/hardcore-tech/bi100-3.2.1-x86-ubuntu20.04-py3.10-poc-vlm-infer:0.0.1
```
3. 启动docker
```bash
docker run -it --rm \
-p 10086:8000 \
--name test_wyq1 \
--privileged harbor.4pd.io/hardcore-tech/bi100-3.2.1-x86-ubuntu20.04-py3.10-poc-vlm-infer:0.0.1
```
注意需要在本地使用寒武纪 mlu370 芯片
4. 测试服务
4.1 加载模型
```bash
curl -X POST http://localhost:10086/load_model \
-H "Content-Type: application/json" \
-d '{"model_path":"/model","dtype":"auto"}'
```
4.2 模型推理
```bash
base64 -w 0 demo.jpeg | \
jq -Rs --arg mp "/model" --arg prompt "Describe the picture" \
'{model_path: $mp, prompt: $prompt, images: ["data:image/jpeg;base64," + .], generation: {max_new_tokens: 50, temperature: 0.7}}' | \
curl -X POST "http://localhost:10086/infer" \
-H "Content-Type: application/json" \
-d @-
```
## 模型测试服务原理
尽管对于视觉多模态理解没有一个业界统一的API协议标准但我们也可以基于目前比较流行的Transfomer框架**适配**各类视觉理解多模态模型。