Instructions to use claudios/plbart-python-en_XX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use claudios/plbart-python-en_XX with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="claudios/plbart-python-en_XX")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("claudios/plbart-python-en_XX") model = AutoModel.from_pretrained("claudios/plbart-python-en_XX") - Notebooks
- Google Colab
- Kaggle
| arxiv: 2103.06333 | |
| license: mit | |
| language: | |
| - code | |
| This is an *unofficial* reupload of [uclanlp/plbart-python-en_XX](https://huggingface.co/uclanlp/plbart-python-en_XX) in the `SafeTensors` format using `transformers` `4.40.1`. The goal of this reupload is to prevent older models that are still relevant baselines from becoming stale as a result of changes in HuggingFace. Additionally, I may include minor corrections, such as model max length configuration. | |
| Please see the [original repo](https://github.com/wasiahmad/PLBART) for more information. | |
| Original model card below: | |
| --- | |
| ## PLBART is a Transformer model | |
| - PLBART is a sequence-to-sequence model pre-trained on a large collection Java and Python functions and natural | |
| language descriptions collected from Github and StackOverflow, respectively. | |
| - PLBART is pre-trained via denoising autoencoding (DAE) and uses three noising strategies: token masking, token | |
| deletion, and token infilling (shown below in the three examples). | |
| <div align="center"> | |
| <table> | |
| <thead> | |
| <tr> | |
| <th>Noisy Input</th> | |
| <th>Original Sequence</th> | |
| </tr> | |
| </thead> | |
| <tbody> | |
| <tr> | |
| <td>Is 0 the <strong>[MASK]</strong> Fibonacci <strong>[MASK]</strong> ? <em><En></em></td> | |
| <td><em><En></em> Is 0 the <strong>first</strong> Fibonacci <strong>number</strong> ?</td> | |
| </tr> | |
| <tr> | |
| <td>public static main ( String args [ ] ) { date = Date ( ) ; | |
| System . out . ( String . format ( " Current Date : % tc " , ) ) ; } <em><java></em></td> | |
| <td><em><java></em> public static <strong>void</strong> main ( String args [ ] ) { <strong>Date</strong> date = new Date ( ) ; | |
| System . out . <strong>printf</strong> ( String . format ( " Current Date : % tc " , <strong>date</strong> ) ) ; }</td> | |
| </tr> | |
| <tr> | |
| <td>def addThreeNumbers ( x , y , z ) : NEW_LINE INDENT return <strong>[MASK]</strong> <em><python></em></td> | |
| <td><em><python></em> def addThreeNumbers ( x , y , z ) : NEW_LINE INDENT return <strong>x + y + z</strong></td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> |