Downloads · 30 days
15
31% of all-time downloads
pedrobsb/alzbot-qwen3-4b-lora
alzbot-qwen3-4b-lora is a text generation model from pedrobsb. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
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.
Downloads · 30 days
15
31% of all-time downloads
All-time downloads
48
Public
Repo size
540 MB
Likes
0
Public
Click a slice to open those files.
.safetensors529 MB · 98%
From the Hugging Face model README
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.
| 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 |
The AlzCorpus was constructed from 13 public biomedical APIs:
All records are evidence-graded (A-E) based on study type, sample size, and recency.
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))
| 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% |
@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}
}
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.