yasserrmd / PharmaQA-1.2B

huggingface.co
Total runs: 4
24-hour runs: 0
7-day runs: -1
30-day runs: 2
Model's Last Updated: August 22 2025
text-generation

Introduction of PharmaQA-1.2B

Model Details of PharmaQA-1.2B

PharmaQA-1.2B

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 .


🧪 Model Details
Property Value
Base Model Liquid AI LFM2-1.2B
Fine-tuning Method LoRA using Unsloth
Parameters Trained ~9M (0.78% of total)
Dataset Used MIRIAD-4.4M (subset of 50,000 examples)
Epochs 1
Final Format Merged (LoRA + base)
Model Size 1.2 Billion
License ODC-BY v1.0 dataset license, non-commercial educational use only
Author Mohamed Yasser

⚠️ Disclaimer

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 necessary
if "token_type_ids" in inputs:
    del inputs["token_type_ids"]

# Generate the answer
with 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

License
  • Model: Educational and research use only
  • Dataset: MIRIAD (ODC-BY v1.0)

Acknowledgements
  • MIRIAD Team (for the dataset)
  • Unsloth team (for fast & efficient LoRA)
  • Hugging Face + Liquid AI for open model access

Let me know if you'd like a Markdown file for this ( README.md ) or want help preparing the Hugging Face push commands.

Runs of yasserrmd PharmaQA-1.2B on huggingface.co

4
Total runs
0
24-hour runs
0
3-day runs
-1
7-day runs
2
30-day runs

More Information About PharmaQA-1.2B huggingface.co Model

More PharmaQA-1.2B license Visit here:

https://choosealicense.com/licenses/apache-2.0

PharmaQA-1.2B huggingface.co

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 Url

https://huggingface.co/yasserrmd/PharmaQA-1.2B

yasserrmd PharmaQA-1.2B online free

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:

https://huggingface.co/yasserrmd/PharmaQA-1.2B

PharmaQA-1.2B install

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.

PharmaQA-1.2B install url in huggingface.co:

https://huggingface.co/yasserrmd/PharmaQA-1.2B

Url of PharmaQA-1.2B

PharmaQA-1.2B huggingface.co Url

Provider of PharmaQA-1.2B huggingface.co

yasserrmd
ORGANIZATIONS

Other API from yasserrmd

huggingface.co

Total runs: 28
Run Growth: 3
Growth Rate: 10.71%
Updated:October 19 2025