Commit ·
a4c854a
0
Parent(s):
Duplicate from facebook/bart-base
Browse filesCo-authored-by: Julien Chaumond <julien-c@users.noreply.huggingface.co>
Files changed (10)
- .gitattributesAdded+10
- README.mdAdded+62
- config.jsonAdded+75
- flax_model.msgpackAdded+3
- merges.txtAdded
- model.safetensorsAdded+3
- pytorch_model.binAdded+3
- tf_model.h5Added+3
- tokenizer.jsonAdded
- vocab.jsonAdded
12345678910*.bin.* filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tar.gz filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -textmodel.safetensors filter=lfs diff=lfs merge=lfs -text1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162---license: apache-2.0language: en---
# BART (base-sized model)
BART model pre-trained on English language. It was introduced in the paper [BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension](https://arxiv.org/abs/1910.13461) by Lewis et al. and first released in [this repository](https://github.com/pytorch/fairseq/tree/master/examples/bart).
Disclaimer: The team releasing BART did not write a model card for this model so this model card has been written by the Hugging Face team.
## Model description
BART is a transformer encoder-decoder (seq2seq) model with a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder. BART is pre-trained by (1) corrupting text with an arbitrary noising function, and (2) learning a model to reconstruct the original text.
BART is particularly effective when fine-tuned for text generation (e.g. summarization, translation) but also works well for comprehension tasks (e.g. text classification, question answering).
## Intended uses & limitations
You can use the raw model for text infilling. However, the model is mostly meant to be fine-tuned on a supervised dataset. See the [model hub](https://huggingface.co/models?search=bart) to look for fine-tuned versions on a task that interests you.
### How to use
Here is how to use this model in PyTorch:
```pythonfrom transformers import BartTokenizer, BartModel
tokenizer = BartTokenizer.from_pretrained('facebook/bart-base')model = BartModel.from_pretrained('facebook/bart-base')
inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")outputs = model(**inputs)
last_hidden_states = outputs.last_hidden_state```
### BibTeX entry and citation info
```bibtex@article{DBLP:journals/corr/abs-1910-13461, author = {Mike Lewis and Yinhan Liu and Naman Goyal and Marjan Ghazvininejad and Abdelrahman Mohamed and Omer Levy and Veselin Stoyanov and Luke Zettlemoyer}, title = {{BART:} Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and Comprehension}, journal = {CoRR}, volume = {abs/1910.13461}, year = {2019}, url = {http://arxiv.org/abs/1910.13461}, eprinttype = {arXiv}, eprint = {1910.13461}, timestamp = {Thu, 31 Oct 2019 14:02:26 +0100}, biburl = {https://dblp.org/rec/journals/corr/abs-1910-13461.bib}, bibsource = {dblp computer science bibliography, https://dblp.org}}```123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475{ "_name_or_path": "bart-base", "activation_dropout": 0.1, "activation_function": "gelu", "add_bias_logits": false, "add_final_layer_norm": false, "architectures": [ "BartModel" ], "attention_dropout": 0.1, "bos_token_id": 0, "classif_dropout": 0.1, "classifier_dropout": 0.0, "d_model": 768, "decoder_attention_heads": 12, "decoder_ffn_dim": 3072, "decoder_layerdrop": 0.0, "decoder_layers": 6, "decoder_start_token_id": 2, "dropout": 0.1, "early_stopping": true, "encoder_attention_heads": 12, "encoder_ffn_dim": 3072, "encoder_layerdrop": 0.0, "encoder_layers": 6, "eos_token_id": 2, "forced_eos_token_id": 2, "forced_bos_token_id": 0, "gradient_checkpointing": false, "id2label": { "0": "LABEL_0", "1": "LABEL_1", "2": "LABEL_2" }, "init_std": 0.02, "is_encoder_decoder": true, "label2id": { "LABEL_0": 0, "LABEL_1": 1, "LABEL_2": 2 }, "max_position_embeddings": 1024, "model_type": "bart", "no_repeat_ngram_size": 3, "normalize_before": false, "normalize_embedding": true, "num_beams": 4, "num_hidden_layers": 6, "pad_token_id": 1, "scale_embedding": false, "task_specific_params": { "summarization": { "length_penalty": 1.0, "max_length": 128, "min_length": 12, "num_beams": 4 }, "summarization_cnn": { "length_penalty": 2.0, "max_length": 142, "min_length": 56, "num_beams": 4 }, "summarization_xsum": { "length_penalty": 1.0, "max_length": 62, "min_length": 11, "num_beams": 6 } }, "torch_dtype": "float32", "transformers_version": "4.12.0.dev0", "use_cache": true, "vocab_size": 50265}123version https://git-lfs.github.com/spec/v1oid sha256:53dd33667e5835469e2f7e32b51baf2356464ece3b80e3453a4febb83aa79752size 557690804123version https://git-lfs.github.com/spec/v1oid sha256:1bd3ac8e5b3ac71c77cf18fbcd8b113e0bfceced94c5cfbbb9a2b4bb4781190bsize 557709915123version https://git-lfs.github.com/spec/v1oid sha256:6e4fdb5e04114696ec4f7cc0cb5fc2a22a826f1c9eea234ca550b5390341a2fdsize 557771387123version https://git-lfs.github.com/spec/v1oid sha256:7ed6459d5365fb22f77ab71e7b27b1ff13fde4752d5600b449a1c1ad782bd286size 557950280.gitattributesAdded+10
README.mdAdded+62
config.jsonAdded+75
flax_model.msgpackAdded+3
merges.txtAdded
model.safetensorsAdded+3
pytorch_model.binAdded+3
tf_model.h5Added+3
tokenizer.jsonAdded
vocab.jsonAdded