File size: 1,834 Bytes
f972a54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
00a7224
 
 
 
 
f972a54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: other
library_name: peft
tags:
- llama-factory
- lora
- generated_from_trainer
base_model: chargoddard/internlm2-20b-llama
model-index:
- name: model-update
  results: []
---

<!-- This model card has been generated automatically according to the information the Trainer had access to. You
should probably proofread and complete it, then remove this comment. -->

# model-update

This model is a fine-tuned version of [chargoddard/internlm2-20b-llama](https://huggingface.co/chargoddard/internlm2-20b-llama) on the oncc_medqa_instruct dataset.

## Training procedure

```
CUDA_VISIBLE_DEVICES=0 python src/train_bash.py --stage sft --do_train True --model_name_or_path /workspace/model --finetuning_type lora --quantization_bit 4 --flash_attn True --dataset_dir data --cutoff_len 1024 --learning_rate 0.0005 --num_train_epochs 1.0 --max_samples 10000 --lr_scheduler_type cosine --max_grad_norm 1.0 --logging_steps 10 --save_steps 100 --warmup_steps 20 --neftune_noise_alpha 0.5 --lora_rank 8 --lora_dropout 0.2 --output_dir /workspace/model-update --per_device_train_batch_size 4 --gradient_accumulation_steps 4 --lora_target q_proj,v_proj --template llama2 --dataset oncc_medqa_instruct
```
Note: fix the bug in the tokenizer_config.json. i.e. "internlm/internlm2-20b--tokenization_internlm2.InternLM2Tokenizer"

### Training hyperparameters

The following hyperparameters were used during training:
- learning_rate: 0.0005
- train_batch_size: 4
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 4
- total_train_batch_size: 16
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 20
- num_epochs: 1.0

### Training results



### Framework versions

- PEFT 0.8.2
- Transformers 4.37.2
- Pytorch 2.0.1+cu118
- Datasets 2.17.0
- Tokenizers 0.15.2