---
title: Flame-OCR-gguf
canonical_url: "https://www.modelscope.cn/models/anyforge/Flame-OCR-gguf"
md_url: "https://www.modelscope.cn/models/anyforge/Flame-OCR-gguf.md"
repository: anyforge/Flame-OCR-gguf
chinese_name: Flame-OCR-gguf
last_updated: 2026-07-24
license: "Apache License 2.0"
pipeline_tag: image-text-to-text
tasks:
  - image-text-to-text
library_name:
  - gguf
  - pytorch
frameworks:
  - Pytorch
downloads: 3188
stars: 0
tags:
  - ocr
  - gguf
---

# Flame-OCR-gguf

> Flame-OCR-gguf - anyforge 在 ModelScope 开源的模型。

anyforge/Flame-OCR-gguf 是 ModelScope 魔搭社区上的image-text-to-text模型，采用 Apache License 2.0 许可。

- **Repository**: anyforge/Flame-OCR-gguf
- **License**: Apache License 2.0
- **Tasks**: image-text-to-text
- **Tags**: ocr, gguf
- **Downloads**: 3188
- **Stars**: 0
- **Last updated**: 2026-07-24

Source: https://www.modelscope.cn/models/anyforge/Flame-OCR-gguf

---

<p align="center">
    <a href="https://www.modelscope.cn/models/anyforge/Flame-OCR" target="_blank"><img alt="Static Badge" src="https://img.shields.io/badge/%E9%AD%94%E6%90%AD-ModelScope-blue"></a>
    <a href="https://huggingface.co/anyforge/Flame-OCR" target="_blank"><img src="https://img.shields.io/badge/%F0%9F%A4%97-HuggingFace-blue"></a>
    <br>
        <a href="https://www.modelscope.cn/models/anyforge/Flame-OCR-gguf" target="_blank"><img alt="Static Badge" src="https://img.shields.io/badge/%E9%AD%94%E6%90%AD-ModelScope(GGUF)-blue"></a>
        <a href="https://huggingface.co/anyforge/Flame-OCR-gguf" target="_blank"><img src="https://img.shields.io/badge/%F0%9F%A4%97-HuggingFace(GGUF)-blue"></a>
    <br>
        👉 <a href="https://github.com/anyforge/flame-ocr" target="_blank">Flame-OCR Github</a>
</p>

- **convert by unsloth**

- **llama.cpp server**

```bash
llama-server \
    -m ./flame-ocr/flame-ocr.BF16.gguf \
    --mmproj ./flame-ocr/flame-ocr.BF16-mmproj.gguf \
    --port 18003  \
    --host 0.0.0.0 \
    --temp 0 \
    --alias "flame-ocr" \
    --api-key "sk-123456"

```

- **ollama**

```bash
ollama run AnyForge/flame-ocr:latest
```

- **call by openai**

```python
import base64
from openai import OpenAI

def image_to_base64(image_path: str) -> str:
    with open(image_path, "rb") as f:
        return base64.b64encode(f.read()).decode("utf-8")

client = OpenAI(
    base_url="http://localhost:18003/v1",
    api_key="sk-123456"
)

image_path = "/path/to/image.png"
base64_image = image_to_base64(image_path)

prompt = '\nExtract all readable content from the image in natural human reading order and output the result as a single Markdown document. For charts or images, represent them using an HTML image tag: <' + 'img src="images/bbox_{left}_{top}_{right}_{bottom}.jpg" />, where left, top, right, bottom are bounding box coordinates scaled to [0, 1000). Format formulas as LaTeX. Format tables as HTML: <table>...</table>. Transcribe all other text as standard Markdown. Preserve the original text without translation or paraphrasing.'

response = client.chat.completions.create(
    model="flame-ocr",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "image_url",
                    "image_url": {
                        "url": f"data:image/png;base64,{base64_image}"
                    }
                },
                {
                    "type": "text",
                    "text": prompt
                }
            ]
        }
    ],
    max_tokens=8192,
    temperature=0.0,
    extra_body={
        "mm_processor_kwargs": {
            "images_kwargs": {
                "min_pixels": 448 * 448,
                "max_pixels": 2880 * 2880
            }
        }
    }
)

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

```
