sajjadhadi/disease-diagnosis-dataset
Viewer • Updated • 494k • 135 • 5
How to use naifenn/diagnosis-adapter with Adapters:
from adapters import AutoAdapterModel
model = AutoAdapterModel.from_pretrained("undefined")
model.load_adapter("naifenn/diagnosis-adapter", set_active=True)A fine-tuned adapter for the Qwen/Qwen2.5-3B model specialized in disease diagnosis and classification. Trained through MLX and MPI, to test performance and accuracy.
This adapter enhances the base Ministral-3b-instruct model to improve performance on medical diagnosis tasks. It was trained on the disease-diagnosis-dataset. The data is over-saturated in some diagnosis, I limit the number of diagnosis and take a limit number of them as training tags.
from transformers import AutoModelForSequenceClassification, AutoTokenizer
# Load model and tokenizer
model_name = "naifenn/diagnosis-adapter"
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Example input
text = "Patient presents with fever, cough, and fatigue for 3 days."
inputs = tokenizer(text, return_tensors="pt")
# Get prediction
outputs = model(**inputs)
prediction = outputs.logits.argmax(-1).item()
print(f"Predicted diagnosis: {model.config.id2label[prediction]}")
Base model
Qwen/Qwen2.5-3B