ehartford commited on
Commit
4b6b09c
1 Parent(s): 42a9a09

Upload folder using huggingface_hub

Browse files
configs/dolphin-mistral-7b.yml ADDED
@@ -0,0 +1,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ base_model: /workspace/models/Mistral-7B-v0.1
2
+ model_type: MistralForCausalLM
3
+ tokenizer_type: LlamaTokenizer
4
+ is_mistral_derived_model: true
5
+
6
+ load_in_8bit: false
7
+ load_in_4bit: false
8
+ strict: false
9
+
10
+ datasets:
11
+ - path: /workspace/datasets/dolphin/dolphin201.jsonl
12
+ type: alpaca_w_system.load_open_orca_chatml
13
+ - path: /workspace/datasets/dolphin-coder-translate.jsonl
14
+ type: alpaca_w_system.load_open_orca_chatml
15
+ - path: /workspace/datasets/dolphin-coder-codegen.jsonl
16
+ type: alpaca_w_system.load_open_orca_chatml
17
+ - path: /workspace/datasets/data-evol_instruct-decontaminated-converted.jsonl
18
+ type: alpaca_w_system.load_open_orca_chatml
19
+ - path: /workspace/datasets/data-oss_instruct-decontaminated-converted.jsonl
20
+ type: alpaca_w_system.load_open_orca_chatml
21
+ - path: /workspace/datasets/CapybaraPure_Decontaminated-converted.jsonl
22
+ type: sharegpt
23
+ conversation: chatml
24
+ - path: /workspace/datasets/not_samantha_norefusals.jsonl
25
+ type: sharegpt
26
+ conversation: chatml
27
+ - path: /workspace/datasets/openhermes.json
28
+ type: alpaca
29
+ prompt_style: chatml
30
+
31
+ dataset_prepared_path: last_run_prepared
32
+ val_set_size: 0.005
33
+ output_dir: /workspace/dolphin-2.6-mistral-7b
34
+
35
+ sequence_len: 16384
36
+ sample_packing: true
37
+ pad_to_sequence_len: true
38
+
39
+ wandb_project: dolphin
40
+ wandb_entity:
41
+ wandb_watch:
42
+ wandb_run_id:
43
+ wandb_log_model:
44
+
45
+ gradient_accumulation_steps: 8
46
+ micro_batch_size: 3
47
+ num_epochs: 4
48
+ adam_beta2: 0.95
49
+ adam_epsilon: 0.00001
50
+ max_grad_norm: 1.0
51
+ lr_scheduler: cosine
52
+ learning_rate: 0.000005
53
+ optimizer: adamw_bnb_8bit
54
+
55
+ train_on_inputs: false
56
+ group_by_length: false
57
+ bf16: true
58
+ fp16: false
59
+ tf32: false
60
+
61
+ gradient_checkpointing: true
62
+ early_stopping_patience:
63
+ resume_from_checkpoint:
64
+ local_rank:
65
+ logging_steps: 1
66
+ xformers_attention:
67
+ flash_attention: true
68
+
69
+ warmup_steps: 10
70
+
71
+ eval_steps: 73
72
+ eval_table_size:
73
+ eval_table_max_new_tokens:
74
+ eval_sample_packing: true
75
+ saves_per_epoch:
76
+ save_steps: 73
77
+ save_total_limit: 2
78
+ debug:
79
+ deepspeed: deepspeed/zero3.json
80
+ weight_decay: 0.1
81
+ fsdp:
82
+ fsdp_config:
83
+ special_tokens:
84
+ eos_token: "</s>"
85
+ tokens:
86
+ - "<|im_start|>"
configs/modify-tokenizer.py ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import AutoTokenizer
2
+
3
+ tokenizer = AutoTokenizer.from_pretrained("/workspace/dolphin-2.6-mistral-7b-hf")
4
+
5
+ # 1. Remove the "</s>" token from the vocabulary
6
+ vocab = tokenizer.get_vocab()
7
+ del vocab['</s>']
8
+ vocab['<|im_end|>'] = 2
9
+
10
+ tokenizer = AutoTokenizer.from_pretrained(
11
+ "/workspace/dolphin-2.6-mistral-7b-hf",
12
+ vocab=vocab
13
+ )
14
+
15
+ tokenizer.eos_token = "<|im_end|>"
16
+ tokenizer.pad_token = "<|im_end|>"
17
+
18
+ # 5. Save the modified tokenizer
19
+ tokenizer.save_pretrained('/workspace/dolphin-new-tokenizer/')