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
- CodeGen2 vs LLaMA-13B
- CodeGen2 vs FunSearch
- CodeGen2 vs MOSS-Moon-003
- CodeGen2 vs WizardCoder-15.5B
- CodeGen2 vs StarCoder
- CodeGen2 vs Code Llama-13B
| Model | Provider | Released | Params | Context | Input $/1M | Output $/1M | ECI |
|---|---|---|---|---|---|---|---|
| LLaMA-13Bopen | Meta | Feb 2023 | 13B | — | — | — | 85.2 |
| FunSearchopen | Google DeepMind | Dec 2023 | 15B | — | — | — | — |
| MOSS-Moon-003open | Fudan University | Apr 2023 | 16B | — | — | — | — |
| WizardCoder-15.5Bopen | Microsoft | Jun 2023 | 16B | — | — | — | — |
| StarCoderopen | IBM | May 2023 | 16B | — | — | — | — |
| Code Llama-13Bopen | Meta | Aug 2023 | 13B | — | — | — | — |
| NexusRaven-V2open | Nexusflow | Dec 2023 | 13B | — | — | — | — |
| CodeFuse-13Bopen | inclusionAI (Ant Group) | Oct 2023 | 13B | — | — | — | — |
More models from Salesforce
All Salesforce models →| Model | Released | Params | Context | Input $/1M | Output $/1M |
|---|---|---|---|---|---|
| XGen-7Bopen | Sep 2023 | 6.7B | — | — | — |
| Llama-xLAM-2-8b-fc-ropen | Mar 2025 | 8B | — | — | — |
| GTA1-7B-2507open | Sep 2025 | 8.3B | — | — | — |
| blip2-opt-2.7bopen | Feb 2023 | 3.7B | — | — | — |
| xLAM-2-1b-fc-ropen | Mar 2025 | 1.5B | — | — | — |
| xLAM-1b-fc-ropen | Jul 2024 | 1.3B | — | — | — |
| codegen2-16B_Popen | Apr 2023 | 16B | — | — | — |
| blip2-flan-t5-xlopen | Feb 2023 | 3.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.