Instructions to use yongxianwei/InternVL2_5-1B_Geometry with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use yongxianwei/InternVL2_5-1B_Geometry with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="yongxianwei/InternVL2_5-1B_Geometry", 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("yongxianwei/InternVL2_5-1B_Geometry", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use yongxianwei/InternVL2_5-1B_Geometry with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yongxianwei/InternVL2_5-1B_Geometry" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yongxianwei/InternVL2_5-1B_Geometry", "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/yongxianwei/InternVL2_5-1B_Geometry
- SGLang
How to use yongxianwei/InternVL2_5-1B_Geometry 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 "yongxianwei/InternVL2_5-1B_Geometry" \ --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": "yongxianwei/InternVL2_5-1B_Geometry", "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 "yongxianwei/InternVL2_5-1B_Geometry" \ --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": "yongxianwei/InternVL2_5-1B_Geometry", "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 yongxianwei/InternVL2_5-1B_Geometry with Docker Model Runner:
docker model run hf.co/yongxianwei/InternVL2_5-1B_Geometry
InternVL2_5-1B_Geometry
The Geometry expert of the OptMerge MLLM merging benchmark (ICLR 2026). It is one of five capability experts (VQA, Geometry, Chart, OCR, Grounding) fine-tuned from the same base model, so that they can be merged into one model without training data.
- Paper: OptMerge: Unifying Multimodal LLM Capabilities and Modalities via Model Merging (OpenReview)
- Extended version (SWUDI): Closed-Form Spectral Regularization for Multi-Task Model Merging, which also uses these experts in its multimodal merging benchmark
- Code: WalkerWorldPeace/MLLMerging
- All experts: MLLMerging collection
Training
- Base model: OpenGVLab/InternVL2_5-1B
- Method: Full fine-tuning (learning rate 4e-5, warmup ratio 0.03, cosine schedule, 1 epoch).
- Data: GeoQA+ (zh), G-LLaVA (190K samples, Table 1 of the paper).
Results
From Table 2 of the paper. The last row merges this expert with the other four experts using OptMerge.
| Model | VizWiz | GQA | MathVista | MATH-Vision | ChartQA | TextVQA | OCRVQA | RefCOCO | RefCOCO+ | RefCOCOg | Avg. |
|---|---|---|---|---|---|---|---|---|---|---|---|
| InternVL2.5-1B-Instruct (base model) | 29.15 | 54.62 | 46.80 | 18.42 | 69.48 | 72.51 | 41.08 | 71.69 | 65.41 | 67.40 | 53.66 |
| InternVL2_5-1B_Geometry | 13.45 | 32.80 | 55.20 | 25.00 | 51.76 | 56.91 | 35.35 | 24.73 | 19.61 | 23.84 | 33.86 |
| OptMerge (5 experts merged) | 30.97 | 57.13 | 54.48 | 21.05 | 68.72 | 76.01 | 46.35 | 75.97 | 69.72 | 73.94 | 57.44 |
Usage
# pip install timm einops (required by the InternVL remote code)
import torch
from transformers import AutoModel, AutoTokenizer
model_id = "yongxianwei/InternVL2_5-1B_Geometry"
model = AutoModel.from_pretrained(model_id, torch_dtype=torch.bfloat16, trust_remote_code=True).eval().cuda()
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
# Image preprocessing and model.chat(...) follow the official InternVL2.5-1B model card.
To merge the five experts yourself, see Reproducing OptMerge.
Citation
If you use these checkpoints or the MLLMerging code, please cite both OptMerge and its extended version:
@inproceedings{wei2025optmerge,
title={OptMerge: Unifying Multimodal LLM Capabilities and Modalities via Model Merging},
author={Wei, Yongxian and Cheng, Runxi and Jin, Weike and Yang, Enneng and Shen, Li and Hou, Lu and Du, Sinan and Yuan, Chun and Cao, Xiaochun and Tao, Dacheng},
booktitle={The Fourteenth International Conference on Learning Representations},
year={2026},
url={https://openreview.net/forum?id=Me0n0iESJY}
}
@article{wei2026swudi,
title={Closed-Form Spectral Regularization for Multi-Task Model Merging},
author={Wei, Yongxian and Cheng, Runxi and Zhang, Xingxuan and Shen, Li and Yuan, Chun and Cui, Peng and Tao, Dacheng},
journal={arXiv preprint arXiv:2606.07289},
year={2026}
}
- Downloads last month
- 306
Model tree for yongxianwei/InternVL2_5-1B_Geometry
Base model
OpenGVLab/InternVL2_5-1B