Image-Text-to-Text
Transformers
Safetensors
Llama_Nemotron_Nano_VL
feature-extraction
vision-language
indian-crafts
textiles
multilingual
lora
custom_code
conversational
Instructions to use vedantjadhav701/Indus-Craft-VLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vedantjadhav701/Indus-Craft-VLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="vedantjadhav701/Indus-Craft-VLM", 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("vedantjadhav701/Indus-Craft-VLM", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use vedantjadhav701/Indus-Craft-VLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "vedantjadhav701/Indus-Craft-VLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "vedantjadhav701/Indus-Craft-VLM", "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/vedantjadhav701/Indus-Craft-VLM
- SGLang
How to use vedantjadhav701/Indus-Craft-VLM 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 "vedantjadhav701/Indus-Craft-VLM" \ --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": "vedantjadhav701/Indus-Craft-VLM", "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 "vedantjadhav701/Indus-Craft-VLM" \ --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": "vedantjadhav701/Indus-Craft-VLM", "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 vedantjadhav701/Indus-Craft-VLM with Docker Model Runner:
docker model run hf.co/vedantjadhav701/Indus-Craft-VLM
Download preprocessor_config.json from vedantjadhav701/Indus-Craft-VLM: direct link, hf CLI and curl.
- Browser
- Download file 673 Bytes
-
https://huggingface.co/vedantjadhav701/Indus-Craft-VLM/resolve/main/preprocessor_config.json
- Command line
-
hf download hf://vedantjadhav701/Indus-Craft-VLM/preprocessor_config.json
-
curl -L -o preprocessor_config.json https://huggingface.co/vedantjadhav701/Indus-Craft-VLM/resolve/main/preprocessor_config.json
673 Bytes
| { | |
| "auto_map": { | |
| "AutoImageProcessor": "nvidia/Llama-3.1-Nemotron-Nano-VL-8B-V1--image_processing.LlamaNemotronNanoVLImageProcessor" | |
| }, | |
| "crop_size": null, | |
| "data_format": "channels_first", | |
| "default_to_square": true, | |
| "device": "cpu", | |
| "do_center_crop": null, | |
| "do_convert_rgb": true, | |
| "do_normalize": null, | |
| "do_rescale": true, | |
| "do_resize": null, | |
| "image_mean": null, | |
| "image_processor_type": "LlamaNemotronNanoVLImageProcessor", | |
| "image_size": 512, | |
| "image_std": null, | |
| "input_data_format": null, | |
| "max_num_tiles": 4, | |
| "resample": null, | |
| "rescale_factor": 0.00392156862745098, | |
| "return_tensors": null, | |
| "size": null, | |
| "use_thumbnail": true | |
| } | |