Image-Text-to-Text
Transformers
Safetensors
English
vision-encoder-decoder
text-generation
text-to-text
image-text-to-image-text
conversational
Instructions to use LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project") 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 AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project") model = AutoModelForCausalLM.from_pretrained("LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project", 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 = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project", "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/LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project
- SGLang
How to use LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project 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 "LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project" \ --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": "LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project", "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 "LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project" \ --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": "LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project", "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 LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project with Docker Model Runner:
docker model run hf.co/LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project
Commit History
-
Update config.json
Verified signature89509be -
Upload config.json
Verified signature46a6dea -
Rename config.json to config2.json
Verified signature5dd01ad -
Rename preprocessor_config.json to preprocessor.json
Verified signature1574ea9 -
Rename encoder_config.json to encoder.json
Verified signature8d889c4 -
Rename decoder_config.json to decoder.json
Verified signature69a4daf -
Update decoder_config.json
Verified signature3c1096d -
Update decoder_config.json
Verified signature3368ef1 -
Update encoder_config.json
Verified signatureb435c9e -
Update VisionEncoderDecoder_config.json
Verified signature77b5f90 -
Update encoder_config.json
Verified signature74ba3ab -
Update decoder_config.json
Verified signature1f8af79 -
Update decoder/config.json
Verified signature45574cb -
Update encoder/config.json
Verified signature43be1ac -
Update encoder_config.json
Verified signature78f7127 -
Delete TOKENIZER_tokenizer_config.json
Verified signature482b5c7 -
Rename ImageProcessor336_preprocessor_config.json to ImageProcessor336_config.json
Verified signature9f99935 -
Rename ImageProcessor224_preprocessor_config.json to ImageProcessor224_config.json
Verified signature9388f49 -
Rename preprocessor.json to preprocessor_config.json
Verified signature1392e57 -
Rename ImageProcessor336_preprocessor_config (1).json to preprocessor.json
Verified signaturefb73a54 -
Upload 3 files
Verified signature806f1af -
Delete preprocessor_config.json
Verified signatureb4b725b -
Delete config2.json
Verified signature85d5f3c -
Upload decoder_config.json
Verified signature59e7333 -
Upload 3 files
Verified signature3b5b917 -
Upload 2 files
Verified signatured42057b -
Rename Processor_preprocessor_config.json to preprocessor_config.json
Verified signature67be330 -
Upload Processor_preprocessor_config.json
Verified signature8aee546 -
Create config.json
Verified signature0880e45 -
Rename config.json to config2.json
Verified signatureae3845f
-
Update config.json
Verified signatureb516ab2 -
Update config.json
Verified signaturef5c1914 -
Update config.json
Verified signatured5e8b9a -
Update config.json
Verified signaturedf2b35c -
Update README.md
Verified signatured4b7c4e -
Update README.md
Verified signature15519b0 -
Update README.md
Verified signaturedf24a60 -
Update README.md
Verified signature59defb8 -
Update README.md
Verified signature12222b4 -
Update README.md
Verified signature8f8d3f3 -
Update README.md
Verified signaturee9795dc -
Update README.md
Verified signatured8e7f83 -
Update README.md
Verified signature19bcd04 -
Update README.md
Verified signature6b65156 -
Update config.json
Verified signaturec3275ed -
Update README.md
Verified signature2ff2f87 -
Update README.md
Verified signatureb2d6f27 -
Update README.md
Verified signature6a6a44b -
Update README.md
Verified signature00b0e4a -
Update README.md
Verified signatureb725d4f