Instructions to use momoe5445/gemma2-handy-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use momoe5445/gemma2-handy-lora 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 momoe5445/gemma2-handy-lora:Q4_K_M # Run inference directly in the terminal: llama cli -hf momoe5445/gemma2-handy-lora:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf momoe5445/gemma2-handy-lora:Q4_K_M # Run inference directly in the terminal: llama cli -hf momoe5445/gemma2-handy-lora:Q4_K_M
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 momoe5445/gemma2-handy-lora:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf momoe5445/gemma2-handy-lora:Q4_K_M
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 momoe5445/gemma2-handy-lora:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf momoe5445/gemma2-handy-lora:Q4_K_M
Use Docker
docker model run hf.co/momoe5445/gemma2-handy-lora:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use momoe5445/gemma2-handy-lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "momoe5445/gemma2-handy-lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "momoe5445/gemma2-handy-lora", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/momoe5445/gemma2-handy-lora:Q4_K_M
- Ollama
How to use momoe5445/gemma2-handy-lora with Ollama:
ollama run hf.co/momoe5445/gemma2-handy-lora:Q4_K_M
- Unsloth Desktop
- Docker Model Runner
How to use momoe5445/gemma2-handy-lora with Docker Model Runner:
docker model run hf.co/momoe5445/gemma2-handy-lora:Q4_K_M
- Lemonade
How to use momoe5445/gemma2-handy-lora with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull momoe5445/gemma2-handy-lora:Q4_K_M
Run and chat with the model
lemonade run user.gemma2-handy-lora-Q4_K_M
List all available models
lemonade list
- Atomic Chat
gemma2-handy-lora
What is this?
A fine-tuned google/gemma-2-2b-it (2B params) that acts as a
post-processing layer for voice-driven coding tools. It sits between your
speech-to-text (STT) app and your code.
The problem it solves
Speech-to-text engines output exactly what you said β full of filler, hedging, and loose phrasing ("kind of don't hit the server so much maybe?"). Code commands need to be one short, unambiguous instruction that an app can act on. This model closes that gap.
What it does
Takes the raw transcription and rewrites it into a single canonical engineering instruction in your voice, picking the precise domain term for what you meant:
| you say (STT output) | what you meant | model output |
|---|---|---|
| "don't hit the server so much" | rate limiting | Rate-limit the API calls. |
| "make sure this only runs once" | idempotency | Make the webhook handler idempotent. |
| "load images only when they appear" | lazy loading | Lazy-load images as they enter the viewport. |
It classifies input into 11 canonical domains:
rate-limit, cron, mock, debounce, circuit-breaker, optimistic,
lazy-load, backpressure, idempotent, blue-green, event-sourcing β
and falls back to fixing spelling/filler when input fits no domain.
Why a 2B fine-tune instead of a big API model?
- Private β runs 100% locally (Ollama / llama.cpp); your voice never leaves your machine.
- Fast + free β no per-call cost, no network round-trip, ~30 ms on a Mac.
- Predictable β constrained to canonical domains, so output is app-actionable, not a chatty LLM reply.
Files
gemma2-q4_k_m.ggufβ Q4_K_M quantized model (1.7 GB), ready for llama.cpp / Ollama.Modelfileβ Ollama model definition (ollama create gemma2:handy-lora -f Modelfile).runtime_template.txtβ prompt template with exemplars; must be used as the system prompt at inference (ablation: 23/25 with exemplars vs 17/25 without).
Training
- Base:
google/gemma-2-2b-it(gated, accepts Gemma license) - Method: QLoRA-style LoRA (r=16, Ξ±=32, dropout 0.1) on all linear projections
- Data: 794 synthetic pairs (11 terms) / 108 holdout
- Recipe: 4 epochs (early stop patience 1), lr 1e-4 cosine, fp16, batch 1 Γ grad-accum 8, max_grad_norm 0.5; best checkpoint selected by eval loss
- GPU: single Modal L4 (~30 min)
Evaluation
25 never-seen real user prompts (verified disjoint from train + holdout): 23/25 canonical-term hits. Known misses: an "optimistic" like-button update and an "event-sourcing" order-history phrasing (answers are close but not canonical).
Usage
Ollama
ollama create gemma2:handy-lora -f Modelfile
curl http://localhost:11434/v1/chat/completions -d '{
"model": "gemma2:handy-lora",
"messages": [
{"role": "system", "content": "<paste runtime_template.txt>"},
{"role": "user", "content": "don't hit the server so much"}
],
"temperature": 0.2,
"max_tokens": 20
}'
llama.cpp
llama-cli -m gemma2-q4_k_m.gguf -p "<prompt>" -n 20 --temp 0.2
Repo
Code, dataset generator, training pipeline, and eval harness: https://github.com/moe5445/gemma2-handy-finetune
- Downloads last month
- 27
4-bit