Skip to content
llmmodels
Code modelOpen weightsHistorical

CodeGen2

by Salesforce · May 3, 2023

CodeGen2 is an open-weight code model from Salesforce, released May 3, 2023. It has 16B parameters.

Provider
Salesforce
Released
May 3, 2023
Type
Code model
Parameters
16B
Context window
—
Max output
—
Input
text
Output
text
Weights
Open weights
License
Open (permissive)
Knowledge cutoff
—
Status
Historical

About CodeGen2

Large language models (LLMs) have demonstrated remarkable abilities in representation learning for program synthesis and understanding tasks.

How to run CodeGen2

CodeGen2 is an open-weight model. Run it locally with Ollama, LM Studio or llama.cpp (quantized GGUF builds), or serve it on GPUs with vLLM, SGLang or Hugging Face TGI. At 16B parameters it needs roughly 10 GB of memory at 4-bit quantization.

CodeGen2 vs alternatives

Alternatives to CodeGen2
ModelProviderReleasedParamsContextInput $/1MOutput $/1MECI
LLaMA-13BopenMetaFeb 202313B———85.2
FunSearchopenGoogle DeepMindDec 202315B————
MOSS-Moon-003openFudan UniversityApr 202316B————
WizardCoder-15.5BopenMicrosoftJun 202316B————
StarCoderopenIBMMay 202316B————
Code Llama-13BopenMetaAug 202313B————
NexusRaven-V2openNexusflowDec 202313B————
CodeFuse-13BopeninclusionAI (Ant Group)Oct 202313B————

More models from Salesforce

All Salesforce models →
ModelReleasedParamsContextInput $/1MOutput $/1M
XGen-7BopenSep 20236.7B———
Llama-xLAM-2-8b-fc-ropenMar 20258B———
GTA1-7B-2507openSep 20258.3B———
blip2-opt-2.7bopenFeb 20233.7B———
xLAM-2-1b-fc-ropenMar 20251.5B———
xLAM-1b-fc-ropenJul 20241.3B———
codegen2-16B_PopenApr 202316B———
blip2-flan-t5-xlopenFeb 20233.9B———

Frequently asked questions

Who made CodeGen2?

CodeGen2 was developed by Salesforce (United States of America). It was released on May 3, 2023.

Is CodeGen2 open source?

Yes. CodeGen2's weights are publicly available, so you can download and run it yourself.

How many parameters does CodeGen2 have?

CodeGen2 has 16B parameters.

Sources: epoch · paper. Last updated 2026-11-22.