Downloads · 30 days
18
1% of all-time downloads
minhmnq/byt5-vietnamese-restoration
byt5-vietnamese-restoration is a text generation model from minhmnq. Use it when you need the model to write or continue text. The card lists the license as mit.
Mô hình học sâu cấp độ byte (Byte-Level ByT5) được tinh chỉnh chuyên biệt cho bài toán khôi phục dấu thanh điệu và phục hồi khoảng trắng (phân đoạn từ) tiếng Việt.
Downloads · 30 days
18
1% of all-time downloads
All-time downloads
1.8K
Public
Parameters
300M
6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.2 GB · 96%
From the Hugging Face model README
Mô hình học sâu cấp độ byte (Byte-Level ByT5) được tinh chỉnh chuyên biệt cho bài toán khôi phục dấu thanh điệu và phục hồi khoảng trắng (phân đoạn từ) tiếng Việt.
homnaytroidep -> hôm nay trời đẹp).BaseContentMatch ≈ 100%): Đảm bảo không sinh từ ảo giác.from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import torch
repo = "minhmnq/byt5-vietnamese-restoration"
device = "cuda" if torch.cuda.is_available() else "cpu"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForSeq2SeqLM.from_pretrained(repo).to(device)
model.eval()
text = "toidanghocxulyngonngutunhien"
inputs = tokenizer(text, return_tensors="pt").to(device)
output = model.generate(**inputs, max_new_tokens=256, num_beams=4)
print(tokenizer.decode(output[0], skip_special_tokens=True))
# Kết quả: tôi đang học xử lý ngôn ngữ tự nhiên