Instructions to use madrisight/madrimed1.2-VL-2B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use madrisight/madrimed1.2-VL-2B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf madrisight/madrimed1.2-VL-2B-GGUF: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 madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf madrisight/madrimed1.2-VL-2B-GGUF: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 madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M
Use Docker
docker model run hf.co/madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use madrisight/madrimed1.2-VL-2B-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "madrisight/madrimed1.2-VL-2B-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "madrisight/madrimed1.2-VL-2B-GGUF", "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/madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M
- Ollama
How to use madrisight/madrimed1.2-VL-2B-GGUF with Ollama:
ollama run hf.co/madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use madrisight/madrimed1.2-VL-2B-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use madrisight/madrimed1.2-VL-2B-GGUF with Docker Model Runner:
docker model run hf.co/madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M
- Lemonade
How to use madrisight/madrimed1.2-VL-2B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.madrimed1.2-VL-2B-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use madrisight/madrimed1.2-VL-2B-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf madrisight/madrimed1.2-VL-2B-GGUF: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 madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use madrisight/madrimed1.2-VL-2B-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "madrisight/madrimed1.2-VL-2B-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Madrimed1.2 2B GGUF
Optimized GGUF Quantization Tiers for MadriMed 1.2 (2B Medical Mulitmodel)
Overview
This repository provides official GGUF-quantized binaries of MadriMed 1.2 (Madrimed1.2-VL-2B), a compact 2B parameter medical vision-language model. These files are optimized for high-performance, low-latency local execution using llama.cpp, llama-server, llama-cpp-python, and Ollama.
Model Architecture & Dual-File Requirement
GGUF multimodal pipelines require a dual-file architecture:
- The Language Backbone (
medmax-2b-[quant].gguf): Autoregressive transformer decoder (28 layers) handling clinical text generation and reasoning. - The Multimodal Projector (
mmproj-[quant].gguf): Vision encoder and DeepStack patch merger (qwen3vl_merger) processing image inputs at a 768 resolution.
Crucial Note: To perform visual inference, you must pass both the quantized model file (
-m) and the vision projector file (--mmproj).
Complete Quantization Inventory
| File Name | Format | Size | Description & Recommended Use |
|---|---|---|---|
mmproj-f16.gguf |
F16 | ~781 MiB | Reference vision projector (Maximum visual fidelity). |
mmproj-Q8_0.gguf |
Q8_0 | 421 MiB | Recommended Vision Projector: ~46% smaller than F16 with subminimal perceptible visual loss. |
medmax-2b-f16.gguf |
F16 | 4.06 GB | Half precision reference (16.0 BPW). |
medmax-2b-Q8_0.gguf |
Q8_0 | 2.01 GB | High-precision (8.5 BPW). Ideal for clinical exam reasoning. |
medmax-2b-Q6_K.gguf |
Q6_K | 1.55 GB | Recommended Sweet Spot: Very high quality (6.56 BPW) with minimal perplexity degradation. |
medmax-2b-Q5_K_M.gguf |
Q5_K_M | 1.37 GB | Medium 5-bit quantization (5.77 BPW). Excellent quality-to-RAM balance. |
medmax-2b-Q5_K_S.gguf |
Q5_K_S | 1.31 GB | Compact 5-bit quantization (5.66 BPW). |
medmax-2b-Q4_K_M.gguf |
Q4_K_M | 1.21 GB | Standard Deployment: Optimal speed, low RAM, and high VQA grounding (5.03 BPW). |
medmax-2b-Q4_K_S.gguf |
Q4_K_S | 1.17 GB | Smaller 4-bit variant (4.84 BPW). |
medmax-2b-IQ4_XS.gguf |
IQ4_XS | 1.12 GB | Importance-matrix 4-bit quantization (4.63 BPW). |
medmax-2b-Q3_K_L.gguf |
Q3_K_L | 1.07 GB | Large 3-bit variant (4.45 BPW). |
medmax-2b-Q3_K_M.gguf |
Q3_K_M | 0.99 GB | Low Memory: Medium 3-bit quantization (~1 GB flat model size) (4.20 BPW). |
medmax-2b-Q3_K_S.gguf |
Q3_K_S | 948 MiB | Low Memory: Small 3-bit variant (3.92 BPW). |
medmax-2b-Q2_K.gguf |
Q2_K | 833 MiB | Extreme Compression: Ultra-low memory environments (3.44 BPW). |
Deployment & Usage Guide
1. Local CLI Inference (llama-cli)
Run quick diagnostic queries directly in your terminal:
!./llama.cpp/build/bin/llama-cli \
-m medmax-2b-Q6_K.gguf \
--mmproj mmproj-Q8_0.gguf \
--image /path/to/scan.jpg \
-p "Question: What abnormality is visible in this scan? Answer:" \
--image-min-tokens 1024 \
-ngl 99
Important Flag: Always include --image-min-tokens 1024 for clinical grounding tasks. Qwen-VL architectures require adequate token allocation to maintain high-resolution perception on subtle lesions.
2. OpenAI-Compatible API Server (llama-server)
Host a local server on your machine for integration into applications:
./llama.cpp/build/bin/llama-server \
-m medmax-2b-Q6_K.gguf \
--mmproj mmproj-Q8_0.gguf \
-c 8192 \
-np 1 \
-ngl 99 \
--port 8080 \
--image-min-tokens 1024
3. OpenAI SDK
import base64
from openai import OpenAI
client = OpenAI(base_url="[http://127.0.0.1:8080/v1](http://127.0.0.1:8080/v1)", api_key="none")
def encode_image(image_path):
with open(image_path, "rb") as f:
return base64.b64encode(f.read()).decode("utf-8")
image_b64 = encode_image("chest_xray.jpg")
response = client.chat.completions.create(
model="madrimed1.2-2b",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Is there evidence of consolidation?"},
{"type": "image_url", "image_url": {"url": f"data:image/jpeg;base64,{image_b64}"}}
]
}
],
max_tokens=128,
temperature=0.0
)
print(response.choices[0].message.content)
Limitations & Safety Guidelines
Research & Educational Use Only
MadriMed 1.2-GGUF is an experimental research model. It is not certified for autonomous clinical diagnostic decision-making. All model-generated interpretations and visual inferences should be reviewed and independently verified by a licensed medical professional before use in any clinical workflow.
- Downloads last month
- 803
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for madrisight/madrimed1.2-VL-2B-GGUF
Base model
Qwen/Qwen3-VL-2B-Thinking