Instructions to use AdaptLLM/biomed-InternVL3-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AdaptLLM/biomed-InternVL3-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="AdaptLLM/biomed-InternVL3-1B", 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("AdaptLLM/biomed-InternVL3-1B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use AdaptLLM/biomed-InternVL3-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AdaptLLM/biomed-InternVL3-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AdaptLLM/biomed-InternVL3-1B", "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/AdaptLLM/biomed-InternVL3-1B
- SGLang
How to use AdaptLLM/biomed-InternVL3-1B 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 "AdaptLLM/biomed-InternVL3-1B" \ --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": "AdaptLLM/biomed-InternVL3-1B", "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 "AdaptLLM/biomed-InternVL3-1B" \ --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": "AdaptLLM/biomed-InternVL3-1B", "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 AdaptLLM/biomed-InternVL3-1B with Docker Model Runner:
docker model run hf.co/AdaptLLM/biomed-InternVL3-1B
Adapting Multimodal Large Language Models to Domains via Post-Training (EMNLP 2025)
This repos contains the biomedicine MLLM developed from InternVL3-1B in our paper: On Domain-Adaptive Post-Training for Multimodal Large Language Models. The correspoding training dataset is in biomed-visual-instructions.
The main project page is: Adapt-MLLM-to-Domains
1. To Chat with AdaMLLM
Our model architecture aligns with the base model: InternVL3-1B, so you can refer to the official OpenGVLab/InternVL3-1B for the usage instructions.
Note: For AdaMLLM, always place the image at the beginning of the input instruction in the messages.
2. Domain-Specific Benchmarks
We provide biomed-VQA-benchmark for evaluating MLLMs on domain-specific tasks.
3. To Reproduce this Domain-Adapted MLLM
Using our training data, biomed-visual-instructions, you can easily reproduce our models based on the LlamaFactory repository.
For reference, we train from OpenGVLab/InternVL3-1B-hf (note that we train from the -hf version) for 1 epoch with a learning rate of 1e-5 and a global batch size of 128.
After training, follow this instruction to convert the hf version back to the official OpenGVLab/InternVL3-1B version.
Citation
If you find our work helpful, please cite us.
Adapt MLLM to Domains (EMNLP 2025 Findings)
@article{adamllm,
title={On Domain-Adaptive Post-Training for Multimodal Large Language Models},
author={Cheng, Daixuan and Huang, Shaohan and Zhu, Ziyu and Zhang, Xintong and Zhao, Wayne Xin and Luan, Zhongzhi and Dai, Bo and Zhang, Zhenliang},
journal={arXiv preprint arXiv:2411.19930},
year={2024}
}
Adapt LLM to Domains (ICLR 2024)
@inproceedings{
cheng2024adapting,
title={Adapting Large Language Models via Reading Comprehension},
author={Daixuan Cheng and Shaohan Huang and Furu Wei},
booktitle={The Twelfth International Conference on Learning Representations},
year={2024},
url={https://openreview.net/forum?id=y886UXPEZ0}
}
- Downloads last month
- 48
Model tree for AdaptLLM/biomed-InternVL3-1B
Base model
OpenGVLab/InternVL3-1B-Pretrained