
* Rename index.mdx to index.md * With saved modifs * Address review comment * Treat all files * .mdx -> .md * Remove special char * Update utils/tests_fetcher.py Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr> --------- Co-authored-by: Lysandre Debut <lysandre.debut@reseau.eseo.fr>
5.5 KiB
OPT
Overview
The OPT model was proposed in Open Pre-trained Transformer Language Models by Meta AI. OPT is a series of open-sourced large causal language models which perform similar in performance to GPT3.
The abstract from the paper is the following:
Large language models, which are often trained for hundreds of thousands of compute days, have shown remarkable capabilities for zero- and few-shot learning. Given their computational cost, these models are difficult to replicate without significant capital. For the few that are available through APIs, no access is granted to the full model weights, making them difficult to study. We present Open Pre-trained Transformers (OPT), a suite of decoder-only pre-trained transformers ranging from 125M to 175B parameters, which we aim to fully and responsibly share with interested researchers. We show that OPT-175B is comparable to GPT-3, while requiring only 1/7th the carbon footprint to develop. We are also releasing our logbook detailing the infrastructure challenges we faced, along with code for experimenting with all of the released models.
Tips:
- OPT has the same architecture as [
BartDecoder
]. - Contrary to GPT2, OPT adds the EOS token
</s>
to the beginning of every prompt.
This model was contributed by Arthur Zucker, Younes Belkada, and Patrick Von Platen. The original code can be found here.
Resources
A list of official Hugging Face and community (indicated by 🌎) resources to help you get started with OPT. If you're interested in submitting a resource to be included here, please feel free to open a Pull Request and we will review it. The resource should ideally demonstrate something new instead of duplicating an existing resource.
- A notebook on fine-tuning OPT with PEFT, bitsandbytes, and Transformers. 🌎
- A blog post on decoding strategies with OPT.
- Causal language modeling chapter of the 🤗 Hugging Face Course.
- [
OPTForCausalLM
] is supported by this causal language modeling example script and notebook. - [
TFOPTForCausalLM
] is supported by this causal language modeling example script and notebook. - [
FlaxOPTForCausalLM
] is supported by this causal language modeling example script.
- Text classification task guide
- [
OPTForSequenceClassification
] is supported by this example script and notebook.
- [
OPTForQuestionAnswering
] is supported by this question answering example script and notebook. - Question answering chapter of the 🤗 Hugging Face Course.
⚡️ Inference
- A blog post on How 🤗 Accelerate runs very large models thanks to PyTorch with OPT.
OPTConfig
autodoc OPTConfig
OPTModel
autodoc OPTModel - forward
OPTForCausalLM
autodoc OPTForCausalLM - forward
TFOPTModel
autodoc TFOPTModel - call
TFOPTForCausalLM
autodoc TFOPTForCausalLM - call
OPTForSequenceClassification
autodoc OPTForSequenceClassification - forward
OPTForQuestionAnswering
autodoc OPTForQuestionAnswering - forward
FlaxOPTModel
autodoc FlaxOPTModel - call
FlaxOPTForCausalLM
autodoc FlaxOPTForCausalLM - call