Przeglądaj źródła

feat(更新HF_safetensors到GGUF转换文档): 修改HF_safetensors->GGUF.md文档中的模型路径和输出类型,将MinerU2.5-Pro模型更新为2605版本,并将输出类型调整为q8_0,以提升模型转换的效率与兼容性。

zhch158_admin 1 miesiąc temu
rodzic
commit
eab1585af0

+ 13 - 13
docs/ocr_tools/universal_doc_parser/HF_safetensors->GGUF.md

@@ -177,7 +177,7 @@ hf download opendatalab/MinerU2.5-Pro-2604-1.2B --local-dir ~/models/MinerU2.5-P
 # 3. 转语言模型主体(M4 48G 内存充足,直接 f16 不量化质量最好)
 python convert_hf_to_gguf.py ~/models/PaddleOCR-VL-1.6 \
     --outfile ~/models/PaddleOCR-VL-1.6-GGUF \
-    --outtype f16
+    --outtype q8_0
 
 # 4. 转视觉投影器 mmproj(OCR 质量主要看这个,建议 f16/f32)
 python convert_hf_to_gguf.py ~/models/PaddleOCR-VL-1.6 \
@@ -187,14 +187,14 @@ python convert_hf_to_gguf.py ~/models/PaddleOCR-VL-1.6 \
 cp ~/models/PaddleOCR-VL-1.6/chat_template.jinja ~/models/PaddleOCR-VL-1.6-GGUF/chat_template.jinja
 
 # 5. 转语言模型主体(M4 48G 内存充足,直接 f16 不量化质量最好)
-python convert_hf_to_gguf.py ~/models/MinerU2.5-Pro-2604-1.2B \
-    --outfile ~/models/MinerU2.5-Pro-2604-1.2B-GGUF \
-    --outtype f16
+python convert_hf_to_gguf.py ~/models/MinerU2.5-Pro-2605-1.2B \
+    --outfile ~/models/MinerU2.5-Pro-2605-1.2B-GGUF \
+    --outtype q8_0
 
 # 6. 转视觉投影器 mmproj(OCR 质量主要看这个,建议 f16/f32)
-python convert_hf_to_gguf.py ~/models/MinerU2.5-Pro-2604-1.2B \
+python convert_hf_to_gguf.py ~/models/MinerU2.5-Pro-2605-1.2B \
     --mmproj \
-    --outfile ~/models/MinerU2.5-Pro-2604-1.2B-GGUF/MinerU2.5-Pro-2604-1.2B-mmproj.gguf \
+    --outfile ~/models/MinerU2.5-Pro-2605-1.2B-GGUF/MinerU2.5-Pro-2605-1.2B-mmproj.gguf \
     --outtype f16
 cp ~/models/MinerU2.5-Pro-2604-1.2B/chat_template.jinja ~/models/MinerU2.5-Pro-2604-1.2B-GGUF/chat_template.jinja
 
@@ -262,7 +262,7 @@ ocr_tools/daemons/curl_local_mineru.sh
 conda activate mineru
 python - <<'PY'
 import json, os
-d = os.path.expanduser("~/models/MinerU2.5-Pro-2604-1.2B")
+d = os.path.expanduser("~/models/MinerU2.5-Pro-2605-1.2B")
 otsl = {"<ched>", "<ecel>", "<fcel>", "<lcel>", "<ucel>", "<xcel>", "<nl>"}
 
 # 1) tokenizer.json:convert_hf_to_gguf 据此决定 token 类型(关键)
@@ -286,8 +286,8 @@ print("已将 OTSL token 标记为非 special,可重新转换主模型 GGUF")
 PY
 
 # 重转主模型(mmproj 不用动)
-python convert_hf_to_gguf.py ~/models/MinerU2.5-Pro-2604-1.2B \
-    --outfile ~/models/MinerU2.5-Pro-2604-1.2B-GGUF \
+python convert_hf_to_gguf.py ~/models/MinerU2.5-Pro-2605-1.2B \
+    --outfile ~/models/MinerU2.5-Pro-2605-1.2B-GGUF \
     --outtype f16
 ```
 
@@ -332,8 +332,8 @@ f32 / f16 / bf16 / q8_0 / tq1_0 / tq2_0 / auto
 `q8_0` 在列,所以一步直出没问题:
 
 ```bash
-python convert_hf_to_gguf.py ~/models/MinerU2.5-Pro-2604-1.2B \
-    --outfile ~/models/MinerU2.5-Pro-2604-1.2B-GGUF \
+python convert_hf_to_gguf.py ~/models/MinerU2.5-Pro-2605-1.2B \
+    --outfile ~/models/MinerU2.5-Pro-2605-1.2B-GGUF \
     --outtype q8_0
 # mmproj 仍单独转、保持 f16(见前面步骤)
 ```
@@ -356,8 +356,8 @@ LLAMA_BIN="$HOME/workspace/repository.git/llama.cpp/build/bin"
 
 # MinerU2.5:只量化语言主体,mmproj 保持 f16 不动
 "$LLAMA_BIN/llama-quantize" \
-    ~/models/MinerU2.5-Pro-2604-1.2B-GGUF/MinerU2.5-Pro-2604-1.2B-F16.gguf \
-    ~/models/MinerU2.5-Pro-2604-1.2B-GGUF/MinerU2.5-Pro-2604-1.2B-Q8_0.gguf \
+    ~/models/MinerU2.5-Pro-2605-1.2B-GGUF/MinerU2.5-Pro-2605-1.2B-F16.gguf \
+    ~/models/MinerU2.5-Pro-2605-1.2B-GGUF/MinerU2.5-Pro-2605-1.2B-Q8_0.gguf \
     Q8_0
 
 # PaddleOCR-VL-1.6:同理