---
title: CodeFormulaV2-mlx-bf16
canonical_url: "https://www.modelscope.cn/models/mlx-community/CodeFormulaV2-mlx-bf16"
md_url: "https://www.modelscope.cn/models/mlx-community/CodeFormulaV2-mlx-bf16.md"
repository: mlx-community/CodeFormulaV2-mlx-bf16
last_updated: 2026-05-16
license: cdla-permissive-2.0
pipeline_tag: image-text-to-text
tasks:
  - image-text-to-text
model_type:
  - idefics3
architectures:
  - Idefics3ForConditionalGeneration
base_model:
  - docling-project/CodeFormulaV2
base_model_relation: quantized
parameters: 315.5M
tensor_type:
  - BF16
library_name:
  - mlx
  - safetensors
  - pytorch
frameworks:
  - pytorch
language:
  - en
downloads: 20
stars: 0
tags:
  - mlx
  - mlx-vlm
  - idefics3
---

# CodeFormulaV2-mlx-bf16

> CodeFormulaV2-mlx-bf16 - mlx-community 在 ModelScope 开源的模型。CodeFormulaV2-mlx-bf16

mlx-community/CodeFormulaV2-mlx-bf16 是 ModelScope 魔搭社区上的 315.5M 参数image-text-to-text模型，采用 cdla-permissive-2.0 许可，基于 docling-project/CodeFormulaV2 构建。

- **Repository**: mlx-community/CodeFormulaV2-mlx-bf16
- **License**: cdla-permissive-2.0
- **Tasks**: image-text-to-text
- **Parameters**: 315.5M
- **Base model**: docling-project/CodeFormulaV2
- **Tags**: mlx, mlx-vlm, idefics3
- **Downloads**: 20
- **Stars**: 0
- **Last updated**: 2026-05-16

Source: https://www.modelscope.cn/models/mlx-community/CodeFormulaV2-mlx-bf16

---

# CodeFormulaV2-mlx-bf16

MLX bf16 conversion of [docling-project/CodeFormulaV2](https://huggingface.co/docling-project/CodeFormulaV2), produced with [`mlx_vlm.convert`](https://github.com/Blaizzy/mlx-vlm). Architecture, training data, and intended use are described on the upstream model page; this repo only changes the storage format (PyTorch safetensors → MLX safetensors, same bf16 precision).

## Usage

```bash
pip install mlx-vlm
```

```python
from mlx_vlm import load, generate
from mlx_vlm.prompt_utils import apply_chat_template

model, processor = load("mlx-community/CodeFormulaV2-mlx-bf16")
prompt = apply_chat_template(processor, model.config, "<formula>", num_images=1)
result = generate(
    model, processor,
    prompt=prompt,
    image="path/to/image.png",
    temperature=0.0,
)
print(result.text)
```

Use `"<formula>"` as the prompt for a math-expression image, `"<code>"` for a code-block image, per the upstream model card.

## License and attribution

This is a derivative of [docling-project/CodeFormulaV2](https://huggingface.co/docling-project/CodeFormulaV2), redistributed under the same [Community Data License Agreement – Permissive 2.0 (CDLA-Permissive-2.0)](https://cdla.dev/permissive-2-0/).

Please cite the upstream work:

```bibtex
@techreport{Docling,
  author = {Deep Search Team},
  month = {8},
  title = {{Docling Technical Report}},
  url = {https://arxiv.org/abs/2408.09869},
  eprint = {2408.09869},
  year = {2024}
}
```
