Update README.md
Browse files
README.md
CHANGED
@@ -9,4 +9,37 @@ datasets:
|
|
9 |
- oldflag/symptom_dx_test
|
10 |
pipeline_tag: question-answering
|
11 |
---
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
- oldflag/symptom_dx_test
|
10 |
pipeline_tag: question-answering
|
11 |
---
|
12 |
+
# Fine-Tuning Llama3-8b-bnb-4bit Model for Medical Symptom Diagnosis
|
13 |
+
|
14 |
+
This project demonstrates how to fine-tune the Llama3-8b-bnb-4bit model using a Question and Answer dataset focused on medical symptoms and their diagnoses.
|
15 |
+
The project is implemented using Google Colab and utilizes the `unsloth` library for efficient model handling.
|
16 |
+
|
17 |
+
## Overview
|
18 |
+
|
19 |
+
The goal of this project is to fine-tune the Llama3-8b-bnb-4bit model to generate accurate medical diagnoses based on input symptoms.
|
20 |
+
This is achieved by using a dataset of medical Q&A pairs and adapting the model to understand and respond to medical queries effectively.
|
21 |
+
|
22 |
+
## Setup and Installation
|
23 |
+
|
24 |
+
1. **Clone the repository and navigate to the project directory:**
|
25 |
+
|
26 |
+
```bash
|
27 |
+
git clone https://github.com/oldfalg/FineTuning_Llama_3_8b_Symptom_Dx.git
|
28 |
+
cd FineTuning_Llama_3_8b_Symptom_Dx
|
29 |
+
|
30 |
+
|
31 |
+
## Key Components
|
32 |
+
|
33 |
+
• Model Loading:
|
34 |
+
Utilizes the FastLanguageModel from the unsloth library to load the pre-trained Llama3-8b-bnb-4bit model with 4-bit quantization for efficient memory usage.
|
35 |
+
• Dataset Preparation:
|
36 |
+
Uses the datasets library to load and process a Q&A dataset for fine-tuning.
|
37 |
+
• Fine-Tuning:
|
38 |
+
Fine-tunes the model in Colab to generate accurate diagnoses based on input symptoms.
|
39 |
+
• Model Uploading:
|
40 |
+
Supports saving the fine-tuned model in different formats (float16, int4, and LoRA adapters) and uploading it to Hugging Face.
|
41 |
+
|
42 |
+
Inference
|
43 |
+
|
44 |
+
After fine-tuning, the model can be used to generate diagnoses based on new symptom inputs.
|
45 |
+
The project supports enabling native faster inference and using the fine-tuned model for generation tasks.
|