Question Answering
Transformers
PyTorch
TensorFlow
JAX
Vietnamese
t5
text2text-generation
summarization
translation
text-generation-inference
Instructions to use VietAI/vit5-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use VietAI/vit5-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="VietAI/vit5-base")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("VietAI/vit5-base") model = AutoModelForSeq2SeqLM.from_pretrained("VietAI/vit5-base") - Inference
- Notebooks
- Google Colab
- Kaggle
Commit ·
8bba306
1
Parent(s): 25dc19d
Update README.md
Browse files
README.md
CHANGED
|
@@ -24,7 +24,7 @@ model = AutoModelForSeq2SeqLM.from_pretrained("VietAI/vit5-base")
|
|
| 24 |
model.cuda()
|
| 25 |
|
| 26 |
sentence = "VietAI là tổ chức phi lợi nhuận với sứ mệnh ươm mầm tài năng về trí tuệ nhân tạo và xây dựng một cộng đồng các chuyên gia trong lĩnh vực trí tuệ nhân tạo đẳng cấp quốc tế tại Việt Nam."
|
| 27 |
-
text =
|
| 28 |
encoding = tokenizer(text, return_tensors="pt")
|
| 29 |
input_ids, attention_masks = encoding["input_ids"].to("cuda"), encoding["attention_mask"].to("cuda")
|
| 30 |
outputs = model.generate(
|
|
|
|
| 24 |
model.cuda()
|
| 25 |
|
| 26 |
sentence = "VietAI là tổ chức phi lợi nhuận với sứ mệnh ươm mầm tài năng về trí tuệ nhân tạo và xây dựng một cộng đồng các chuyên gia trong lĩnh vực trí tuệ nhân tạo đẳng cấp quốc tế tại Việt Nam."
|
| 27 |
+
text = sentence
|
| 28 |
encoding = tokenizer(text, return_tensors="pt")
|
| 29 |
input_ids, attention_masks = encoding["input_ids"].to("cuda"), encoding["attention_mask"].to("cuda")
|
| 30 |
outputs = model.generate(
|