Instructions to use BSVGK/gemma-1.1-2b-it-drugbank-kg2text-lora-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use BSVGK/gemma-1.1-2b-it-drugbank-kg2text-lora-v2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-1.1-2b-it") model = PeftModel.from_pretrained(base_model, "BSVGK/gemma-1.1-2b-it-drugbank-kg2text-lora-v2") - Notebooks
- Google Colab
- Kaggle
Gemma 1.1 2B IT โ LoRA Adapter v2 (DrugBank KG-to-Text)
Model Summary
This is the LoRA adapter v2 for the Gemma 1.1 2B IT model fine-tuned to generate fluent, hallucination-free natural language drug descriptions from pharmaceutical RDF knowledge graph triples sourced from DrugBank. It was developed as part of a UELโDepixen industrial placement research project focused on building trustworthy, domain-specific SLMs.
For the full merged model ready for inference, use: ๐ BSVGK/gemma-1.1-2b-it-drugbank-kg2text-merged-v2
Key Results
| Metric | Score |
|---|---|
| BLEU Score | 0.9737 |
| BERTScore F1 | 0.9896 |
| Fact F1 | 0.9966 |
| Hallucination Rate | 0.54% |
| Test Samples | 254 unseen DrugBank entries |
Model Details
- Base Model: google/gemma-1.1-2b-it
- Adapter Type: LoRA (Low-Rank Adaptation)
- Task: KG-to-Text โ RDF triples โ fluent drug descriptions
- Domain: Pharmaceutical โ DrugBank
- Training Dataset: 2,537 verified DrugBank RDF triples
- Hardware: NVIDIA A100
- Framework: PyTorch, Hugging Face PEFT, TRL, SFTTrainer
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM from peft import PeftModel
Load base model
base_model = AutoModelForCausalLM.from_pretrained( "google/gemma-1.1-2b-it" ) tokenizer = AutoTokenizer.from_pretrained( "google/gemma-1.1-2b-it" )
Load LoRA adapter
model = PeftModel.from_pretrained( base_model, "BSVGK/gemma-1.1-2b-it-drugbank-kg2text-lora-v2" )
prompt = """Generate a natural language description from the following RDF triples:
Triples:
- DrugA hasIndication Condition_X
- DrugA hasMechanism Mechanism_Y
- DrugA hasInteraction DrugB
Description:"""
inputs = tokenizer(prompt, return_tensors="pt") outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Dataset
- Dataset: BSVGK/drugbank_dataset
- Size: 2,537 training + 254 test samples
- Source: DrugBank pharmaceutical database
- Format: RDF Triples โ Natural Language Drug Description
Intended Use
- Pharmaceutical knowledge graph verbalisation
- Drug information summarisation and description generation
- Research in trustworthy and hallucination-free biomedical NLP
- Natural language generation from biomedical knowledge graphs
Out of Scope
- Non-pharmaceutical domains
- Clinical diagnosis or medical advice
- General purpose text generation
Important Notice
This model is intended for research purposes only. It should not be used for clinical decision-making or medical advice. Always consult a qualified healthcare professional.
Citation
@misc{bubathula2026drugbank_adapter, author = {Sai Venkata Gopala Krishna Bubathula}, title = {Gemma 1.1 2B IT LoRA Adapter v2: KG-to-Text Generation for DrugBank Pharmaceutical Data}, year = {2026}, publisher = {HuggingFace}, url = {https://huggingface.co/BSVGK/gemma-1.1-2b-it-drugbank-kg2text-lora-v2}, institution = {University of East London & Depixen} }
Developer
Sai Venkata Gopala Krishna Bubathula
๐ MSc Big Data Technologies, University of East London
๐ข AI Engineer โ UELโDepixen Industrial Placement
๐ GitHub
๐ Merged Model
๐ LinkedIn
Adapter intended for KG-to-text generation only
- Downloads last month
- 4
Model tree for BSVGK/gemma-1.1-2b-it-drugbank-kg2text-lora-v2
Base model
google/gemma-1.1-2b-it