File size: 1,413 Bytes
c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 4829695 c8559c1 |
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 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
## Instruction Tuning LLAMA3
This repo uses the `torchtune` for instruction tuning the llama3 pretrained model on mathematical tasks using LORA.
### Wandb report link
https://wandb.ai/som/torchtune_llama3?nw=nwusersom
## Instruction_tuned Model
https://huggingface.co/Someshfengde/llama-3-instruction-tuned-AIMO
### Original metallama model
https://huggingface.co/meta-llama/Meta-Llama-3-8B
## For running this project
```
> pip install poetry
> poetry install
```
Further commands over shell terminal
### To download the model
```
tune download meta-llama/Meta-Llama-3-8B \
--output-dir llama3-8b-hf \
--hf-token <HF_TOKEN>
```
**To start instruction tuning with lora and torchtune**
```
tune run lora_finetune_single_device --config ./lora_finetune_single_device.yaml
```
### To quantize the model
```
tune run quantize --config ./quantization_config.yaml
```
### To generate inference from model.
```
tune run generate --config ./generation_config.yaml \
prompt="what is 2 + 2."
```
## Dataset used
https://huggingface.co/datasets/Someshfengde/AIMO_dataset
### Evaluations
**To run evaluations**
```
tune run eleuther_eval --config ./eval_config.yaml
```
### TruthfulQA: 0.42
![alt text](images/image.png)
### MMLU Abstract Algebra: 0.35
![alt text](images/image-1.png)
### MATHQA: 0.33
![alt text](images/image-2.png)
### Agieval_sat_math: 0.31
![alt text](images/image-3.png) |