Downloads · 30 days
83
4% of all-time downloads
minhtoan/gpt3-small-vietnamese
gpt3-small-vietnamese is a text generation model from minhtoan. Use it when you need the model to write or continue text. It is set up for transformers.
Pretrained GPT Neo (GPT-3 small) , it's architecture intentionally resembles that of GPT-3, model was trained on Vietnamese dataset for text generation
Downloads · 30 days
83
4% of all-time downloads
All-time downloads
2.1K
Public
Repo size
1.6 GB
Likes
5
Public
Click a slice to open those files.
.bin546 MB · 100%
From the Hugging Face model README
Pretrained GPT Neo (GPT-3 small) , it's architecture intentionally resembles that of GPT-3, model was trained on Vietnamese dataset for text generation
from transformers import GPT2Tokenizer, GPTNeoForCausalLM
tokenizer = GPT2Tokenizer.from_pretrained('minhtoan/gpt3-small-vietnamese')
model = GPTNeoForCausalLM.from_pretrained('minhtoan/gpt3-small-vietnamese')
text = "Hoa quả và rau thường rẻ hơn khi vào mùa"
input_ids = tokenizer.encode(text, return_tensors='pt')
max_length = 100
sample_outputs = model.generate(input_ids, do_sample=True, max_length=max_length)
for i, sample_output in enumerate(sample_outputs):
print(">> Generated text {}\n\n{}".format(i+1, tokenizer.decode(sample_output.tolist())))
print('\n---')
Phan Minh Toan