nroggendorff commited on
Commit
aede1bb
1 Parent(s): c55ac2b

Update train.py

Browse files
Files changed (1) hide show
  1. train.py +4 -4
train.py CHANGED
@@ -8,9 +8,9 @@ from datasets import load_dataset, DatasetDict, Dataset
8
  from tokenizers import ByteLevelBPETokenizer
9
 
10
  MAX_SEQ_LENGTH = 128
11
- BATCH_SIZE = 64
12
- EPOCHS = 5
13
- LEARNING_RATE = 2e-5
14
  FACTOR = 1024
15
  VOCAB_SIZE = 32000
16
  INPUT_DATASET = "HuggingFaceTB/smollm-corpus"
@@ -67,7 +67,7 @@ def format_prompts(examples, tokenizer, isinst):
67
  formatted_conversation = tokenizer.apply_chat_template(conversation, tokenize=False)
68
  texts.append(formatted_conversation)
69
  else:
70
- texts.append(text)
71
  return {"text": texts}
72
 
73
 
 
8
  from tokenizers import ByteLevelBPETokenizer
9
 
10
  MAX_SEQ_LENGTH = 128
11
+ BATCH_SIZE = 96
12
+ EPOCHS = 2
13
+ LEARNING_RATE = 2e-4
14
  FACTOR = 1024
15
  VOCAB_SIZE = 32000
16
  INPUT_DATASET = "HuggingFaceTB/smollm-corpus"
 
67
  formatted_conversation = tokenizer.apply_chat_template(conversation, tokenize=False)
68
  texts.append(formatted_conversation)
69
  else:
70
+ texts.append(tokenizer.bos_token + text + tokenizer.eos_token)
71
  return {"text": texts}
72
 
73