PharmaQA‑1.2B
is a merged, instruction-tuned pharmacology and pharmacy domain language model based on
Liquid AI LFM2-1.2B
. It was fine-tuned using the
MIRIAD-4.4M
dataset for research and educational Q&A in pharmacology, therapeutics, and drug mechanisms. This model is
not intended for clinical or diagnostic use
.
This model is
not intended for medical diagnosis, treatment planning, or patient care
.
It was trained on synthetic Q&A pairs from peer-reviewed literature via MIRIAD and is for
educational and academic research only
.
MIRIAD includes a
cautionary note
that aligns with OpenAI’s usage policies:
Do not use this dataset or models trained on it for actual medical diagnosis, decision-making, or any application involving real-world patients.
Example Usage
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, TextStreamer
model_name = "yasserrmd/PharmaQA-1.2B"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name, device_map="auto")
model.eval()
# Example pharmacy-related question
question = "What is the mechanism of action of metformin?"# Format as chat message
messages = [{"role": "user", "content": f"Q: {question} A:"}]
# Tokenize with chat template
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
tokenize=True,
return_dict=True,
).to(model.device)
# Clean input if necessaryif"token_type_ids"in inputs:
del inputs["token_type_ids"]
# Generate the answerwith torch.no_grad():
output_ids = model.generate(
**inputs,
max_new_tokens=128,
temperature=0.3,
min_p=0.15,
repetition_penalty=1.05
)
# Decode the response
response = tokenizer.decode(output_ids[0], skip_special_tokens=True).strip()
answer = response.split("A:")[-1].strip()
print("💊 Question:", question)
print("🧠 Answer:", answer)
Performance Insights
From manual analysis of 50 unseen pharmacology questions:
✅ No hallucinations observed
✅ High alignment with biomedical terms (e.g.,
dihydrofolate reductase
,
QT prolongation
)
✅ Long-form answers are clinically descriptive and accurate for education
⚠️ Short answers are concise but can lack therapeutic context
PharmaQA-1.2B huggingface.co is an AI model on huggingface.co that provides PharmaQA-1.2B's model effect (), which can be used instantly with this yasserrmd PharmaQA-1.2B model. huggingface.co supports a free trial of the PharmaQA-1.2B model, and also provides paid use of the PharmaQA-1.2B. Support call PharmaQA-1.2B model through api, including Node.js, Python, http.
PharmaQA-1.2B huggingface.co is an online trial and call api platform, which integrates PharmaQA-1.2B's modeling effects, including api services, and provides a free online trial of PharmaQA-1.2B, you can try PharmaQA-1.2B online for free by clicking the link below.
yasserrmd PharmaQA-1.2B online free url in huggingface.co:
PharmaQA-1.2B is an open source model from GitHub that offers a free installation service, and any user can find PharmaQA-1.2B on GitHub to install. At the same time, huggingface.co provides the effect of PharmaQA-1.2B install, users can directly use PharmaQA-1.2B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.