qiaojin/PubMedQA
Viewer • Updated • 274k • 85.8k • 340
How to use lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF with llama.cpp:
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
# 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 lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
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 lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
docker model run hf.co/lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
How to use lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-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": "lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
How to use lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF with Ollama:
ollama run hf.co/lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
How to use lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF with Pi:
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
# 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": "lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M"
}
]
}
}
}# Start Pi in your project directory: pi
How to use lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF with Docker Model Runner:
docker model run hf.co/lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
How to use lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
lemonade run user.Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF-Q4_K_M
lemonade list
How to use lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF with Hermes Agent:
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
# 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 lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
hermes
How to use lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF with OpenClaw:
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M
# 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 "lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
openclaw agent --local --agent main --message "Hello from Hugging Face"
Gemma-4-E2B-it fine-tuned on PubMedQA using SFT and RLVR.
Also check out the training code on GitHub.
# !pip install llama-cpp-python
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="lukasdrews/Gemma-4-E2B-IT-SFT-RLVR-Medical-GGUF",
filename="gemma-4-E2B-it-sft-rlvr-medical-Q4_K_M.gguf",
verbose=False,
)
messages = [
{
"role": "user",
"content": [
{"type": "text", "text": "Do GEC produce and bear factor H under complement attack?"}
]
},
]
outputs = llm.create_chat_completion(messages, max_tokens=1024)
print(outputs["choices"][0]["message"]["content"])
| Model | Quantization | PubMedQA (In-Domain) |
MedQA-USMLE (Zero-Shot Transfer) |
|---|---|---|---|
| Gemma-4-E2B-it (base model) | - | 58.10 % | 29.54 % |
| Gemma-4-E2B-it + SFT + RLVR | - | 73.10 % | 43.05 % |
| Gemma-4-E2B-it + SFT + RLVR | Q8_0 | 72.40 % | 43.00 % |
| Gemma-4-E2B-it + SFT + RLVR | Q6_K | 72.10 % | 42.18 % |
| Gemma-4-E2B-it + SFT + RLVR | Q5_K_M | 72.00 % | 38.88 % |
| Gemma-4-E2B-it + SFT + RLVR | Q4_K_M | 71.80 % | 38.88 % |
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Base model
google/gemma-4-E2B