Image-Text-to-Text
Transformers
Safetensors
English
mllama
text-generation-inference
trl
conversational
Run this model with HF Jobs
Run saishshinde15/VisionAI_Pro on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/saishshinde15/VisionAI_Pro. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/saishshinde15/VisionAI_Pro on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/saishshinde15/VisionAI_Pro. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/saishshinde15/VisionAI_Pro. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use saishshinde15/VisionAI_Pro with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use saishshinde15/VisionAI_Pro with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="saishshinde15/VisionAI_Pro") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("saishshinde15/VisionAI_Pro") model = AutoModelForMultimodalLM.from_pretrained("saishshinde15/VisionAI_Pro", device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use saishshinde15/VisionAI_Pro with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "saishshinde15/VisionAI_Pro" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "saishshinde15/VisionAI_Pro", "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/saishshinde15/VisionAI_Pro
- SGLang
How to use saishshinde15/VisionAI_Pro 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 "saishshinde15/VisionAI_Pro" \ --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": "saishshinde15/VisionAI_Pro", "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 "saishshinde15/VisionAI_Pro" \ --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": "saishshinde15/VisionAI_Pro", "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 saishshinde15/VisionAI_Pro with Docker Model Runner:
docker model run hf.co/saishshinde15/VisionAI_Pro
Update README.md
Browse files19 unmodified lines20212219 unmodified lines- **Developed by:** saishshinde15- **License:** apache-2.0- **Finetuned from model :**llama-3.2-11b-vision-instruct19 unmodified lines20212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848519 unmodified lines- **Developed by:** saishshinde15- **License:** apache-2.0- **Finetuned from model :**llama-3.2-11b-vision-instruct## How to use this model- use unsolth for faster model download and faster inference speed . Users can also use transformers module from hugging face```pythonfrom unsloth import FastVisionModelfrom PIL import Imageimport requestsfrom transformers import TextStreamer# Load the model and tokenizermodel, tokenizer = FastVisionModel.from_pretrained(model_name="saishshinde15/VisionAI", # YOUR MODEL YOU USED FOR TRAININGload_in_4bit=False # Set to False for 16bit LoRA)# Enable the model for inferenceFastVisionModel.for_inference(model)# Load the image from URLurl = 'your image url'image = Image.open(requests.get(url, stream=True).raw)# Define the instruction and user queryinstruction = ("You are an expert in answering questions related to the image provided: ""Answer to the questions given by the user accurately by referring to the image.")query = "What is this image about?"# Create the chat message structuremessages = [{"role": "user", "content": [{"type": "image"},{"type": "text", "text": instruction},{"type": "text", "text": query}]}]# Generate input text using the tokenizer's chat templateinput_text = tokenizer.apply_chat_template(messages, add_generation_prompt=True)# Tokenize the inputsinputs = tokenizer(image,input_text,add_special_tokens=False,return_tensors="pt",).to("cuda")# Initialize the text streamertext_streamer = TextStreamer(tokenizer, skip_prompt=True)# Generate the response_ = model.generate(**inputs,streamer=text_streamer,max_new_tokens=128,use_cache=True,temperature=1.5,min_p=0.1)
README.md+63