Model reference · open weights
codet5-large is an open-weight language model from Salesforce. codet5-large (BF16) weighs 1.5 GB; the smallest configuration that runs it is RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the Salesforce/codet5-large model card, 2026-11-24
What it is
| Released by | Salesforce |
|---|---|
| Released | 2022-07-06 |
| VRAM | 1.5 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory |
|---|---|---|---|
| 512 each | |||
| RTX 3060 12 GB | 191 | all 512 | 11.6 GB |
| RTX 4060 Ti 16 GB | 266 | all 512 | 15.4 GB |
| RTX 3090 24 GB | 425 | all 512 | 23.4 GB |
| RTX 4090 24 GB | 424 | all 512 | 23.4 GB |
| RTX 5090 32 GB | 576 | all 512 | 31.0 GB |
| L40S 48 GB | 833 | all 512 | 44.0 GB |
| A100 80 GB | 1000+ | all 512 | 78.2 GB |
| H100 80 GB | 1000+ | all 512 | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 1000+ | all 512 | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 1000+ | all 512 | 107 GB |
| H200 141 GB | 1000+ | all 512 | 138 GB |
| B200 180 GB | 1000+ | all 512 | 176 GB |
| Requests at once | 512 tokens each |
|---|---|
| 1 | 2.0 GB |
| 5 | 2.2 GB |
| 8 | 2.4 GB |
| 16 | 2.8 GB |
| 32 | 3.6 GB |
| 64 | 5.2 GB |
One card, with vLLM's small-card settings.
From the model card
CodeT5 is a family of encoder-decoder language models for code from the paper: CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation by Yue Wang, Weishi Wang, Shafiq Joty, and Steven C.H. Hoi.
The checkpoint included in this repository is denoted as CodeT5-large (770M), which is introduced by the paper: CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning by Hung Le, Yue Wang, Akhilesh Deepak Gotmare, Silvio Savarese, Steven C.H. Hoi.
CodeT5-large was pretrained on CodeSearchNet data in six programming languages (Ruby/JavaScript/Go/Python/Java/PHP). See Section 4.1 of the paper for more details.
CodeT5-large was pretrained using masked span prediction objective for 150 epochs. See Section 4.1 of the paper for more details.
We validate the effectiveness of this checkpoint pretrained with simplified strategies on CodeXGLUE benchmark. See Appendix A.1 of the paper for more details.
This model can be easily loaded using the T5ForConditionalGeneration functionality:
from transformers import AutoTokenizer, T5ForConditionalGeneration
tokenizer = AutoTokenizer.from_pretrained("Salesforce/codet5-large")
model = T5ForConditionalGeneration.from_pretrained("Salesforce/codet5-large")
text = "def greet(user): print(f'hello !')"
input_ids = tokenizer(text, return_tensors="pt").input_ids
# simply generate a single sequence
generated_ids = model.generate(input_ids, max_length=8)
print(tokenizer.decode(generated_ids[0], skip_special_tokens=True))
This release is for research purposes only in support of an academic paper. Our models, datasets, and code are not specifically designed or evaluated for all downstream purposes. We strongly recommend users evaluate and address potential concerns related to accuracy, safety, and fairness before deploying this model. We encourage users to consider the common limitations of AI, comply with applicable laws, and leverage best practices when selecting use cases, particularly for high-risk scenarios where errors or misuse could significantly impact people’s lives, rights, or safety. For further guidance on use cases, refer to our AUP and AI AUP.
@inproceedings{CodeT52021,
author = {Yue Wang and Weishi Wang and Shafiq R. Joty and Steven C. H. Hoi},
title = {CodeT5: Identifier-aware Unified Pre-trained Encoder-Decoder Models for Code Understanding and Generation},
booktitle = {EMNLP},
pages = {8696--8708},
publisher = {Association for Computational Linguistics},
year = {2021}
}
@article{CodeRL2022
author = {Hung Le, Yue Wang, Akhilesh Deepak Gotmare, Silvio Savarese, Steven C.H. Hoi},
title = {CodeRL: Mastering Code Generation through Pretrained Models and Deep Reinforcement Learning},
journal = {arXiv preprint},
volume = {abs/2207.01780},
year = {2022}
}
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.