Image-Text-to-Text
Transformers
TensorBoard
Safetensors
multilingual
internvl_chat
feature-extraction
internvl
custom_code
conversational
Instructions to use taroshi/InternVL2_5-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use taroshi/InternVL2_5-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="taroshi/InternVL2_5-4B", 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("taroshi/InternVL2_5-4B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use taroshi/InternVL2_5-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "taroshi/InternVL2_5-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "taroshi/InternVL2_5-4B", "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/taroshi/InternVL2_5-4B
- SGLang
How to use taroshi/InternVL2_5-4B 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 "taroshi/InternVL2_5-4B" \ --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": "taroshi/InternVL2_5-4B", "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 "taroshi/InternVL2_5-4B" \ --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": "taroshi/InternVL2_5-4B", "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 taroshi/InternVL2_5-4B with Docker Model Runner:
docker model run hf.co/taroshi/InternVL2_5-4B
Commit History
-
Upload runs/Nov20_11-16-20_HOST-10-140-60-18/events.out.tfevents.1732072968.HOST-10-140-60-18.6838.0 with huggingface_hub
Verified signaturebe8115f -
Upload examples/red-panda.mp4 with huggingface_hub
Verified signaturea593f66 -
Upload examples/image2.jpg with huggingface_hub
Verified signaturec0af7f2 -
Upload examples/image1.jpg with huggingface_hub
Verified signaturedb1a0b5 -
Upload vocab.json with huggingface_hub
Verified signaturecfc02aa -
Upload tokenizer_config.json with huggingface_hub
Verified signature45791f6 -
Upload special_tokens_map.json with huggingface_hub
Verified signature25bca60 -
Upload README.md with huggingface_hub
Verified signature4048713 -
Upload preprocessor_config.json with huggingface_hub
Verified signaturee347c4f -
Upload modeling_intern_vit.py with huggingface_hub
Verified signature78d8abf -
Upload modeling_internvl_chat.py with huggingface_hub
Verified signature6da846d -
Upload model.safetensors.index.json with huggingface_hub
Verified signaturef32d987 -
Upload model-00002-of-00002.safetensors with huggingface_hub
Verified signature132de33
-
Upload model-00001-of-00002.safetensors with huggingface_hub
Verified signature36261c0 -
Upload merges.txt with huggingface_hub
Verified signature95c5618 -
Upload generation_config.json with huggingface_hub
Verified signature980252a -
Upload conversation.py with huggingface_hub
Verified signaturece39f0f -
Upload configuration_intern_vit.py with huggingface_hub
Verified signature31e1717 -
Upload configuration_internvl_chat.py with huggingface_hub
Verified signature0b1919a -
Upload config.json with huggingface_hub
Verified signature8b3313b -
Upload added_tokens.json with huggingface_hub
Verified signature7b56524 -
Upload .gitattributes with huggingface_hub
Verified signatured21527f -
initial commit
Verified signature5d70a8d