Image-Text-to-Text
Transformers
Safetensors
gemma3n
automatic-speech-recognition
automatic-speech-translation
audio-text-to-text
video-text-to-text
matformer
conversational
Instructions to use capriciousmarauder/test-submodel-3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use capriciousmarauder/test-submodel-3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="capriciousmarauder/test-submodel-3") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("capriciousmarauder/test-submodel-3") model = AutoModelForMultimodalLM.from_pretrained("capriciousmarauder/test-submodel-3", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use capriciousmarauder/test-submodel-3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "capriciousmarauder/test-submodel-3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "capriciousmarauder/test-submodel-3", "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/capriciousmarauder/test-submodel-3
- SGLang
How to use capriciousmarauder/test-submodel-3 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 "capriciousmarauder/test-submodel-3" \ --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": "capriciousmarauder/test-submodel-3", "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 "capriciousmarauder/test-submodel-3" \ --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": "capriciousmarauder/test-submodel-3", "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 capriciousmarauder/test-submodel-3 with Docker Model Runner:
docker model run hf.co/capriciousmarauder/test-submodel-3
Update README.md with Gemma3n-E4B-it scores
Browse files
README.md
CHANGED
|
@@ -13,6 +13,7 @@ tags:
|
|
| 13 |
---
|
| 14 |
|
| 15 |
```
|
|
|
|
| 16 |
mtx@mtx-cv-m13-gpu-master-14:~/Desktop/personal/vlms/evals/VLMEvalKit$ cat outputs/Gemma3n-E2B-it-ts3/*/*.json
|
| 17 |
{
|
| 18 |
"en_text_recognition": 0.5459304480487074,
|
|
@@ -24,6 +25,19 @@ mtx@mtx-cv-m13-gpu-master-14:~/Desktop/personal/vlms/evals/VLMEvalKit$ cat outpu
|
|
| 24 |
"en_knowledge_reasoning": 0.4669721878768469,
|
| 25 |
"English Overall Score": 0.3146145912885819
|
| 26 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
```
|
| 28 |
|
| 29 |
> [!Note]
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
```
|
| 16 |
+
# score for test-submodel-3, which is a slice of Gemma3n-E4B-it
|
| 17 |
mtx@mtx-cv-m13-gpu-master-14:~/Desktop/personal/vlms/evals/VLMEvalKit$ cat outputs/Gemma3n-E2B-it-ts3/*/*.json
|
| 18 |
{
|
| 19 |
"en_text_recognition": 0.5459304480487074,
|
|
|
|
| 25 |
"en_knowledge_reasoning": 0.4669721878768469,
|
| 26 |
"English Overall Score": 0.3146145912885819
|
| 27 |
}
|
| 28 |
+
|
| 29 |
+
# score for Gemma3n-E2B-it, google's official published submodel of Gemma3n-E4B-it
|
| 30 |
+
mtx@mtx-cv-m13-gpu-master-14:~/Desktop/personal/vlms/evals/VLMEvalKit$ cat outputs/Gemma3n-E2B-it/T202*/*.json
|
| 31 |
+
{
|
| 32 |
+
"en_text_recognition": 0.6096878412118829,
|
| 33 |
+
"en_text_detection": 0.23172620479653033,
|
| 34 |
+
"en_text_spotting": 0.0,
|
| 35 |
+
"en_element_parsing": 0.04,
|
| 36 |
+
"en_mathematical_calculation": 0.3240026170865559,
|
| 37 |
+
"en_visual_text_understanding": 0.7103983997859018,
|
| 38 |
+
"en_knowledge_reasoning": 0.5074402603391522,
|
| 39 |
+
"English Overall Score": 0.34617933188857475
|
| 40 |
+
}
|
| 41 |
```
|
| 42 |
|
| 43 |
> [!Note]
|