File size: 1,349 Bytes
32b745c 73e7d42 32b745c 1cb129a 1290f34 8a2da4f 95db9d2 8a2da4f 95db9d2 8a2da4f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
---
license: mit
datasets:
- sajjadhadi/disease-diagnosis-dataset
base_model:
- Qwen/Qwen2.5-3B
pipeline_tag: text-classification
tags:
- biology
language:
- en
library_name: adapter-transformers
---
# Disease Diagnosis Adapter
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.
## Overview
This adapter enhances the base Ministral-3b-instruct model to improve performance on medical diagnosis tasks. It was trained on the [disease-diagnosis-dataset](https://huggingface.co/datasets/sajjadhadi/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.
## Usage
```python
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]}") |