tekkonetes commited on
Commit
71780e7
1 Parent(s): 2cbf387

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +28 -0
README.md ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Train-your-own GPT
2
+ A very simple script on how to train a GPT model with just a text file. Created by @Tekkonetes (Hugging Face) or @pxlmastrXD (Replit).
3
+
4
+ ## Setup
5
+ You will need some packages installed to run this. Make sure you have a recent (supported) python version, and then install some packages.
6
+ I would recommend using a Virtual environment to do this, so you can remove it easily after training and deployment:
7
+ ```shell
8
+ python -m venv venv
9
+ source venv/bin/activate
10
+ ```
11
+ Then, install some required packages:
12
+ ```shell
13
+ pip install transformers numpy torch
14
+ ```
15
+ That should be all you need.
16
+ ## Usage
17
+ First, put all your data into the train.txt file. By tweaking the code, you can use multiple.
18
+
19
+ Second, select your GPT model. By default, the script uses `gpt2-medium`, but you can replace it with most GPT-based models.
20
+ You might have to do some tweaking, however.
21
+
22
+ Then, run the script.
23
+ ```shell
24
+ python main.py
25
+ ```
26
+
27
+ That is pretty much it. Feel free to use this for whatever you want!!!
28
+ - pxlmastrXD