Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- zh
|
| 4 |
+
- en
|
| 5 |
+
base_model:
|
| 6 |
+
- openbmb/MiniCPM-V-4
|
| 7 |
+
pipeline_tag: image-text-to-text
|
| 8 |
+
library_name: transformers
|
| 9 |
+
tags:
|
| 10 |
+
- MiniCPM
|
| 11 |
+
- MiniCPM-V-4
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# MiniCPM-V-4
|
| 15 |
+
|
| 16 |
+
## Convert tools links:
|
| 17 |
+
|
| 18 |
+
For those who are interested in model conversion, you can try to export axmodel through the original repo :
|
| 19 |
+
https://huggingface.co/openbmb/MiniCPM-V-4
|
| 20 |
+
|
| 21 |
+
[How to Convert LLM from Huggingface to axmodel](https://github.com/Jordan-5i/MiniCPM-o/blob/main/ax_convert/readme.md)
|
| 22 |
+
|
| 23 |
+
## Support Platform
|
| 24 |
+
|
| 25 |
+
- AX650
|
| 26 |
+
- AX650N DEMO Board
|
| 27 |
+
- [M4N-Dock(爱芯派Pro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html)
|
| 28 |
+
- [M.2 Accelerator card](https://axcl-docs.readthedocs.io/zh-cn/latest/doc_guide_hardware.html)
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
## How to use
|
| 32 |
+
|
| 33 |
+
Download all files from this repository to the device
|
| 34 |
+
|
| 35 |
+
```
|
| 36 |
+
root@ax650:~/wangjian/minicpm-v-4# tree -L 1
|
| 37 |
+
.
|
| 38 |
+
├── embed_tokens.pth
|
| 39 |
+
├── minicpm-v-4_axmodel
|
| 40 |
+
├── minicpmv4_tokenizer
|
| 41 |
+
├── resampler.axmodel
|
| 42 |
+
├── run_axmodel.py
|
| 43 |
+
├── show_demo.jpg
|
| 44 |
+
└── siglip.axmodel
|
| 45 |
+
```
|
| 46 |
+
install transformers
|
| 47 |
+
|
| 48 |
+
```
|
| 49 |
+
pip install transformers==4.51.0
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Inference with AX650 Host on AX650 DEMO Board
|
| 53 |
+
|
| 54 |
+
run following cmd:
|
| 55 |
+
|
| 56 |
+
```bash
|
| 57 |
+
python3 run_axmodel.py -i show_demo.jpg -q "What is the landform in the picture?"
|
| 58 |
+
```
|
| 59 |
+
input image:
|
| 60 |
+

|
| 61 |
+
|
| 62 |
+
minicpm-v-4 output:
|
| 63 |
+
|
| 64 |
+
```bash
|
| 65 |
+
question1 = "What is the landform in the picture?"
|
| 66 |
+
|
| 67 |
+
answer1 = The landform in the picture is a karst topography, characterized by its unique and dramatic appearance with steep limestone cliffs rising from the water' s surface. This type of landscape is commonly found in regions with significant geological activity, such as China's Li River.
|
| 68 |
+
```
|