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)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LeroyDyer/SpydazWeb_VisonEncoderDecoder_Project") model = AutoModelForCausalLM.from_pretrained("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?"} ] }, ] 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,6 +8,15 @@ tags:
|
|
| 8 |
- text-to-text
|
| 9 |
- image-text-to-image-text
|
| 10 |
pipeline_tag: image-text-to-text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
# LeroyDyer/Mixtral_AI_Cyber_Q_Vision
|
|
@@ -37,11 +46,19 @@ This is an experiment in vision - the model has been created as a mistral/Vision
|
|
| 37 |
Customized from:
|
| 38 |
|
| 39 |
```yaml
|
|
|
|
|
|
|
| 40 |
- Mixtral_AI_Cyber_Matrix_2.0(7b)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
|
| 42 |
-
- TinyMistral (248)
|
| 43 |
|
| 44 |
-
- ikim-uk-essen/BiomedCLIP_ViT_patch16_224
|
| 45 |
```
|
| 46 |
|
| 47 |
- **Developed by:** [LeroyDyer]
|
|
|
|
| 8 |
- text-to-text
|
| 9 |
- image-text-to-image-text
|
| 10 |
pipeline_tag: image-text-to-text
|
| 11 |
+
BaseModel:
|
| 12 |
+
- Mixtral_AI_Cyber_Matrix_2.0(7b)
|
| 13 |
+
Decoder:
|
| 14 |
+
- Locutusque/TinyMistral-248M-v2
|
| 15 |
+
ImageProcessor:
|
| 16 |
+
- ikim-uk-essen/BiomedCLIP_ViT_patch16_224
|
| 17 |
+
- Lin-Chen/ShareGPT4V-7B_Pretrained_vit-large336-l12
|
| 18 |
+
Encoder:
|
| 19 |
+
- google/vit-base-patch16-224-in21k
|
| 20 |
---
|
| 21 |
|
| 22 |
# LeroyDyer/Mixtral_AI_Cyber_Q_Vision
|
|
|
|
| 46 |
Customized from:
|
| 47 |
|
| 48 |
```yaml
|
| 49 |
+
|
| 50 |
+
BaseModel:
|
| 51 |
- Mixtral_AI_Cyber_Matrix_2.0(7b)
|
| 52 |
+
Decoder:
|
| 53 |
+
- Locutusque/TinyMistral-248M-v2
|
| 54 |
+
ImageProcessor:
|
| 55 |
+
- ikim-uk-essen/BiomedCLIP_ViT_patch16_224
|
| 56 |
+
- Lin-Chen/ShareGPT4V-7B_Pretrained_vit-large336-l12
|
| 57 |
+
Encoder:
|
| 58 |
+
- google/vit-base-patch16-224-in21k
|
| 59 |
+
|
| 60 |
|
|
|
|
| 61 |
|
|
|
|
| 62 |
```
|
| 63 |
|
| 64 |
- **Developed by:** [LeroyDyer]
|