Model reference · open weights

codet5-large

LLMs Salesforce Text gen 1 build Open weights 3k dl/mo

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.

  • CodeT5-large is a 770M parameter encoder-decoder language model developed by Salesforce for code understanding and generation.
  • It was pretrained on CodeSearchNet data covering six programming languages, including Ruby, JavaScript, Go, Python, Java, and PHP.
  • The model supports a context length of 512 tokens and is released under the bsd-3-clause license.

Summary of the Salesforce/codet5-large model card, 2026-11-24

What it is

Released bySalesforce
Released2022-07-06
VRAM1.5 GB for the weights

What it runs on

Memory and cards for codet5-large (BF16)

1.5 GBweights, file size
98 MBcache per 1K tokens
513 MBruntime overhead, at least
512 tokenscontext max
CardRequests at onceContext maxMemory
512 each
RTX 3060 12 GB191all 51211.6 GB
RTX 4060 Ti 16 GB266all 51215.4 GB
RTX 3090 24 GB425all 51223.4 GB
RTX 4090 24 GB424all 51223.4 GB
RTX 5090 32 GB576all 51231.0 GB
L40S 48 GB833all 51244.0 GB
A100 80 GB1000+all 51278.2 GB
H100 80 GB1000+all 51278.1 GB
RTX PRO 6000 Blackwell 96 GB1000+all 51293.8 GB
DGX Spark (GB10) 128 GB unified1000+all 512107 GB
H200 141 GB1000+all 512138 GB
B200 180 GB1000+all 512176 GB
Memory needed at each load
Requests at once512 tokens each
12.0 GB
52.2 GB
82.4 GB
162.8 GB
323.6 GB
645.2 GB

One card, with vLLM's small-card settings.

From the model card

What Salesforce says about codet5-large

Read the model card

Model description

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.

Training data

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.

Training procedure

CodeT5-large was pretrained using masked span prediction objective for 150 epochs. See Section 4.1 of the paper for more details.

Evaluation results

We validate the effectiveness of this checkpoint pretrained with simplified strategies on CodeXGLUE benchmark. See Appendix A.1 of the paper for more details.

How to use

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))

Ethical Considerations

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.

BibTeX entry and citation info

@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.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms