MedGemma-27B-IT

Setup

export HF_TOKEN=$(cat ${HPC_WORK}/HuggingFace/AnythingLLM/HF)
source py3.11/bin/activate
python -m pip install --upgrade huggingface_hub
hf auth login
hf download bartowski/google_medgemma-27b-it-GGUF google_medgemma-27b-it-Q8_0.gguf --local-dir .
hf download bartowski/google_medgemma-27b-it-GGUF mmproj-google_medgemma-27b-it-bf16.gguf --local-dir .
module load ceuadmin/llama.cpp/0.9.0-cuda

Text

llama cli \
  -m google_medgemma-27b-it-Q8_0.gguf \
  -p "What is a protein quantitative trait locus (pQTL)?" \
  -n 300 \
  -c 65536 \
  -ngl 99

which gives

Loading model...

▄▄ ▄▄
██ ██
██ ██  ▀▀█▄ ███▄███▄  ▀▀█▄    ▄████ ████▄ ████▄
██ ██ ▄█▀██ ██ ██ ██ ▄█▀██    ██    ██ ██ ██ ██
██ ██ ▀█▄██ ██ ██ ██ ▀█▄██ ██ ▀████ ████▀ ████▀
                                    ██    ██
                                    ▀▀    ▀▀

build      : b0-unknown
model      : google_medgemma-27b-it-Q8_0.gguf
ftype      : Q8_0
modalities : text

available commands:
  /exit or Ctrl+C     stop or exit
  /regen              regenerate the last response
  /clear              clear the chat history
  /read <file>        add a text file
  /glob <pattern>     add text files using globbing pattern



> What is a protein quantitative trait locus (pQTL)?

A protein quantitative trait locus (pQTL) is a region of the genome that influences the abundance (quantity) of a specific protein. It’s essentially the genetic basis for the variation observed in protein levels within a population.

Here’s a breakdown of the concept:

Key characteristics of pQTLs:

  1. Genetic Basis of Protein Variation: They provide a genetic explanation for why protein levels differ among individuals in a population.
  2. Linkage Disequilibrium: The
[ Prompt: 160.0 t/s Generation: 26.7 t/s ]

Vision

llama cli \
  -m google_medgemma-27b-it-Q8_0.gguf \
  --mmproj mmproj-google_medgemma-27b-it-bf16.gguf \
  --image ~/work/calligraphy.jpg \
  -p "Describe this image." \
  -ngl 99

which gives,

Loading model...

▄▄ ▄▄
██ ██
██ ██  ▀▀█▄ ███▄███▄  ▀▀█▄    ▄████ ████▄ ████▄
██ ██ ▄█▀██ ██ ██ ██ ▄█▀██    ██    ██ ██ ██ ██
██ ██ ▀█▄██ ██ ██ ██ ▀█▄██ ██ ▀████ ████▀ ████▀
                                    ██    ██
                                    ▀▀    ▀▀

build      : b0-unknown
model      : google_medgemma-27b-it-Q8_0.gguf
ftype      : Q8_0
modalities : text, vision, video

available commands:
  /exit or Ctrl+C     stop or exit
  /regen              regenerate the last response
  /clear              clear the chat history
  /read <file>        add a text file
  /glob <pattern>     add text files using globbing pattern
  /image <file>       add an image file
  /video <file>       add a video file


Loaded media from '/home/jhz22/work/calligraphy.jpg'

> Describe this image.

Here’s a description of the image:

Content: The image shows a close-up of a section of a Chinese calligraphy scroll. The text is written in classical Chinese, using traditional characters. The style appears to be regular script (楷书, kǎishū), which is the most common script form.

Details:

Overall Impression: The image presents a fragment of a traditional Chinese calligraphy work, likely from a classic text. The details of the script, paper, ink, and seal contribute to its authenticity and artistic value.

[ Prompt: 577.5 t/s Generation: 22.9 t/s ]

Benchmark

$ llama cli -m google_medgemma-27b-it-Q8_0.gguf -p “Aspirin” -n 300 -c 4096 -ngl 99

Loading model...

▄▄ ▄▄
██ ██
██ ██  ▀▀█▄ ███▄███▄  ▀▀█▄    ▄████ ████▄ ████▄
██ ██ ▄█▀██ ██ ██ ██ ▄█▀██    ██    ██ ██ ██ ██
██ ██ ▀█▄██ ██ ██ ██ ▀█▄██ ██ ▀████ ████▀ ████▀
                                    ██    ██
                                    ▀▀    ▀▀

build      : b10905-5210c7c5e
model      : google_medgemma-27b-it-Q8_0.gguf
ftype      : Q8_0
modalities : text

available commands:
  /exit or Ctrl+C     stop or exit
  /regen              regenerate the last response
  /clear              clear the chat history
  /read <file>        add a text file
  /glob <pattern>     add text files using globbing pattern
> Aspirin

Aspirin is a very common medication with a long history. Here’s a breakdown of key information about it:

What it is:

Common Uses:

How it Works:

Dosages:

[ Prompt: 63.6 t/s Generation: 26.4 t/s ]
> repurpose

The word “repurpose” means to use something for a purpose other than the one for which it was originally intended. It often implies finding a new, useful function for an item that might otherwise be discarded or considered obsolete.

Here are some examples and aspects of repurposing:

Examples of Repurposing:

Synonyms:

[ Prompt: 932.0 t/s Generation: 26.3 t/s ]
> repurpose of aspirin

While aspirin is primarily known for its pain relief, fever reduction, anti-inflammatory, and antiplatelet properties, people have explored and sometimes found limited evidence for other potential uses, often referred to as “repurposing.” It’s crucial to note that many of these are not well-established, lack strong scientific evidence, or are considered experimental. Always consult a doctor before using aspirin for any purpose other than its approved indications.

Here are some potential (though often unproven or weakly supported) repurposing ideas for aspirin:

Medical/Therapeutic:

[ Prompt: 979.0 t/s Generation: 26.1 t/s ]

Reference

Sellergren, A. et al. An open vision-language model for diverse medical applications. Nature Medicine 32, 3695–3704 (2026). https://doi.org/10.1038/s41591-026-04626-w