AlzBot: Alzheimer's Disease Research Assistant (LoRA Adapter)

A domain-specific LoRA adapter fine-tuned on 95,374 biomedical records (~110M tokens) from 13 public data sources, specializing in Alzheimer's disease research.

Model Details

Parameter Value
Base Model Qwen/Qwen3-4B-Instruct-2507
Adapter Type LoRA (r=64, ฮฑ=128)
Trainable Parameters 161.5M (2.1% of 7.66B total)
Training Data 95,374 examples from 13 biomedical APIs
Training Tokens ~110M
Best Eval Loss 0.830
Token Accuracy 80.4%
Training Time 72.6 hours on NVIDIA A10G
Training Cost ~$88

Data Sources

The AlzCorpus was constructed from 13 public biomedical APIs:

  • Europe PMC (75,954 articles) โ€” research abstracts and open-access full text
  • openFDA (25,100) โ€” drug labels, indications, warnings
  • PubMed (9,994) โ€” articles with metadata
  • ClinicalTrials.gov (4,194) โ€” clinical trial records
  • SIDER (1,226) โ€” drug side effects
  • Open Targets (868) โ€” drug-target associations
  • Plus: ChEMBL, PharmGKB, OMIM, and 6,104 conversational Q&A pairs

All records are evidence-graded (A-E) based on study type, sample size, and recency.

Usage

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel

base = AutoModelForCausalLM.from_pretrained(
    "Qwen/Qwen3-4B-Instruct-2507",
    dtype=torch.bfloat16,
    device_map="auto",
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-4B-Instruct-2507")
model = PeftModel.from_pretrained(base, "pedrobsb/alzbot-qwen3-4b-lora")
model.eval()

messages = [
    {"role": "system", "content": "You are AlzBot, a specialized Alzheimer's disease research assistant."},
    {"role": "user", "content": "What are the FDA-approved treatments for Alzheimer's disease?"},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)

with torch.no_grad():
    output = model.generate(**inputs, max_new_tokens=512, temperature=0.3, top_p=0.9, do_sample=True)
print(tokenizer.decode(output[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Training Configuration

  • LoRA targets: q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
  • Optimizer: Paged AdamW 8-bit
  • Learning rate: 1e-4 (cosine schedule, 500 warmup steps)
  • Batch size: 16 (effective)
  • Sequence length: 512 tokens (with packing)
  • Precision: float16
  • Epochs: 2
  • GPU: NVIDIA A10G (24 GB VRAM), AWS g5.2xlarge

Eval Results

Epoch Eval Loss Token Accuracy
0.5 0.855 79.8%
1.0 0.836 80.2%
1.5 0.832 80.3%
2.0 0.830 80.4%

Topics Covered

  • FDA-approved treatments (donepezil, rivastigmine, galantamine, memantine, lecanemab, donanemab)
  • Genetic risk factors (APOE e4, PSEN1, APP)
  • Biomarkers (amyloid-beta, tau, CSF markers, PET imaging)
  • Clinical trials and emerging therapies
  • Drug interactions and contraindications
  • Caregiver support and patient care
  • Evidence grading and source citations

Citation

@article{albuquerque2026alzbot,
  title={AlzBot: Toward Community-Driven Lightweight Domain Language Models as Living Alternatives to Systematic Literature Reviews},
  author={Albuquerque, Pedro H. M.},
  year={2026}
}

Disclaimer

This model is designed as a research tool for clinicians and researchers, not as a direct-to-patient advisory system. It should not be used for individual treatment decisions without verification by a qualified clinician.

Framework Versions

  • PEFT 0.19.1
  • Transformers 5.12.1
  • PyTorch 2.12.1+cu130
  • TRL 1.7.0
Downloads last month
21
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for pedrobsb/alzbot-qwen3-4b-lora

Adapter
(5632)
this model