Salesforce’s open Codex rival keeps getting smaller and smarter
CodeGen exists to offer an open, downloadable family of code-generation models that Salesforce claims can go toe-to-toe with OpenAI Codex.

What it does
CodeGen is a family of large language models built for program synthesis. Salesforce has released three generations—CodeGen1, CodeGen2, and CodeGen2.5—spanning sizes from 350 million to 16 billion parameters, all hosted on Hugging Face for use with standard transformers loaders. This repository serves as the official release hub for the weights, research papers, and the separate Jaxformer training stack.
The interesting bit
CodeGen2 introduced infill sampling, meaning it can generate code between existing lines instead of merely appending to the end. CodeGen2.5 then claimed to outperform 16-billion-parameter rivals using only 7 billion parameters—a welcome reversal of the usual bigger-is-better arms race.
Key highlights
- Three generations: CodeGen1 (March 2022), CodeGen2 (May 2023), and CodeGen2.5 (July 2023)
- Model sizes range from 350M to 16B parameters
- CodeGen2.5 reportedly outperforms 16B models with only 7B parameters, per the README
- CodeGen2 supports infill sampling for filling code between existing context
- Weights are available on Hugging Face Hub and loadable via
AutoModelForCausalLM - Training and fine-tuning code is maintained separately in the Jaxformer repository
- Backed by two ICLR 2023 papers
Caveats
- The README explicitly limits the release to research purposes and warns that the models are “not specifically designed or evaluated for all downstream purposes,” so production use requires your own safety and fairness audit.
- Performance claims—such as matching Codex “at the time” or 2.5 outperforming larger models—are stated without supporting benchmarks in the README itself.
Verdict
Grab it if you want open weights for code-generation research or a local model to fine-tune. If you are looking for a polished, production-ready copilot with built-in guardrails, the disclaimer makes it clear this is not that.
Frequently asked
- What is salesforce/CodeGen?
- CodeGen exists to offer an open, downloadable family of code-generation models that Salesforce claims can go toe-to-toe with OpenAI Codex.
- Is CodeGen open source?
- Yes — salesforce/CodeGen is open source, released under the Apache-2.0 license.
- What language is CodeGen written in?
- salesforce/CodeGen is primarily written in Python.
- How popular is CodeGen?
- salesforce/CodeGen has 5.2k stars on GitHub.
- Where can I find CodeGen?
- salesforce/CodeGen is on GitHub at https://github.com/salesforce/CodeGen.