Upload config
Browse files
config
ADDED
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import os
|
2 |
+
from pathlib import Path
|
3 |
+
|
4 |
+
REPO_DIR = Path(os.path.realpath(os.path.join(os.path.dirname(__file__), '..')))
|
5 |
+
|
6 |
+
# Text extraction
|
7 |
+
url = 'VedCodes/Easy_Share'
|
8 |
+
extraction_path = REPO_DIR / "VedCodes/Easy_Share.jsonl"
|
9 |
+
|
10 |
+
# Text processing
|
11 |
+
min_length = 100
|
12 |
+
|
13 |
+
# HF repo
|
14 |
+
hf_repo = "VedCodes/Easy_Share"
|
15 |
+
|
16 |
+
# Dataset
|
17 |
+
context_length = 2048
|
18 |
+
batch_size = 1000
|
19 |
+
test_size = 0.1
|
20 |
+
shuffle = True
|
21 |
+
|
22 |
+
# Training
|
23 |
+
model_name = 'bigscience/bloom-3b'
|
24 |
+
lora_r = 16 # attention heads
|
25 |
+
lora_alpha = 32 # alpha scaling
|
26 |
+
lora_dropout = 0.05
|
27 |
+
lora_bias = "none"
|
28 |
+
lora_task_type = "CAUSAL_LM" # set this for CLM or Seq2Seq
|
29 |
+
|
30 |
+
## Trainer config
|
31 |
+
per_device_train_batch_size = 1
|
32 |
+
gradient_accumulation_steps = 1
|
33 |
+
warmup_steps = 100
|
34 |
+
num_train_epochs=3
|
35 |
+
weight_decay=0.1
|
36 |
+
learning_rate = 2e-4
|
37 |
+
fp16 = True
|
38 |
+
logging_steps = 1
|
39 |
+
overwrite_output_dir = True
|
40 |
+
evaluation_strategy = "no"
|
41 |
+
save_strategy = "no"
|
42 |
+
push_to_hub = False
|
43 |
+
|
44 |
+
## Data collator
|
45 |
+
mlm =False
|
46 |
+
|
47 |
+
## Generate
|
48 |
+
max_new_tokens = 50
|
49 |
+
temperature = 0.5
|
50 |
+
do_sample = False
|