Downloads · 30 days
8
3% of all-time downloads
gautamraj8044/DistilGPT2-DiseaseSymptomPredictor
DistilGPT2-DiseaseSymptomPredictor is a machine learning model from gautamraj8044. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
The DistilGPT2-DiseaseSymptomPredictor model is a fine-tuned version of distilgpt2, optimized to predict symptoms based on disease names. It is designed to assist healthcare professionals, researchers, and students by…
Downloads · 30 days
8
3% of all-time downloads
All-time downloads
261
Public
Parameters
81.9M
328 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors328 MB · 100%
From the Hugging Face model README
The DistilGPT2-DiseaseSymptomPredictor model is a fine-tuned version of distilgpt2, optimized to predict symptoms based on disease names. It is designed to assist healthcare professionals, researchers, and students by providing likely symptoms for various diseases, improving understanding and enhancing diagnostic assistance. This model was fine-tuned on a dataset containing diseases and corresponding symptoms to ensure high relevance and utility.
This model is intended for educational and research purposes, particularly useful for:
Usage Example:
from transformers import GPT2Tokenizer, GPT2LMHeadModel
import torch
# Load model and tokenizer
model = GPT2LMHeadModel.from_pretrained("gautamraj8044/DistilGPT2-DiseaseSymptomPredictor")
tokenizer = GPT2Tokenizer.from_pretrained("gautamraj8044/DistilGPT2-DiseaseSymptomPredictor")
# Generate symptom predictions
input_text = "Kidney Failure"
input_ids = tokenizer.encode(input_text, return_tensors='pt')
output = model.generate(
input_ids,
max_length=20,
num_return_sequences=1,
do_sample=True,
top_k=8,
top_p=0.95,
temperature=0.5,
repetition_penalty=1.2
)
decoded_output = tokenizer.decode(output[0], skip_special_tokens=True)
print(decoded_output)
The model was fine-tuned on a dataset with 400 rows, each containing disease names and associated symptoms. The training process used a batch size of 8, a learning rate of 5e-4, and a CrossEntropyLoss function, with early stopping based on validation loss.
This model should be used with caution as it is not a replacement for professional healthcare advice or diagnosis. The model may not accurately predict rare or complex symptoms associated with certain diseases. Additionally, it may reflect biases present in the dataset.