Downloads · 30 days
17
3% of all-time downloads
zhuimengshaonian/gpt2-ancient-base
gpt2-ancient-base 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-base. We trained on 4 P100 for about 8 days.(batch size = 16, steps = 1M)
Downloads · 30 days
17
3% of all-time downloads
All-time downloads
621
Public
Repo size
1.4 GB
Likes
1
Public
Click a slice to open those files.
.bin478 MB · 100%
From the Hugging Face model README
The model is used to generate ancient Chinese. The model uses the frame of GPT2-base. We trained on 4 P100 for about 8 days.(batch size = 16, 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-base")
model = GPT2LMHeadModel.from_pretrained("zhuimengshaonian/gpt2-ancient-base")
text_generator = TextGenerationPipeline(model, tokenizer)
text_generator("[CLS]王侯将相", max_length=100, do_sample=True)