Downloads · 30 days
5
6% of all-time downloads
melisar2/pharmassist-flan-t5-small
pharmassist-flan-t5-small is a machine learning model from melisar2. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This model is a fine-tuned version of google/flan-t5-small designed for medication-related question answering. The model was fine-tuned using a medication details dataset formatted as instruction-response examples. Th…
Downloads · 30 days
5
6% of all-time downloads
All-time downloads
81
Public
Parameters
77M
308 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors308 MB · 99%
From the Hugging Face model README
This model is a fine-tuned version of google/flan-t5-small designed for medication-related question answering. The model was fine-tuned using a medication details dataset formatted as instruction-response examples. The goal of the model is to generate short educational responses to medication questions, such as what a medication is used for or what side effects may be associated with it.
This model was created for an academic final project and is intended for educational demonstration only. It should not be used as medical advice or as a replacement for a pharmacist, physician, or official drug information source.
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
This model can be used to generate short educational answers to basic medication-related questions. Example questions include:
The model is intended for demonstration and learning purposes.
[More Information Needed]
[More Information Needed]
This model should not be used for diagnosis, treatment decisions, medication selection, dosing recommendations, emergency medical questions, or professional clinical decision-making. It should not replace official drug references or advice from licensed healthcare professionals.
[More Information Needed]
This model has several limitations. It was fine-tuned on a limited medication dataset and may generate incomplete, outdated, or incorrect information. The model does not verify answers against current clinical guidelines, drug databases, patient-specific information, allergies, medical history, or drug interactions. Users should verify all medication information with a pharmacist, physician, or official drug reference.
[More Information Needed]
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
model_id = "melisar2/pharmassist-flan-t5-small"
tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForSeq2SeqLM.from_pretrained(model_id)
question = "What is Metformin used for?"
inputs = tokenizer(question, return_tensors="pt", truncation=True) outputs = model.generate( **inputs, max_new_tokens=80, num_beams=4 )
answer = tokenizer.decode(outputs[0], skip_special_tokens=True) print(answer)
[More Information Needed]
The model was fine-tuned using the Medicine_Details.csv dataset. The dataset contains medication-related information and was formatted into instruction-response examples for training. The project used fields such as medication name, uses, and side effects to create medication question-answering prompts. https://www.kaggle.com/datasets/swathigunti/medicine-details-csv [More Information Needed]
[More Information Needed]
[More Information Needed]
ROUGE scores were used to compare the model-generated answers with the expected reference answers. ROUGE is appropriate for this project because the task is text generation, and the evaluation compares generated text to target medication-related responses. ROUGE Scores: ROUGE1: F-measure: 0.4037 Precision: 0.4806 Recall: 0.3996 ROUGE2: F-measure: 0.2646 Precision: 0.3011 Recall: 0.2684 ROUGEL: F-measure: 0.3837 Precision: 0.4520 Recall: 0.3815
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
BibTeX:
[More Information Needed]
APA:
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]
[More Information Needed]