Downloads · 30 days
8
2% of all-time downloads
jed351/bart-zh-hk-wiki
bart-zh-hk-wiki is a fill-mask model from jed351. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as other.
This is the Cantonese model of BART base. It is based on another model created by: https://huggingface.co/Ayaka/bart-base-cantonese
Downloads · 30 days
8
2% of all-time downloads
All-time downloads
355
Public
Repo size
1.8 GB
Likes
0
Public
Click a slice to open those files.
.bin878 MB · 50%
From the Hugging Face model README
This is the Cantonese model of BART base. It is based on another model created by: https://huggingface.co/Ayaka/bart-base-cantonese
from transformers import BertTokenizer, BartForConditionalGeneration, Text2TextGenerationPipeline
tokenizer = BertTokenizer.from_pretrained('jed351/bart-zh-hk-wiki')
model = BartForConditionalGeneration.from_pretrained('jed351/bart-zh-hk-wiki')
text2text_generator = Text2TextGenerationPipeline(model, tokenizer)
output = text2text_generator('聽日就要返香港,我激動到[MASK]唔着', max_length=50, do_sample=False)
print(output[0]['generated_text'].replace(' ', ''))
Note: Please use the BertTokenizer for the model vocabulary. DO NOT use the original BartTokenizer.