Instructions to use Mathos34400/resilient-challenge-image-to-text with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Mathos34400/resilient-challenge-image-to-text with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Mathos34400/resilient-challenge-image-to-text", filename="gemma-4-q4_k_m.gguf", )
llm.create_chat_completion( messages = "\"cats.jpg\"" )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Mathos34400/resilient-challenge-image-to-text with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Mathos34400/resilient-challenge-image-to-text:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Mathos34400/resilient-challenge-image-to-text:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Mathos34400/resilient-challenge-image-to-text:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Mathos34400/resilient-challenge-image-to-text:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Mathos34400/resilient-challenge-image-to-text:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Mathos34400/resilient-challenge-image-to-text:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Mathos34400/resilient-challenge-image-to-text:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Mathos34400/resilient-challenge-image-to-text:Q4_K_M
Use Docker
docker model run hf.co/Mathos34400/resilient-challenge-image-to-text:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Mathos34400/resilient-challenge-image-to-text with Ollama:
ollama run hf.co/Mathos34400/resilient-challenge-image-to-text:Q4_K_M
- Unsloth Studio new
How to use Mathos34400/resilient-challenge-image-to-text with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Mathos34400/resilient-challenge-image-to-text to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Mathos34400/resilient-challenge-image-to-text to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Mathos34400/resilient-challenge-image-to-text to start chatting
- Pi new
How to use Mathos34400/resilient-challenge-image-to-text with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Mathos34400/resilient-challenge-image-to-text:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Mathos34400/resilient-challenge-image-to-text:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Mathos34400/resilient-challenge-image-to-text with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf Mathos34400/resilient-challenge-image-to-text:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default Mathos34400/resilient-challenge-image-to-text:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use Mathos34400/resilient-challenge-image-to-text with Docker Model Runner:
docker model run hf.co/Mathos34400/resilient-challenge-image-to-text:Q4_K_M
- Lemonade
How to use Mathos34400/resilient-challenge-image-to-text with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Mathos34400/resilient-challenge-image-to-text:Q4_K_M
Run and chat with the model
lemonade run user.resilient-challenge-image-to-text-Q4_K_M
List all available models
lemonade list
Access to Mathos34400/resilient-challenge-image-to-text
This repository contains a compressed Gemma-4-E4B-it model submitted for the Resilient AI Challenge 2026 (image-to-text category). Access is granted manually. The original Gemma license applies.
By requesting access you confirm that you accept the Gemma license terms (https://ai.google.dev/gemma/terms) and that you will use this model in compliance with it.
Log in or Sign Up to review the conditions and access this model content.
Gemma-4-E4B-it — Q4_K_M GGUF + Q8_0 mmproj
Submission for the Resilient AI Challenge 2026 — image-to-text category.
Quantized multimodal version of Google's Gemma-4-E4B-it, packaged for inference on a single NVIDIA L4 (24 GB).
Runtime:
llama.cpp(llama-server). Image-to-text inference requiresllama.cppwith the included multimodal projector (mmproj). vLLM's GGUF backend does not currently support multimodal Gemma 4 inference, so vLLM cannot be used for image input on this submission.
Files
| File | Role |
|---|---|
gemma-4-q4_k_m.gguf |
Language model — Q4_K_M K-quant (4-bit, imatrix-calibrated) |
mmproj-gemma-4-E4B-it-Q8_0.gguf |
Multimodal projector (vision encoder + projection) — Q8_0 |
vllm_config.yaml |
vLLM config (text-only path; kept for completeness, not viable for image input) |
config.json, processor_config.json, generation_config.json, tokenizer*, chat_template.jinja |
HF configs / tokenizer / chat template |
Compression
The compression is fully llama.cpp-based and uses importance-matrix-guided 4-bit quantization to preserve quality at low bit-width:
- F16 GGUF conversion. The original
Gemma-4-E4B-itcheckpoint is converted to a full-precision GGUF inF16(convert_hf_to_gguf.py). - Importance-matrix (imatrix) computation. An
imatrixis computed from a calibration dataset withllama.cpp'simatrixtool. - Imatrix-guided Q4_K_M quantization. The F16 GGUF is quantized to Q4_K_M with
llama-quantize, passing the imatrix file so the K-quant mix uses the importance information.
The vision projector is shipped as Q8_0 — quantizing the small projector to 8-bit instead of carrying the BF16 file (~990 MB) saves bandwidth and VRAM without measurable quality loss.
Inference — llama-server (required for image input)
llama-server \
-m gemma-4-q4_k_m.gguf \
--mmproj mmproj-gemma-4-E4B-it-Q8_0.gguf
llama-server exposes an OpenAI-compatible /v1/chat/completions endpoint, uses the included chat_template.jinja automatically, and accepts images via the standard image_url content blocks.
The equivalent CLI for local testing is llama-mtmd-cli:
llama-mtmd-cli \
-m gemma-4-q4_k_m.gguf \
--mmproj mmproj-gemma-4-E4B-it-Q8_0.gguf \
--image /path/to/image.jpg \
-p "Describe the image."
vLLM (text-only — not used for evaluation)
A vllm_config.yaml is provided at the repo root and would be picked up by vllm serve …. However, vLLM's GGUF backend does not support multimodal Gemma 4: it can load the text model but cannot consume images. The image-to-text task therefore runs only under llama.cpp for this submission.
Hardware target
- GPU: NVIDIA L4 (24 GB), single GPU.
- Runtime: latest
llama.cpp/llama-server(with multimodal--mmprojsupport, available since the Gemma 4 vision PR inllama.cpp).
License
Released under the Gemma license (https://ai.google.dev/gemma/terms), the same license as the base model.
- Downloads last month
- 39
4-bit