Summarization
Transformers
PyTorch
TensorFlow
Vietnamese
t5
text2text-generation
text-generation-inference
Instructions to use polieste/fastAbs_large with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use polieste/fastAbs_large with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="polieste/fastAbs_large")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("polieste/fastAbs_large") model = AutoModelForSeq2SeqLM.from_pretrained("polieste/fastAbs_large") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,25 +1,23 @@
|
|
| 1 |
---
|
| 2 |
language: vi
|
| 3 |
datasets:
|
| 4 |
-
-
|
| 5 |
tags:
|
| 6 |
- summarization
|
| 7 |
-
|
| 8 |
license: mit
|
| 9 |
-
|
| 10 |
widget:
|
| 11 |
-
- text:
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
```python
|
| 19 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 20 |
|
| 21 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
| 22 |
-
model = AutoModelForSeq2SeqLM.from_pretrained("
|
| 23 |
model.cuda()
|
| 24 |
|
| 25 |
sentence = "Input text"
|
|
@@ -34,4 +32,4 @@ outputs = model.generate(
|
|
| 34 |
for output in outputs:
|
| 35 |
line = tokenizer.decode(output, skip_special_tokens=True, clean_up_tokenization_spaces=True)
|
| 36 |
print(line)
|
| 37 |
-
```
|
|
|
|
| 1 |
---
|
| 2 |
language: vi
|
| 3 |
datasets:
|
| 4 |
+
- Yuhthe/vietnews
|
| 5 |
tags:
|
| 6 |
- summarization
|
|
|
|
| 7 |
license: mit
|
|
|
|
| 8 |
widget:
|
| 9 |
+
- text: Input text.
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# fastAbs-large Finetuned on `vietnews` Abstractive Summarization
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
```python
|
| 17 |
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
| 18 |
|
| 19 |
+
tokenizer = AutoTokenizer.from_pretrained("polieste/fastAbs_large")
|
| 20 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("polieste/fastAbs_large")
|
| 21 |
model.cuda()
|
| 22 |
|
| 23 |
sentence = "Input text"
|
|
|
|
| 32 |
for output in outputs:
|
| 33 |
line = tokenizer.decode(output, skip_special_tokens=True, clean_up_tokenization_spaces=True)
|
| 34 |
print(line)
|
| 35 |
+
```
|