Instructions to use Salesforce/codet5p-6b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Salesforce/codet5p-6b with Transformers:
# Load model directly from transformers import AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("Salesforce/codet5p-6b", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
import torch
Browse files`import torch` is missed in sample code.
README.md
CHANGED
|
@@ -21,6 +21,7 @@ Furthermore, it is instruction-tuned to align with natural language instructions
|
|
| 21 |
This model can be easily loaded using the `AutoModelForSeq2SeqLM` functionality and employs the same tokenizer as [CodeGen](https://github.com/salesforce/CodeGen).
|
| 22 |
|
| 23 |
```python
|
|
|
|
| 24 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
| 25 |
|
| 26 |
checkpoint = "Salesforce/codet5p-6b"
|
|
|
|
| 21 |
This model can be easily loaded using the `AutoModelForSeq2SeqLM` functionality and employs the same tokenizer as [CodeGen](https://github.com/salesforce/CodeGen).
|
| 22 |
|
| 23 |
```python
|
| 24 |
+
import torch
|
| 25 |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
|
| 26 |
|
| 27 |
checkpoint = "Salesforce/codet5p-6b"
|