Instructions to use allenai/PRIMERA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use allenai/PRIMERA with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("allenai/PRIMERA") model = AutoModelForSeq2SeqLM.from_pretrained("allenai/PRIMERA") - Notebooks
- Google Colab
- Kaggle
Commit ·
bd01102
1
Parent(s): 550385a
Add trigram block by default
Browse filesSimilar to PRIMERA-multinews and PRIMERA-multixscience, I have found that I get ROUGE scores much closer to those reported if I add a trigram block. I am proposing this be enabled by default in the HuggingFace config.
- config.json +1 -0
config.json
CHANGED
|
@@ -73,6 +73,7 @@
|
|
| 73 |
"model_type": "led",
|
| 74 |
"normalize_before": false,
|
| 75 |
"normalize_embedding": true,
|
|
|
|
| 76 |
"num_hidden_layers": 12,
|
| 77 |
"output_past": false,
|
| 78 |
"pad_token_id": 1,
|
|
|
|
| 73 |
"model_type": "led",
|
| 74 |
"normalize_before": false,
|
| 75 |
"normalize_embedding": true,
|
| 76 |
+
"no_repeat_ngram_size": 3,
|
| 77 |
"num_hidden_layers": 12,
|
| 78 |
"output_past": false,
|
| 79 |
"pad_token_id": 1,
|