Image-Text-to-Text
Transformers
Safetensors
gemma4
coder
coding
merged-lora
kaggle-proof
conversational
Instructions to use josephmayo/gemma-4-E4B-it-Coder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use josephmayo/gemma-4-E4B-it-Coder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="josephmayo/gemma-4-E4B-it-Coder") 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, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("josephmayo/gemma-4-E4B-it-Coder") model = AutoModelForImageTextToText.from_pretrained("josephmayo/gemma-4-E4B-it-Coder") 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
- vLLM
How to use josephmayo/gemma-4-E4B-it-Coder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "josephmayo/gemma-4-E4B-it-Coder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "josephmayo/gemma-4-E4B-it-Coder", "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/josephmayo/gemma-4-E4B-it-Coder
- SGLang
How to use josephmayo/gemma-4-E4B-it-Coder 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 "josephmayo/gemma-4-E4B-it-Coder" \ --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": "josephmayo/gemma-4-E4B-it-Coder", "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 "josephmayo/gemma-4-E4B-it-Coder" \ --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": "josephmayo/gemma-4-E4B-it-Coder", "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 josephmayo/gemma-4-E4B-it-Coder with Docker Model Runner:
docker model run hf.co/josephmayo/gemma-4-E4B-it-Coder
Upload nvidia_smi.txt with huggingface_hub
Browse files- nvidia_smi.txt +3 -3
nvidia_smi.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
+-----------------------------------------------------------------------------------------+
|
| 3 |
| NVIDIA-SMI 580.105.08 Driver Version: 580.105.08 CUDA Version: 13.0 |
|
| 4 |
+-----------------------------------------+------------------------+----------------------+
|
|
@@ -7,11 +7,11 @@ Tue May 12 19:04:42 2026
|
|
| 7 |
| | | MIG M. |
|
| 8 |
|=========================================+========================+======================|
|
| 9 |
| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |
|
| 10 |
-
| N/A
|
| 11 |
| | | N/A |
|
| 12 |
+-----------------------------------------+------------------------+----------------------+
|
| 13 |
| 1 Tesla T4 Off | 00000000:00:05.0 Off | 0 |
|
| 14 |
-
| N/A
|
| 15 |
| | | N/A |
|
| 16 |
+-----------------------------------------+------------------------+----------------------+
|
| 17 |
|
|
|
|
| 1 |
+
Thu May 14 12:08:27 2026
|
| 2 |
+-----------------------------------------------------------------------------------------+
|
| 3 |
| NVIDIA-SMI 580.105.08 Driver Version: 580.105.08 CUDA Version: 13.0 |
|
| 4 |
+-----------------------------------------+------------------------+----------------------+
|
|
|
|
| 7 |
| | | MIG M. |
|
| 8 |
|=========================================+========================+======================|
|
| 9 |
| 0 Tesla T4 Off | 00000000:00:04.0 Off | 0 |
|
| 10 |
+
| N/A 52C P8 10W / 70W | 3MiB / 15360MiB | 0% Default |
|
| 11 |
| | | N/A |
|
| 12 |
+-----------------------------------------+------------------------+----------------------+
|
| 13 |
| 1 Tesla T4 Off | 00000000:00:05.0 Off | 0 |
|
| 14 |
+
| N/A 51C P8 11W / 70W | 3MiB / 15360MiB | 0% Default |
|
| 15 |
| | | N/A |
|
| 16 |
+-----------------------------------------+------------------------+----------------------+
|
| 17 |
|