Image-Text-to-Text
Transformers
Safetensors
multilingual
internvl_chat
feature-extraction
internvl
multimodal
biology
medical
conversational
custom_code
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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AdaptLLM/biomed-InternVL3-1B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
|
Download README.md from AdaptLLM/biomed-InternVL3-1B: direct link, hf CLI and curl.
- Browser
- Download file 3.02 kB
-
https://huggingface.co/AdaptLLM/biomed-InternVL3-1B/resolve/main/README.md
- Command line
-
hf download hf://AdaptLLM/biomed-InternVL3-1B/README.md
-
curl -L -o README.md https://huggingface.co/AdaptLLM/biomed-InternVL3-1B/resolve/main/README.md
3.02 kB
| license: other | |
| license_name: qwen | |
| license_link: https://huggingface.co/Qwen/Qwen2.5-72B-Instruct/blob/main/LICENSE | |
| pipeline_tag: image-text-to-text | |
| library_name: transformers | |
| base_model: | |
| - OpenGVLab/InternVL3-1B | |
| language: | |
| - multilingual | |
| tags: | |
| - internvl | |
| - multimodal | |
| - biology | |
| - medical | |
| datasets: | |
| - AdaptLLM/biomed-visual-instructions | |
| # 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](https://huggingface.co/papers/2411.19930). The correspoding training dataset is in [biomed-visual-instructions](https://huggingface.co/datasets/AdaptLLM/biomed-visual-instructions). | |
| The main project page is: [Adapt-MLLM-to-Domains](https://huggingface.co/AdaptLLM/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](https://huggingface.co/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](https://huggingface.co/datasets/AdaptLLM/biomed-VQA-benchmark) for evaluating MLLMs on domain-specific tasks. | |
| ## 3. To Reproduce this Domain-Adapted MLLM | |
| Using our training data, [biomed-visual-instructions](https://huggingface.co/datasets/AdaptLLM/biomed-visual-instructions), you can easily reproduce our models based on the [LlamaFactory](https://github.com/hiyouga/LLaMA-Factory) repository. | |
| For reference, we train from [OpenGVLab/InternVL3-1B-hf](https://huggingface.co/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](https://github.com/hiyouga/LLaMA-Factory/issues/8086#issuecomment-2898640569) to convert the `hf` version back to the official [OpenGVLab/InternVL3-1B](https://huggingface.co/OpenGVLab/InternVL3-1B) version. | |
| ## Citation | |
| If you find our work helpful, please cite us. | |
| [Adapt MLLM to Domains](https://huggingface.co/papers/2411.19930) (EMNLP 2025 Findings) | |
| ```bibtex | |
| @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](https://huggingface.co/papers/2309.09530) (ICLR 2024) | |
| ```bibtex | |
| @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} | |
| } | |
| ``` |