Downloads · 30 days
289
0% of all-time downloads
mymusise/gpt2-medium-chinese
gpt2-medium-chinese is a text generation model from mymusise. Use it when you need the model to write or continue text. It is set up for transformers.
- Language model: GPT2-Medium - Model size: 1.2GiB - Language: Chinese - Training data: wiki2019zhcorpus - Source code: gpt2-quickly
Downloads · 30 days
289
0% of all-time downloads
All-time downloads
78.6K
Public
Repo size
7.9 GB
Likes
13
Public
Click a slice to open those files.
.bin1.3 GB · 50%
From the Hugging Face model README
from transformers import BertTokenizer, TFGPT2LMHeadModel
from transformers import TextGenerationPipeline
tokenizer = BertTokenizer.from_pretrained("mymusise/EasternFantasyNoval")
model = TFGPT2LMHeadModel.from_pretrained("mymusise/EasternFantasyNoval")
text_generator = TextGenerationPipeline(model, tokenizer)
print(text_generator("今日", max_length=64, repetition_penalty=1.3, do_sample=True, top_k=10))
print(text_generator("跨越山丘", max_length=64, repetition_penalty=1.3, do_sample=True, top_k=10))
输出
[{'generated_text': '今日 , 他 的 作 品 也 在 各 种 报 刊 发 表 。 201 1 年 , 他 开 设 了 他 的 网 页 版 《 the dear 》 。 此 外 , 他 还 在 各 种 电 视 节 目 中 出 现 过 。 2017 年 1 月 , 他 被 任'}]
[{'generated_text': '跨越山丘 , 其 中 有 三 分 之 二 的 地 区 被 划 入 山 区 。 最 高 峰 是 位 于 山 脚 上 的 大 岩 ( ) 。 其 中 的 山 脚 下 有 一 处 有 名 为 的 河 谷 , 因 其 高 度 在 其 中 , 而 得 名 。'}]