Downloads · 30 days
272
29% of all-time downloads
zhuimengshaonian/gpt2-ancient-medium
gpt2-ancient-medium is a text generation model from zhuimengshaonian. Use it when you need the model to write or continue text. It is set up for transformers.
The model is used to generate ancient Chinese.The model uses the frame of GPT2-medium. We trained on 4 P100 for about 8 days.(batch size = 4, steps = 1M)
Downloads · 30 days
272
29% of all-time downloads
All-time downloads
953
Public
Repo size
2.9 GB
Likes
0
Public
Click a slice to open those files.
.bin1.4 GB · 100%
From the Hugging Face model README
The model is used to generate ancient Chinese.The model uses the frame of GPT2-medium. We trained on 4 P100 for about 8 days.(batch size = 4, steps = 1M)
You can use the model directly with a pipeline for text generation:
from transformers import BertTokenizer, GPT2LMHeadModel, TextGenerationPipeline
tokenizer = BertTokenizer.from_pretrained("zhuimengshaonian/gpt2-ancient-medium")
model = GPT2LMHeadModel.from_pretrained("zhuimengshaonian/gpt2-ancient-medum")
text_generator = TextGenerationPipeline(model, tokenizer)
text_generator("[CLS]当是时", max_length=100, do_sample=True)