> For the complete documentation index, see [llms.txt](https://metaverse-imagen.gitbook.io/ai-tools-research/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://metaverse-imagen.gitbook.io/ai-tools-research/ai-technology/ann-deep-learning-architectures/3.-transformers/e-bart-bidirectional-and-auto-regressive-transformers.md).

# e) BART (Bidirectional and Auto-Regressive Transformers)

BART (Bidirectional and Auto-Regressive Transformers) from Facebook AI Research (FAIR) is a variation of a Transformer model. It uses the Transformer model architecture, but with a unique pretraining strategy.

BART is pretrained by randomly masking out certain portions of the text (like whole sentences) and then training the model to fill in the missing parts, which differs from both BERT and GPT's pretraining approaches. This makes BART more similar to a denoising autoencoder. BART is bidirectional, like BERT, in the sense that it considers context from both directions when predicting the masked portions of the text, but it also has an auto-regressive factor, like GPT, in how it generates the predicted tokens one at a time.

Therefore, BART can be seen as a hybrid of BERT and GPT, leveraging the strengths of both, but it still operates within the broader category of Transformer models.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://metaverse-imagen.gitbook.io/ai-tools-research/ai-technology/ann-deep-learning-architectures/3.-transformers/e-bart-bidirectional-and-auto-regressive-transformers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
