Summarization
Transformers
PyTorch
TensorFlow
JAX
Rust
Safetensors
English
bart
text2text-generation
Eval Results (legacy)
Instructions to use facebook/bart-large-cnn with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use facebook/bart-large-cnn 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-cnn")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("facebook/bart-large-cnn") model = AutoModelForSeq2SeqLM.from_pretrained("facebook/bart-large-cnn", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +4 -2
config.json
CHANGED
|
@@ -16,7 +16,9 @@
|
|
| 16 |
"encoder_layerdrop": 0.0,
|
| 17 |
"encoder_layers": 12,
|
| 18 |
"eos_token_id": 2,
|
| 19 |
-
"eos_token_ids":
|
|
|
|
|
|
|
| 20 |
"finetuning_task": null,
|
| 21 |
"id2label": {
|
| 22 |
"0": "LABEL_0",
|
|
@@ -40,7 +42,7 @@
|
|
| 40 |
"num_return_sequences": 1,
|
| 41 |
"output_attentions": false,
|
| 42 |
"output_hidden_states": false,
|
| 43 |
-
"output_past":
|
| 44 |
"pad_token_id": 1,
|
| 45 |
"pruned_heads": {},
|
| 46 |
"repetition_penalty": 1.0,
|
|
|
|
| 16 |
"encoder_layerdrop": 0.0,
|
| 17 |
"encoder_layers": 12,
|
| 18 |
"eos_token_id": 2,
|
| 19 |
+
"eos_token_ids": [
|
| 20 |
+
2
|
| 21 |
+
],
|
| 22 |
"finetuning_task": null,
|
| 23 |
"id2label": {
|
| 24 |
"0": "LABEL_0",
|
|
|
|
| 42 |
"num_return_sequences": 1,
|
| 43 |
"output_attentions": false,
|
| 44 |
"output_hidden_states": false,
|
| 45 |
+
"output_past": true,
|
| 46 |
"pad_token_id": 1,
|
| 47 |
"pruned_heads": {},
|
| 48 |
"repetition_penalty": 1.0,
|