Tasfiya025 commited on
Commit
17b3adb
·
verified ·
1 Parent(s): bc026fb

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # TinyTextGenerator
2
+
3
+ ## Overview
4
+
5
+ TinyTextGenerator is a small causal language model based on the GPT-2 architecture, designed for basic text generation tasks. With only 6 layers, it is lightweight and fast, making it ideal for experimentation, local deployment, or educational use.
6
+
7
+ ## Model Architecture
8
+
9
+ - **Model type**: GPT-2 (causal language modeling)
10
+ - **Hidden size**: 768
11
+ - **Number of layers**: 6
12
+ - **Number of attention heads**: 12
13
+ - **Vocabulary size**: 50,257
14
+ - **Context length**: 1024 tokens
15
+ - **Parameters**: ~82M
16
+
17
+ Built using `GPT2LMHeadModel` from the Transformers library.
18
+
19
+ ## Usage
20
+
21
+ ```python
22
+ from transformers import pipeline
23
+
24
+ generator = pipeline(
25
+ "text-generation",
26
+ model="your-username/TinyTextGenerator"
27
+ )
28
+
29
+ output = generator(
30
+ "The future of AI is",
31
+ max_new_tokens=50,
32
+ do_sample=True,
33
+ top_p=0.95
34
+ )
35
+
36
+ print(output[0]['generated_text'])