PEFT
Safetensors
GGUF
English
medical
clinical-notes
patient-communication
lora
medgemma
conversational
Run this model with HF Jobs
Run dejori/note-explain on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/dejori/note-explain. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/dejori/note-explain on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use dejori/note-explain with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use dejori/note-explain with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use dejori/note-explain 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 dejori/note-explain:Q4_K_M # Run inference directly in the terminal: llama cli -hf dejori/note-explain:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf dejori/note-explain:Q4_K_M # Run inference directly in the terminal: llama cli -hf dejori/note-explain:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf dejori/note-explain:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf dejori/note-explain:Q4_K_M
Use Docker
docker model run hf.co/dejori/note-explain:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use dejori/note-explain with Ollama:
ollama run hf.co/dejori/note-explain:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use dejori/note-explain with Docker Model Runner:
docker model run hf.co/dejori/note-explain:Q4_K_M
- Lemonade
How to use dejori/note-explain with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull dejori/note-explain:Q4_K_M
Run and chat with the model
lemonade run user.note-explain-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Upload README.md with huggingface_hub
Browse files6 unmodified lines78910111211 unmodified lines242526272829303132333435363738394041424310 unmodified lines54555657585960616263646566676869706 unmodified lines- lora- peft- medgemmalanguage:- enlibrary_name: peft11 unmodified lines| **gemma-2b-dpo** | gemma-2-2b-it | DPO comparison | **73%** | **82%** | 61% || **gemma-9b-dpo** | gemma-2-9b-it | Teacher model | 79% | 91% | 70% |## Usage```pythonfrom peft import PeftModelfrom transformers import AutoModelForCausalLM, AutoTokenizer# Load the distilled model (recommended for deployment)base_model = AutoModelForCausalLM.from_pretrained("google/gemma-2-2b-it")tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")model = PeftModel.from_pretrained(base_model, "dejori/note-explain", subfolder="gemma-2b-distilled")# Or load the DPO model (higher accuracy)model = PeftModel.from_pretrained(base_model, "dejori/note-explain", subfolder="gemma-2b-dpo")# Generateprompt = "Simplify this clinical note for a patient:\n\n[clinical note]\n\nSimplified version:"inputs = tokenizer(prompt, return_tensors="pt")10 unmodified linesTraining data: [dejori/note-explain](https://huggingface.co/datasets/dejori/note-explain)## Citation```bibtex@misc{noteexplain2026,title={NoteExplain: Privacy-First Clinical Note Simplification},author={Dejori, Mathaeus},year={2026},publisher={HuggingFace}}```## LicenseApache 2.06 unmodified lines7891011121311 unmodified lines25262728293031323334353637383940414243444546474849505152535455565758596061626364656667686910 unmodified lines8081828384856 unmodified lines- lora- peft- medgemma- gguflanguage:- enlibrary_name: peft11 unmodified lines| **gemma-2b-dpo** | gemma-2-2b-it | DPO comparison | **73%** | **82%** | 61% || **gemma-9b-dpo** | gemma-2-9b-it | Teacher model | 79% | 91% | 70% |## GGUF for Mobile/Local InferencePre-quantized GGUF models (Q4_K_M, ~1.6GB each) for llama.cpp, Ollama, LM Studio:| File | Description | Download ||------|-------------|----------|| `gguf/gemma-2b-distilled-q4_k_m.gguf` | Distilled model (better patient communication) | [Download](https://huggingface.co/dejori/note-explain/resolve/main/gguf/gemma-2b-distilled-q4_k_m.gguf) || `gguf/gemma-2b-dpo-q4_k_m.gguf` | DPO model (higher accuracy) | [Download](https://huggingface.co/dejori/note-explain/resolve/main/gguf/gemma-2b-dpo-q4_k_m.gguf) |### Quick Start with Ollama```bash# Download and runollama run hf.co/dejori/note-explain:gemma-2b-distilled-q4_k_m.gguf```### Quick Start with llama.cpp```bash# Downloadwget https://huggingface.co/dejori/note-explain/resolve/main/gguf/gemma-2b-distilled-q4_k_m.gguf# Run./llama-cli -m gemma-2b-distilled-q4_k_m.gguf -p "Simplify this clinical note for a patient: [your note]"```## LoRA AdaptersFor fine-tuning or full-precision inference:```pythonfrom peft import PeftModelfrom transformers import AutoModelForCausalLM, AutoTokenizer# Load the distilled modelbase_model = AutoModelForCausalLM.from_pretrained("google/gemma-2-2b-it")tokenizer = AutoTokenizer.from_pretrained("google/gemma-2-2b-it")model = PeftModel.from_pretrained(base_model, "dejori/note-explain", subfolder="gemma-2b-distilled")# Generateprompt = "Simplify this clinical note for a patient:\n\n[clinical note]\n\nSimplified version:"inputs = tokenizer(prompt, return_tensors="pt")10 unmodified linesTraining data: [dejori/note-explain](https://huggingface.co/datasets/dejori/note-explain)## LicenseApache 2.0
README.md+31-16