nhanv commited on
Commit
6eb5a9c
1 Parent(s): 2bf64f0

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +30 -0
README.md ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - vi
4
+ tags:
5
+ - text generation
6
+ - pytorch
7
+ - the Pile
8
+ - causal-lm
9
+ # GPT-Neo-small for vietnamese
10
+ ## Model Description
11
+ GPT-Neo-vi-small is a transformer model designed using EleutherAI's replication of the GPT-3 architecture.
12
+ ## Training data
13
+ GPT-Neo-vi-smal was trained on the News datasets, a large scale dataset created by from News Website for the purpose of training this model.
14
+ ### How to use
15
+ his example generates a different sequence each time it's run:
16
+ ```py
17
+ from transformers import GPTNeoForCausalLM, GPT2Tokenizer
18
+ model = GPTNeoForCausalLM.from_pretrained("NlpHUST/gpt-neo-vi-small")
19
+ tokenizer = GPT2Tokenizer.from_pretrained("NlpHUST/gpt-neo-vi-small")
20
+
21
+ prompt = "Ngay sau Tết Nguyên đán Tân Sửu, hiện tượng giá đất tăng tại nhiều địa phương. Thị trường nhộn nhịp, tạo ra những cơn sóng sốt đất khó tin khiến bộ ngành, địa phương đưa cảnh báo."
22
+
23
+ input_ids = tokenizer(prompt, return_tensors="pt").input_ids
24
+ gen_tokens = model.generate(input_ids, do_sample=True, temperature=1.0, max_length=1024)
25
+ gen_text = tokenizer.batch_decode(gen_tokens)[0]
26
+ print(gen_text)
27
+
28
+
29
+
30
+ ```