Skip to content

🧠 两小时从 0 训出你的 64M 大模型。Train your own 64M LLM from scratch in 2 hours.

Update data preprocessing methods

gongjy2981d3ea8630
diff --git a/0-eval_pretrain.py b/0-eval_pretrain.py
index 570d42d..d54e505 100644
--- a/0-eval_pretrain.py
+++ b/0-eval_pretrain.py
@@ -107,6 +107,7 @@ if __name__ == "__main__":
print('问题:', prompt)
qa_index += 1
+ prompt = tokenizer.bos_token + prompt
x = tokenizer(prompt).data['input_ids']
x = (torch.tensor(x, dtype=torch.long, device=device)[None, ...])