Instructions to use echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed") 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("echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed", "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/echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed
- SGLang
How to use echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed 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 "echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed" \ --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": "echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed", "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 "echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed" \ --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": "echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed", "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 echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed with Docker Model Runner:
docker model run hf.co/echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed
Download vocab.json from echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed: direct link, hf CLI and curl.
- Browser
- Download file 801 kB
-
https://huggingface.co/echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed/resolve/main/vocab.json
- Command line
-
hf download hf://echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed/vocab.json
-
curl -L -o vocab.json https://huggingface.co/echarlaix/SmolVLM2-256M-Video-Instruct-openvino-8bit-mixed/resolve/main/vocab.json
801 kB
- Xet hash:
- 39f0bd3f4b32916b98cc78a0bcef1121ee4df73af11298949d3ea5b67442ef27
- Size of remote file:
- 801 kB
- SHA256:
- 82b84012e3add4d01d12ba14442026e49b8cbbaead1f79ecf3d919784f82dc79
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.