SuperAPIAI Directory

Apache 2.0

huggingface.co · AI coding

CodeGen2.5-7B-multi is an autoregressive language model for program synthesis released by Salesforce, based on CodeGen2 and trained on StarCoderData for 1.4T tokens, achieving competitive results with less than half the parameter count of StarCoderBase-15.5B. The model supports code infilling and multiple programming languages, and is released under the Apache-2.0 license. It can be loaded via AutoModelForCausalLM, and OpenAI tiktoken must be installed as the tokenizer. The model is suitable for generating executable code from English comment prompts, and can also complete partially generated code. Note: this version is intended for research purposes only; generated code may be verbatim from the training data, and the corresponding license requirements must be observed.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsWeb

About this tool

CodeGen2.5-7B-multi is one of the CodeGen2.5 series of autoregressive language models released by Salesforce, designed specifically for program synthesis tasks. Building on CodeGen2, this model was trained on StarCoderData for 1.4T tokens, achieving competitive results with less than half the model size of StarCoderBase-15.5B. Like CodeGen2, the model supports code infilling and supports multiple programming languages.

Main capabilities:

  • Program synthesis: generate executable code from English prompts (usually in the form of comment strings).
  • Code completion: support conventional causal sampling to generate completions based on context.
  • Code infilling: follow the CodeGen2 format, using special tokens such as <mask_N>, <sep>, and <eom> to insert code at specified positions.
  • Multiple programming language support.

Usage: The model can be easily loaded via the AutoModelForCausalLM functionality. OpenAI tiktoken must be installed for the tokenizer before use. For conventional causal sampling, generate completions directly based on context; for infilling tasks, insert a <mask_1> token at the cursor position, append a <sep> token to indicate the boundary, then insert another <mask_1> to represent the mask to be filled, and the final output can be truncated with <eom>.

Applicable scenarios: The model is intended for and best at program synthesis, i.e., generating executable code from English prompts, and can also complete partially generated code. It is suitable for development assistance scenarios such as automatic code completion and code infilling.

Limitations and notes:

  • This version (CodeGen2.5-7B-multi) uses the Apache-2.0 license. The CodeGen2.5-7B-instruct in the same series is intended for research purposes only.
  • This release is intended for research purposes only, to support academic papers. The model, dataset, and code are not designed or evaluated for all downstream uses, and users are advised to evaluate issues such as accuracy, safety, and fairness before deployment.
  • Although the pretraining dataset was filtered for permissive licenses, the model may still generate source code from the dataset verbatim, and the licenses of generated code may require attribution or other specific requirements that must be observed. The data provider BigCode provides a search index that can be used to query the provenance of generated code and apply appropriateattribution.
  • The model has limitations common to AI, and errors or misuse in high-risk scenarios may have a significant impact on people's lives, rights, or safety; users should comply with applicable laws and best practices.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools