Views
No views yet
| File | Format | Size | Bits | Quality | Best For |
|---|---|---|---|---|---|
medgemma-health-chat-Q4_K_M.gguf | Q4_K_M | ~2.5 GB | 4.5 | High | Recommended — best quality/size balance |
medgemma-health-chat-Q8_0.gguf | Q8_0 | ~4.3 GB | 8.0 | Excellent | Near-lossless, when memory allows |
medgemma-health-chat-F16.gguf | F16 | ~7.8 GB | 16.0 | Lossless | Full precision, conversion baseline |
python convert_hf_to_gguf.py converted the HuggingFace safetensors to GGUF F16 format (444 tensors, 7.24 GB)llama-quantize applied K-quant methods to produce Q4_K_M and Q8_0 from the F16 baseline1# Download the Q4_K_M (recommended)
2huggingface-cli download bisonnetworking/medgemma-health-chat-gguf \
3 medgemma-health-chat-Q4_K_M.gguf \
4 --local-dir ./models
5
6# Interactive chat
7./llama-cli -m ./models/medgemma-health-chat-Q4_K_M.gguf \
8 --interactive \
9 -ngl 99 \
10 -c 2048
11
12# Single prompt with system message
13./llama-cli -m ./models/medgemma-health-chat-Q4_K_M.gguf \
14 -sys "You are a board-certified Primary Care Physician. Provide direct, clinical guidance. No tables. No AI disclaimers." \
15 -p "I've had a sore throat and low-grade fever for 3 days. What should I do?" \
16 -ngl 99 \
17 -c 20481# Create a Modelfile
2cat > Modelfile << 'EOF'
3FROM ./medgemma-health-chat-Q4_K_M.gguf
4TEMPLATE """{{ if .System }}<start_of_turn>user
5{{ .System }}<end_of_turn>
6{{ end }}<start_of_turn>user
7{{ .Prompt }}<end_of_turn>
8<start_of_turn>model
9"""
10PARAMETER temperature 0.7
11PARAMETER top_p 0.9
12PARAMETER num_ctx 2048
13PARAMETER stop "<end_of_turn>"
14EOF
15
16# Create and run
17ollama create medgemma-health-chat -f Modelfile
18ollama run medgemma-health-chat "I've had a sore throat for 3 days. What should I do?"~/.cache/lm-studio/models/bisonnetworking/medgemma-health-chat-gguf/1from llama_cpp import Llama
2
3llm = Llama(
4 model_path="./medgemma-health-chat-Q4_K_M.gguf",
5 n_ctx=2048,
6 n_gpu_layers=99, # Apple Metal or CUDA offload
7 chat_format="gemma3",
8)
9
10messages = [
11 {
12 "role": "system",
13 "content": "You are a board-certified Primary Care Physician. Provide direct, clinical guidance. No tables. No AI disclaimers.",
14 },
15 {
16 "role": "user",
17 "content": "I've had a sore throat and low-grade fever (100.4) for 3 days. No cough, no swollen lymph nodes. What should I do?",
18 },
19]
20
21response = llm.create_chat_completion(
22 messages=messages,
23 max_tokens=256,
24 temperature=0.7,
25 top_p=0.9,
26)
27print(response["choices"][0]["message"]["content"])1# Start server
2./llama-server -m ./medgemma-health-chat-Q4_K_M.gguf \
3 --host 0.0.0.0 \
4 --port 8080 \
5 -ngl 99 \
6 -c 2048
7
8# Use with any OpenAI client
9curl http://localhost:8080/v1/chat/completions \
10 -H "Content-Type: application/json" \
11 -d '{
12 "model": "medgemma-health-chat",
13 "messages": [
14 {"role": "system", "content": "You are a Primary Care Physician..."},
15 {"role": "user", "content": "I have a sore throat. What should I do?"}
16 ],
17 "max_tokens": 256,
18 "temperature": 0.7
19 }'