Downloads · 30 days
100
6% of all-time downloads
Roopalgn/sahayak-tb-gemma4-e2b-gguf
sahayak-tb-gemma4-e2b-gguf is a text generation model from Roopalgn. Use it when you need the model to write or continue text. It is set up for llama-cpp-python. The card lists the license as cc-by-4.0.
Takes natural-language multi-visit notes from a DOTS (Directly Observed Treatment) provider and outputs a structured JSON risk assessment for TB treatment adherence dropout.
Downloads · 30 days
100
6% of all-time downloads
All-time downloads
1.6K
Public
Repo size
25 GB
Likes
0
Public
Click a slice to open those files.
.gguf13.7 GB · 100%
From the Hugging Face model README
Takes natural-language multi-visit notes from a DOTS (Directly Observed Treatment) provider and outputs a structured JSON risk assessment for TB treatment adherence dropout.
Input: 2-4 visit notes in English, Hindi, or mixed (as DOTS providers actually write)
Output: JSON with dropout risk tier (low/moderate/high/critical), evidence-cited risk factors with published odds ratios and PMIDs, and NTEP protocol action recommendations.
| Base model | Gemma 4 E2B-it |
| Fine-tuning | QLoRA (r=16, alpha=16, all-linear) via Unsloth |
| Training data | 500 synthetic cases from 15 published TB adherence risk factors |
| Quantization | Q4_K_M (3.43 GB) for CPU inference |
| Accuracy | 90% tier accuracy with post-processing pipeline |
| Schema compliance | 100% (constrained JSON output) |
| Inference | CPU-only via llama-cpp-python, 24-88 seconds |
from llama_cpp import Llama
llm = Llama.from_pretrained(
repo_id="Roopalgn/sahayak-tb-gemma4-e2b-gguf",
filename="gemma-4-e2b-it.Q4_K_M.gguf",
n_ctx=4096,
n_gpu_layers=0,
)
response = llm.create_chat_completion(
messages=[
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": visit_notes},
],
response_format={"type": "json_object", "schema": RISK_SCHEMA},
temperature=0.0,
)
See full system prompt and schema at: github.com/Roopalgn/gemma4good
huggingface.co/spaces/Roopalgn/sahayak-tb-demo
15 risk factors with published odds ratios from Indian TB cohort studies:
No patient-identifiable data used. Fully synthetic training data.
CC-BY 4.0
Gemma 4 Good Hackathon — Health & Sciences track + llama.cpp Prize