Instructions to use mlfoundations/dcvlm-1b-model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mlfoundations/dcvlm-1b-model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mlfoundations/dcvlm-1b-model", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("mlfoundations/dcvlm-1b-model", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mlfoundations/dcvlm-1b-model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mlfoundations/dcvlm-1b-model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlfoundations/dcvlm-1b-model", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/mlfoundations/dcvlm-1b-model
- SGLang
How to use mlfoundations/dcvlm-1b-model with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "mlfoundations/dcvlm-1b-model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlfoundations/dcvlm-1b-model", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "mlfoundations/dcvlm-1b-model" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlfoundations/dcvlm-1b-model", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use mlfoundations/dcvlm-1b-model with Docker Model Runner:
docker model run hf.co/mlfoundations/dcvlm-1b-model
DCVLM-1B
DCVLM-1B is the small-scale reference 1B-parameter VLM from our DataComp-VLM
paper, pretrained from scratch on DCVLM-Baseline.
⚠️ This is a pretrained (base) model, not an instruction-tuned assistant. It is released as a reproducible reference point for data-centric research: to compare pretraining datasets, and as an initialization for your own SFT. It has not been chat- or preference-tuned and should not be expected to follow instructions reliably.
Model details
| Scale | small |
| Parameters ($N$) | 1B |
| Training tokens ($D$) | 6.25B |
| Architecture | InternVL-2.5 (InternVLChatModel) |
| Vision encoder | InternViT-300M-448px |
| Language model | Qwen/Qwen2.5-0.5B |
| Precision | bfloat16 |
| Training compute | ~80 H100 hours |
| Training data | DCVLM-Baseline |
| Data mixture | 10% captioning / 70% visual instruction / 15% text-only / 5% multimodal documents |
Results
Core evaluation suite (33 tasks), compared against FineVision, the previous best open pretraining dataset, trained at the same scale with the same architecture and token budget.
| Method | Gen | Know | OCR | Vision | MTL | Text | Core Avg |
|---|---|---|---|---|---|---|---|
| FineVision | 40.1 | 45.6 | 35.0 | 41.0 | 28.2 | 28.9 | 36.2 |
| DCVLM-Baseline (this model) | 40.5 | 43.6 | 33.0 | 39.1 | 25.4 | 34.7 | 36.5 |
Categories: Gen general understanding · Know knowledge · OCR OCR & charts · Vision vision-centric · MTL multilingual · Text text-only.
Usage
The model uses custom modeling code, so trust_remote_code=True is required.
import torch
from transformers import AutoModel, AutoTokenizer
path = "mlfoundations/dcvlm-1b-model"
model = AutoModel.from_pretrained(
path, torch_dtype=torch.bfloat16, trust_remote_code=True, low_cpu_mem_usage=True
).eval().cuda()
tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True, use_fast=False)
Image preprocessing follows the standard InternVL-2.5 dynamic-tiling recipe
(448px tiles, max_dynamic_patch=12).
Related releases
| Code | github.com/mlfoundations/dcvlm |
| Datasets | DCVLM-Baseline 6.25B · DCVLM-Baseline 200B · DCVLM-Balanced 200B |
| Models | 1B · 2B · 4B · 8B |
Citation
@article{farina2026datacomp,
title={DataComp-VLM: Improved Open Datasets for Vision-Language Models},
author={Farina, Matteo and Udandarao, Vishaal and Nguyen, Thao and Kuzucu, Selim and B{\"o}ther, Maximilian and Hochlehnert, Andreas and Ghosh, Adhiraj and Nezhurina, Marianna and Roth, Karsten and Struber, Joschka and others},
journal={arXiv preprint arXiv:2606.28551},
year={2026}
}
- Downloads last month
- 42
Model tree for mlfoundations/dcvlm-1b-model
Base model
OpenGVLab/InternViT-300M-448px