Summarization
Transformers
PyTorch
TensorFlow
JAX
Rust
English
bart
text2text-generation
Eval Results (legacy)
Instructions to use facebook/bart-large-xsum with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/bart-large-xsum 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="facebook/bart-large-xsum")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("facebook/bart-large-xsum") model = AutoModelForSeq2SeqLM.from_pretrained("facebook/bart-large-xsum") - Inference
- Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +8 -1
config.json
CHANGED
|
@@ -1,7 +1,10 @@
|
|
| 1 |
{
|
| 2 |
"_num_labels": 3,
|
| 3 |
"activation_dropout": 0.0,
|
| 4 |
-
"
|
|
|
|
|
|
|
|
|
|
| 5 |
"attention_dropout": 0.0,
|
| 6 |
"bos_token_id": 0,
|
| 7 |
"classif_dropout": 0.0,
|
|
@@ -10,6 +13,7 @@
|
|
| 10 |
"decoder_ffn_dim": 4096,
|
| 11 |
"decoder_layerdrop": 0.0,
|
| 12 |
"decoder_layers": 12,
|
|
|
|
| 13 |
"do_sample": false,
|
| 14 |
"dropout": 0.1,
|
| 15 |
"early_stopping": true,
|
|
@@ -17,6 +21,7 @@
|
|
| 17 |
"encoder_ffn_dim": 4096,
|
| 18 |
"encoder_layerdrop": 0.0,
|
| 19 |
"encoder_layers": 12,
|
|
|
|
| 20 |
"eos_token_ids": [
|
| 21 |
2
|
| 22 |
],
|
|
@@ -47,8 +52,10 @@
|
|
| 47 |
"output_hidden_states": false,
|
| 48 |
"output_past": true,
|
| 49 |
"pad_token_id": 1,
|
|
|
|
| 50 |
"pruned_heads": {},
|
| 51 |
"repetition_penalty": 1.0,
|
|
|
|
| 52 |
"temperature": 1.0,
|
| 53 |
"top_k": 50,
|
| 54 |
"top_p": 1.0,
|
|
|
|
| 1 |
{
|
| 2 |
"_num_labels": 3,
|
| 3 |
"activation_dropout": 0.0,
|
| 4 |
+
"activation_function": "gelu",
|
| 5 |
+
"architectures": [
|
| 6 |
+
"BartForConditionalGeneration"
|
| 7 |
+
],
|
| 8 |
"attention_dropout": 0.0,
|
| 9 |
"bos_token_id": 0,
|
| 10 |
"classif_dropout": 0.0,
|
|
|
|
| 13 |
"decoder_ffn_dim": 4096,
|
| 14 |
"decoder_layerdrop": 0.0,
|
| 15 |
"decoder_layers": 12,
|
| 16 |
+
"decoder_start_token_id": null,
|
| 17 |
"do_sample": false,
|
| 18 |
"dropout": 0.1,
|
| 19 |
"early_stopping": true,
|
|
|
|
| 21 |
"encoder_ffn_dim": 4096,
|
| 22 |
"encoder_layerdrop": 0.0,
|
| 23 |
"encoder_layers": 12,
|
| 24 |
+
"eos_token_id": 2,
|
| 25 |
"eos_token_ids": [
|
| 26 |
2
|
| 27 |
],
|
|
|
|
| 52 |
"output_hidden_states": false,
|
| 53 |
"output_past": true,
|
| 54 |
"pad_token_id": 1,
|
| 55 |
+
"prefix": null,
|
| 56 |
"pruned_heads": {},
|
| 57 |
"repetition_penalty": 1.0,
|
| 58 |
+
"task_specific_params": null,
|
| 59 |
"temperature": 1.0,
|
| 60 |
"top_k": 50,
|
| 61 |
"top_p": 1.0,
|