winglian commited on
Commit
3961902
1 Parent(s): 8792199

use pythia-12b, neox-20b is flaky

Browse files
examples/pythia-12b/README.md ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ # Python 12B
2
+
3
+ - Single-GPU A100 only (?)
4
+
5
+ ```shell
6
+ python scripts/finetune.py examples/pythia-12b/config.yml
7
+ ```
8
+
9
+ ⚠️ Multiple-GPU A100 - Doesn't seem to work with multi-gpu without causing OOM! ⚠️
10
+
configs/gpt_neox_20b.yml → examples/pythia-12b/config.yml RENAMED
@@ -1,11 +1,12 @@
1
- base_model: EleutherAI/gpt-neox-20b
2
- base_model_config: EleutherAI/gpt-neox-20b
3
  base_model_ignore_patterns: pytorch* # prefer safetensors
4
  model_type: GPTNeoXForCausalLM
5
  tokenizer_type: AutoTokenizer
6
  load_in_8bit: false
7
- load_in_4bit: true
8
- load_4bit: false
 
9
  datasets:
10
  - path: vicgalle/alpaca-gpt4
11
  type: alpaca
@@ -21,16 +22,16 @@ lora_dropout: 0.0
21
  lora_target_modules:
22
  lora_target_linear: true
23
  lora_fan_in_fan_out: true # pythia/GPTNeoX lora specific
24
- wandb_project: gpt4all-neox-20b
25
  wandb_watch:
26
  wandb_run_id:
27
  wandb_log_model:
28
- output_dir: ./gpt4all-neox-20b
29
  gradient_accumulation_steps: 1
30
- micro_batch_size: 2
31
  num_epochs: 5
32
  learning_rate: 0.00003
33
- optimizer: paged_adamw_32bit
34
  lr_scheduler: cosine
35
  train_on_inputs: false
36
  group_by_length: false
@@ -43,3 +44,6 @@ early_stopping_patience:
43
  resume_from_checkpoint:
44
  local_rank:
45
  gradient_checkpointing: true
 
 
 
 
1
+ base_model: EleutherAI/pythia-12b-deduped
2
+ base_model_config: EleutherAI/pythia-12b-deduped
3
  base_model_ignore_patterns: pytorch* # prefer safetensors
4
  model_type: GPTNeoXForCausalLM
5
  tokenizer_type: AutoTokenizer
6
  load_in_8bit: false
7
+ load_in_4bit: false
8
+ gptq: false
9
+ device_map: auto
10
  datasets:
11
  - path: vicgalle/alpaca-gpt4
12
  type: alpaca
 
22
  lora_target_modules:
23
  lora_target_linear: true
24
  lora_fan_in_fan_out: true # pythia/GPTNeoX lora specific
25
+ wandb_project: pythia-12b
26
  wandb_watch:
27
  wandb_run_id:
28
  wandb_log_model:
29
+ output_dir: ./pythia-12b
30
  gradient_accumulation_steps: 1
31
+ micro_batch_size: 1
32
  num_epochs: 5
33
  learning_rate: 0.00003
34
+ optimizer: adamw_bnb_8bit
35
  lr_scheduler: cosine
36
  train_on_inputs: false
37
  group_by_length: false
 
44
  resume_from_checkpoint:
45
  local_rank:
46
  gradient_checkpointing: true
47
+ fsdp:
48
+ fsdp_transformer_layer_cls_to_wrap:
49
+ collator_pad_to_longest: true