Instructions to use uaritm/gemmamed_cardio with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use uaritm/gemmamed_cardio with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="uaritm/gemmamed_cardio") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("uaritm/gemmamed_cardio") model = AutoModelForImageTextToText.from_pretrained("uaritm/gemmamed_cardio") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use uaritm/gemmamed_cardio with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="uaritm/gemmamed_cardio", filename="gemma_ua_med_final_q4km.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use uaritm/gemmamed_cardio with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf uaritm/gemmamed_cardio # Run inference directly in the terminal: llama-cli -hf uaritm/gemmamed_cardio
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf uaritm/gemmamed_cardio # Run inference directly in the terminal: llama-cli -hf uaritm/gemmamed_cardio
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 uaritm/gemmamed_cardio # Run inference directly in the terminal: ./llama-cli -hf uaritm/gemmamed_cardio
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 uaritm/gemmamed_cardio # Run inference directly in the terminal: ./build/bin/llama-cli -hf uaritm/gemmamed_cardio
Use Docker
docker model run hf.co/uaritm/gemmamed_cardio
- LM Studio
- Jan
- vLLM
How to use uaritm/gemmamed_cardio with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "uaritm/gemmamed_cardio" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "uaritm/gemmamed_cardio", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/uaritm/gemmamed_cardio
- SGLang
How to use uaritm/gemmamed_cardio with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "uaritm/gemmamed_cardio" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "uaritm/gemmamed_cardio", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "uaritm/gemmamed_cardio" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "uaritm/gemmamed_cardio", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use uaritm/gemmamed_cardio with Ollama:
ollama run hf.co/uaritm/gemmamed_cardio
- Unsloth Studio new
How to use uaritm/gemmamed_cardio 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 uaritm/gemmamed_cardio 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 uaritm/gemmamed_cardio to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for uaritm/gemmamed_cardio to start chatting
- Docker Model Runner
How to use uaritm/gemmamed_cardio with Docker Model Runner:
docker model run hf.co/uaritm/gemmamed_cardio
- Lemonade
How to use uaritm/gemmamed_cardio with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull uaritm/gemmamed_cardio
Run and chat with the model
lemonade run user.gemmamed_cardio-{{QUANT_TAG}}List all available models
lemonade list
- 🇺🇦 Gemma-UA-Cardio-Q4KM (Specialized Ukrainian LLM)
- 🇺🇦 Gemma-UA-Cardio-Q4KM (Specialized Ukrainian LLM)
- 🩺 High-Quality Cardiology Assistant (Ukrainian Language)
- The adaptation process involved a crucial two-stage LoRA fine-tuning approach:
1. Linguistic Adaptation on a large general Ukrainian corpus.
2. Domain Specialization on a dedicated corpus of cardiovascular health and clinical data.
- 💾 Model Details & Files
- 🚀 How to Run (via llama.cpp CLI)
- 🩺 High-Quality Cardiology Assistant (Ukrainian Language)
- 3. Example Usage (Ukrainian) This command assumes you are running from Ollama (Modelfile)
- --- IMPORTANT: Stop Tokens ---
- --- Recommended generation parameters ---
🇺🇦 Gemma-UA-Cardio-Q4KM (Specialized Ukrainian LLM)
🩺 High-Quality Cardiology Assistant (Ukrainian Language)
This model is a highly specialized, instruction-following version of the Gemma-4B-It model (based on the size of 2.4GB, likely the 8B or a heavily compressed version), meticulously fine-tuned for providing cardiology-related information and answering medical queries in Ukrainian.
The adaptation process involved a crucial two-stage LoRA fine-tuning approach:
- Linguistic Adaptation on a large general Ukrainian corpus (14500 cardiological epicrises).
- Domain Specialization on a dedicated corpus of cardiovascular health and clinical data.
💾 Model Details & Files
This repository contains the highly optimized GGUF file, ready for immediate, efficient inference on consumer hardware.
| Detail | Value |
|---|---|
| Base Model | google/gemma-4b-it |
| Language | Ukrainian (Specialized) |
| Specialization | Cardiology (Cardiovascular medicine, clinical terminology) |
| Quantization | GGUF Q4KM (Highly efficient) |
| GGUF File Size | ~2.4 GB |
| Context Length | 4096 (Recommended minimum) |
| Pipeline Tool | llama.cpp for GGUF conversion/quantization |
Downloadable Files
gemma_ua_med_final_q8.gguf: The main file, ready for use with llama.cpp, Ollama, or LM Studio.
🇺🇦 Gemma-UA-Cardio-Q4KM (Specialized Ukrainian LLM)
🩺 High-Quality Cardiology Assistant (Ukrainian Language)
This model is a highly specialized, instruction-following version of the Gemma-4B-Instruct model (based on the size of 2.4GB, likely the 4B or a heavily compressed version), meticulously fine-tuned for providing cardiology-related information and answering medical queries in Ukrainian.
The adaptation process involved a crucial two-stage LoRA fine-tuning approach: 1. Linguistic Adaptation on a large general Ukrainian corpus. 2. Domain Specialization on a dedicated corpus of cardiovascular health and clinical data.
💾 Model Details & Files
This repository contains the highly optimized GGUF file, ready for immediate, efficient inference on consumer hardware.
| Detail | Value |
|---|---|
| Base Model | google/gemma-4b-it |
| Language | Ukrainian (Specialized) |
| Specialization | Cardiology (Cardiovascular medicine, clinical terminology) |
| Quantization | GGUF Q4KM (Highly efficient) |
| GGUF File Size | ~2.4 GB |
| Context Length | 4096 (Recommended minimum) |
| Pipeline Tool | llama.cpp for GGUF conversion/quantization |
Downloadable Files
gemma_ua_med_final_q4km.gguf: The main file, ready for use with llama.cpp, Ollama, or LM Studio.
🚀 How to Run (via llama.cpp CLI)
The GGUF format is ideal for running on CPU-dominant systems or systems with smaller VRAM using the llama.cpp framework.
1. Prerequisites
Ensure you have llama.cpp compiled. You will use the llama-cli binary.
2. Command Line Interface (CLI)
Use the following command to run the model in interactive chat mode. The System Prompt (-sys) is essential for activating the cardiology persona.
3. Example Usage (Ukrainian) This command assumes you are running from Ollama (Modelfile)
FROM "./gemma_ua_med_final_q4km.gguf"
SYSTEM """ Ви — лікар-кардіолог. На основі даних пацієнта та виписного епікризу сформуйте клінічно обґрунтовані рекомендації. """
TEMPLATE """user {{ .System }}
{{ .Prompt }} model """
--- IMPORTANT: Stop Tokens ---
PARAMETER stop "" PARAMETER stop "user" PARAMETER stop "model" PARAMETER stop "system"
--- Recommended generation parameters ---
PARAMETER temperature 0.6 PARAMETER top_p 0.9 PARAMETER num_ctx 4096 PARAMETER repeat_penalty 1.15 PARAMETER repeat_last_n 256
Key Parameters: -m: Specifies the path to the GGUF model file.
-sys: System Prompt—sets the model's professional role and required language.
-t $(nproc): Utilizes all available CPU cores for maximum speed.
-i: Activates interactive chat mode.
4. Limitations
- Optimized for cardiology and cardiac surgery
- Reduced accuracy outside these domains
- No vision capabilities (text-only MedGemma IT)
- May generate incomplete or generalized recommendations
5. Citing & Authors
If you use this model in your research, please cite:
@misc{Ostashko2025MedGemmaCardiology, title = {MedGemma-4B-Cardiology: A Domain-Finetuned Clinical LLM for Cardiology}, author = {Uaritm}, year = {2025}, url = {ai.esemi.org} }
Project homepage: https://ai.esemi.org
LicenseThe use of this model is subject to the terms of the original Gemma License. Please review and adhere to the associated licensing terms for the base model.
- Downloads last month
- 61