gitcoreai commited on
Commit
ffaf9e8
·
verified ·
1 Parent(s): 21b9be4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +32 -0
README.md CHANGED
@@ -1,3 +1,35 @@
1
  ---
2
  license: mit
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ base_model: openai-community/gpt2
4
+ datasets:
5
+ - OpenAssistant/oasst1
6
+ language:
7
+ - en
8
  ---
9
+
10
+ # GPT-2 SFT on OASST1
11
+
12
+ This model is a fine-tuned version of [openai-community/gpt2](https://huggingface.co/openai-community/gpt2) on the [OpenAssistant/oasst1](https://huggingface.co/datasets/OpenAssistant/oasst1) dataset.
13
+
14
+ ## Training Procedure
15
+
16
+ - **Base Model:** GPT-2 Small (124M parameters)
17
+ - **Dataset:** OpenAssistant OASST1 (English only)
18
+ - **Format:** `user: ... assistant: <s> ... </s>`
19
+ - **Epochs:** 15
20
+ - **Learning Rate:** 5e-5
21
+ - **Batch Size:** 4 (effective 16 with gradient accumulation)
22
+
23
+ ## Usage
24
+
25
+ ```python
26
+ from transformers import AutoTokenizer, AutoModelForCausalLM
27
+
28
+ model_name = "gitcoreai/gpt-2-small-sft"
29
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
30
+ model = AutoModelForCausalLM.from_pretrained(model_name)
31
+
32
+ prompt = "user: hello, how are you?\nassistant: <s>"
33
+ inputs = tokenizer(prompt, return_tensors="pt")
34
+ outputs = model.generate(**inputs, max_new_tokens=60)
35
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))