Downloads · 30 days
16
29% of all-time downloads
dlyog/gemma-cure
gemma-cure is a text generation model from dlyog. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as gemma.
Gemma 4 E2B fine-tuned on 225K drug–target pairs for novel small-molecule generation.
Downloads · 30 days
16
29% of all-time downloads
All-time downloads
55
Public
Repo size
281 MB
Likes
1
Public
Click a slice to open those files.
.safetensors248 MB · 89%
From the Hugging Face model README
Gemma 4 E2B fine-tuned on 225K drug–target pairs for novel small-molecule generation.
Built for the Kaggle Gemma 4 Good Hackathon 2026 by DLYog Lab.
Gemma-Cure takes a protein target name, amino-acid sequence, and measured binding affinity, then generates:
The model is designed for educational drug discovery — explaining reasoning in plain English accessible to early researchers and high school students.
Try it now: Deep2Lead Platform — PathoHunt 3D game uses this model live
| Parameter | Value |
|---|---|
| Base model | unsloth/gemma-4-E2B-it-unsloth-bnb-4bit |
| Architecture | Gemma 4 E2B (5.2B parameters) |
| Adapter type | RS-LoRA (Rank-Stabilised LoRA) |
| LoRA rank (r) | 32 |
| LoRA alpha | 64 |
| Trainable params | 62M / 5.2B (1.2%) |
| Training dataset | 225,000 drug–target binding pairs |
| Data sources | BindingDB, ChEMBL, MOSES |
| Training framework | Unsloth + HuggingFace TRL SFTTrainer |
| Hardware | NVIDIA GB10 Grace Blackwell (122GB VRAM) |
| Training time | ~3 hours total (iterative runs) |
| Final LR | 2e-5 (cosine scheduler) |
| Batch size | 8 × 16 gradient accumulation = 128 effective |
| Quantization | 4-bit (BnB NF4) |
Training used a custom EvalAndStopCallback that evaluates drug quality every 100 steps on 3 benchmark targets and stops automatically when a pharmaceutical quality gate passes:
Evaluated on 3 benchmark drug targets using RDKit SMILES validation and QED scoring:
| Target | SMILES | QED |
|---|---|---|
| SARS-CoV-2 Main Protease | O=C(O)c1ccc(-n2cc(Nc3ccccc3)cn2)o1 | 0.761 |
| EGFR Kinase | CN(C)c1ccc(-n2cc(NC(=O)[C@](Cc3ccccc3)N=O)nc2OC)cn1 | 0.591 |
| BACE1 Alzheimer target | CN(C)c1ccc(-n2cc(N[C@@H]3CC4CCN(CCc5ccccc5Cl)CC4CCC3)nc2O)[nH]1 | 0.421 |
| Metric | Base Gemma 4 | v2 baseline | Gemma-Cure (final) |
|---|---|---|---|
| SMILES validity | 0% | 33% | 100% |
| Average QED | 0.000 | 0.116 | 0.591 |
| Composite score | 0.000 | 0.224 | 0.795 |
Quality gate passed at step 100 of run 2 (41 minutes of training).
pip install unsloth
from unsloth import FastModel
model, processor = FastModel.from_pretrained(
model_name="dlyog/gemma-cure", # downloads base + adapter automatically
load_in_4bit=True,
max_seq_length=2048,
)
FastModel.for_inference(model)
SYSTEM = (
"You are Deep2Lead's drug discovery AI v2. When given a protein target or biological "
"context, first reason about the binding pocket geometry, key residues, and desired "
"physicochemical profile (2-3 sentences), then output novel drug-like SMILES molecules. "
"Always label your reasoning as 'Rationale:' and your molecules as 'SMILES:'. Explain "
"choices in plain English suitable for high school students and early researchers. "
"Prioritize selectivity, low toxicity, and synthetic accessibility."
)
messages = [
{"role": "system", "content": [{"type": "text", "text": SYSTEM}]},
{"role": "user", "content": [{"type": "text", "text": (
"Target: EGFR Kinase\n"
"Protein sequence (first 150 AA): MRPSGTAGAALLALLAALCPASRALEEKKVCQGTSNKLTQLGTFEDHFLSLQ"
"RMFNNCEVVLGNLEITYVQRNYDLSFLKTIQEVAGYVLIALNTVERIPLENLQIIRGNMYYENSYALAVLSNYDANKTGLKELPMRNLQEILHGAVR\n"
"Measured binding affinity: IC50 = 2.0 nM\n"
"Design a small molecule drug candidate with high binding affinity to this target. "
"First explain your structural reasoning, then provide the SMILES.\n"
"Requirements: MW 200-500 Da, QED > 0.50, SAS <= 5.0, Lipinski Ro5 compliant."
)}]},
]
inputs = processor.apply_chat_template(
messages, tokenize=True, return_dict=True,
return_tensors="pt", add_generation_prompt=True,
).to("cuda")
with __import__("torch").no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=350,
temperature=0.9,
top_p=0.92,
top_k=50,
repetition_penalty=1.3,
do_sample=True,
)
response = processor.decode(
outputs[0][inputs["input_ids"].shape[1]:],
skip_special_tokens=True
)
print(response)
Rationale: The EGFR kinase active site contains a conserved ATP-binding hinge region
with Cys797 as a key covalent anchor point. A pyrimidine-aniline scaffold provides
optimal hinge binding geometry while maintaining MW within the 200-500 Da window
and favorable LogP for cell penetration.
SMILES: CN(C)c1ccc(-c2nc(Nc3ccccc3F)c(C#N)cn2)cc1
The model expects this exact format (use processor.apply_chat_template):
System: You are Deep2Lead's drug discovery AI v2...
User:
Target: <target name>
Protein sequence (first 150 AA): <sequence>
Measured binding affinity: <Ki/IC50/Kd value>
Design a small molecule drug candidate...
Requirements: MW 200-500 Da, QED > 0.50, SAS ≤ 5.0, Lipinski Ro5 compliant.
Training data: 225,000 drug–target binding pairs curated from:
| Source | Records | Description |
|---|---|---|
| BindingDB | ~150K | Experimental binding affinities (Ki, IC50, Kd) |
| ChEMBL | ~50K | Bioactive molecules with target annotations |
| MOSES | ~25K | Drug-like SMILES diversity scaffold |
Each record: {target_name, protein_sequence_150AA, binding_affinity, smiles, rationale}
c1c1c1c1.... Matches deployment params.@misc{gemma-cure-2026,
title = {Gemma-Cure: Drug Discovery LoRA Adapter for Gemma 4 E2B},
author = {Tarun Kumar Chawdhury},
year = {2026},
howpublished = {HuggingFace Model Hub},
url = {https://huggingface.co/dlyog/gemma-cure},
note = {Fine-tuned on 225K drug-target pairs. Kaggle Gemma 4 Good Hackathon 2026.}
}
This adapter is released under the Gemma Terms of Use. The base model weights remain subject to the original Gemma license.