---
title: anyparse-models-hub
canonical_url: "https://www.modelscope.cn/models/anyforge/anyparse-models-hub"
md_url: "https://www.modelscope.cn/models/anyforge/anyparse-models-hub.md"
repository: anyforge/anyparse-models-hub
chinese_name: "anyparse使用模型"
last_updated: 2026-07-02
license: "Apache License 2.0"
pipeline_tag: image-text-to-text
tasks:
  - image-text-to-text
base_model_relation: quantized
parameters: 2.4B
tensor_type:
  - F32
  - I64
  - BF16
library_name:
  - safetensors
  - gguf
  - pytorch
frameworks:
  - Pytorch
downloads: 10776
stars: 0
tags:
  - ocr
  - vlm
  - layout
  - pdf
  - office
  - image
  - gguf
---

# anyparse-models-hub

> anyparse-models-hub - anyforge 在 ModelScope 开源的模型。anyparse使用模型集合

anyforge/anyparse-models-hub 是 ModelScope 魔搭社区上的 2.4B 参数image-text-to-text模型，采用 Apache License 2.0 许可。

- **Repository**: anyforge/anyparse-models-hub
- **License**: Apache License 2.0
- **Tasks**: image-text-to-text
- **Parameters**: 2.4B
- **Tags**: ocr, vlm, layout, pdf, office, image, gguf
- **Downloads**: 10776
- **Stars**: 0
- **Last updated**: 2026-07-02

Source: https://www.modelscope.cn/models/anyforge/anyparse-models-hub

---

## AnyParse使用模型仓库

**AnyParse** 是一个功能强大的多模态文档解析与理解引擎，旨在将复杂文件无缝转换为结构化的 Markdown 和 JSON 格式。无论是基础文本处理、专业文档转换，还是先进的视觉语言模型（VLM）和 OCR 识别，AnyParse 都能提供全面的一站式解决方案。

### 核心能力

- **多模态文档理解：** 支持图像与文档的跨模态解析，通过结合 OCR 和 VLM 技术，精准提取非结构化数据。
- **全面格式覆盖：** 单一工具即可轻松解析办公文档、网页、电子表格、电子书和邮件。
- **结构化输出：** 将复杂文件转换为标准化的 Markdown 和 JSON，简化下游数据处理和大语言模型（LLM）应用流程。

### 主要特性

- **文档与布局：** PDF、DOCX、PPTX、XLSX、EPUB、IPYNB
- **文本与标记：** TXT、MD、RST、HTML/XHTML/HTM/SHTML
- **电子表格与数据：** CSV、TSV
- **图像与多媒体：** PNG、JPEG/JPG
- **其他：** EML（邮件）
- **内置 CLI、FastAPI**
- **支持纯 CPU 环境运行，也支持 GPU**
- 按人类阅读顺序输出文本，适用于单栏、多栏和复杂布局
- 保留原始文档结构，包括标题、段落、列表等
- 提取图像、图像描述、表格、表格标题和脚注
- 自动识别文档中的公式并转换为 LaTeX 格式
- 自动识别文档中的表格并转换为 HTML 格式

### resources

- **仓库: [AnyParse](https://github.com/anyforge/anyparse)**
- **Gitee: [AnyParse](https://gitee.com/anyforge/anyparse)**
- **文档: [AnyParse docs](https://anyforge.github.io/anyparse)**
- **pypi: [anyparse-python](https://pypi.org/project/anyparse-python/)**
- **[ModelScope Skills](https://www.modelscope.cn/skills/anyforge/anyparse-skill)**
- **[SkillHub](https://skillhub.cn/skills/anyparse-skill)**
- **[ClawHub](https://clawhub.ai/anyforge/skills/anyparse-skill)**

```bash
pip install anyparse-python
```

please download `config/config.yaml` from [AnyParse](https://github.com/anyforge/anyparse) into your project directory.

### Download Models

```bash
# use modelscope (default)
export ANYPARSE_MODEL_MIRROR="modelscope"

# use huggingface
export ANYPARSE_MODEL_MIRROR="huggingface"

# download models
anyparse-cli download --config config/config.yaml --model
```

### Models Hub
- [AnyParse Models Hub ModelScope](https://www.modelscope.cn/models/anyforge/anyparse-models-hub)
- [AnyParse Models Hub HuggingFace](https://huggingface.co/anyforge/anyparse-models-hub)

### Python

```python
# Sync
from anyparse import AnyParser

model = AnyParser(config="config/config.yaml")
res = model.invoke(file = "/path/to/your_file")



# or Async
from anyparse import AsyncAnyParser

model = AsyncAnyParser(config="config/config.yaml")
res = await model.ainvoke(file = "/path/to/your_file")
```

### CLI

```bash
# help

anyparse-cli --help

# parse file
anyparse-cli parse --config config/config.yaml --file /path/to/your_file

# start api server
anyparse-cli api --config config/config.yaml

# see allowed file types
anyparse-cli allow --config config/config.yaml

# see commands help
anyparse-cli [COMMAND] --help
```

### API

- start api server

```bash
# start fastapi server and openai proxy
## use restful api or openai client call
anyparse-cli api --config config/config.yaml --host 0.0.0.0 --port 18007 --seckey 'your_custom_secret_key'
```

- call api

```python
# openai
from openai import OpenAI

client = OpenAI(
    base_url = "http://localhost:18007/anyparse/openai/v1",
    api_key = "your_custom_secret_key",
)
## get model id and allowed file types
print(client.models.list())



## parse file
import base64

with open("1.pdf", "r", encoding="utf-8") as f:
    text_content = f.read()

encoded_bytes = base64.b64encode(text_content.encode('utf-8'))
base64_str = encoded_bytes.decode('utf-8')

response = client.chat.completions.create(
    model="anyparse",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "file",
                    "file": {
                        "file_data": f"data:application/pdf;base64,{base64_str}"
                    }
                }
            ]
        }
    ],  # data:application/pdf;base64 prefix follow: client.models.list().data[0].allow_mimetypes
    # extra_body={
    #     "runtimes_args": {
    #         "use_doc_layout": True
    #     }
    # }
)

print(response.choices[0].message.content)



# or restful
import requests as rq

headers = {
    "Authorization": "Bearer your_custom_secret_key"
}

url = "http://localhost:18007/anyparse/invoke/v1"

args = {
    "use_doc_cls": False,
    "use_doc_rectifier": False,
    "use_doc_layout": True
}

file = '/path/to/your_file'

files = {
    'file': open(file,'rb')
}

res = rq.post(url, files = files, data = args, headers = headers)
print(res.json())

```
