# salesforce/CodeGen

CodeGen is a family of open-source model for program synthesis. Trained on TPU-v4. Competitive with OpenAI Codex.

Repository: https://github.com/salesforce/CodeGen
Canonical: https://ross.abutalabs.com/products/codegen
Language: Python
License: Apache-2.0
License Family: permissive
Topics: programsynthesis, generativemodel, codex, languagemodel, llm, tpu-acceleration
Last push: 2026-06-02T18:14:11+00:00

## Health v2 (maintenance only)
Score: 70/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 85, release rhythm 35, longevity 100
- inputs: {"age_days": 1619, "days_push": 92, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5179, forks 422 (observed 2026-08-28T04:09:11.780052+00:00)

## What it is
CodeGen is a family of open-source large language models (350M to 16B parameters) from Salesforce AI Research for program synthesis, generating code from natural language and infilling. The repository provides model weights on Hugging Face and Python usage examples via the transformers library.

## Use cases
- generate code from natural language prompts
- run an open-source alternative to OpenAI Codex
- infill code in the middle of a file
- research program synthesis with language models
- self-host a code completion model
- fine-tune or evaluate code LLMs

## When to choose
- you need open weights for code generation you can self-host
- you want a Codex-style model for research or experimentation
- you need infill sampling capability in a code model

## When to avoid
- you need a production coding assistant with IDE integration out of the box
- you lack GPU or TPU resources for large model inference
- you want the newest state-of-the-art code LLM rather than a research artifact

## Facets
- artifact type: library
- maturity: maintenance
- function: llm-inference, machine-learning, deep-learning
- domain: large-language-models, artificial-intelligence, developer-tools
- platform: python
- tags: program-synthesis, code-generation, language-model, tpu, huggingface, open-source-models, gpu, linux

## Member repositories
- salesforce/CodeGen (main) score 70

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:11.780052+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:01:48.554612+00:00, confidence not recorded.
  - readme: https://github.com/salesforce/CodeGen (fetched 2026-08-28T04:09:11.780052+00:00, sha b7e2d22083d5)
- Data as of 2026-08-30T08:39:29.467469+00:00.
