ERNIE Code

ERNIE-Code3-128K

by Baidu · Retired; Qianfan ModelBuilder listed August 14, 2025 as the retirement date.

ERNIE-Code3-128K was a retired Baidu coding model built for code completion, code generation, unit-test creation, optimization, explanation, and action prediction. Qianfan ModelBuilder supported full-parameter and LoRA fine-tuning, while the documented 128K limit applied to training sequences rather than verified output length. The model was retired on August 14, 2025.

Text Reasoning Coding
ERNIE-Code3-128K was designed for software-development tasks rather than general conversation or multimodal generation. It combined a long training sequence limit with code-focused capabilities and Qianfan ModelBuilder support for supervised fine-tuning and preference optimization. Because Baidu retired it from the platform on August 14, 2025, it is best understood as a historical model and not as a currently available production endpoint.
Outputs

What ERNIE-Code3-128K can produce

Text
Inputs

What it can understand

Text
Capabilities

Supported features

Fine-tuning
Model profile

Performance characteristics

4/10 Reasoning
8/10 Coding
6/10 Speed
7/10 Cost efficiency
Specifications

Technical details

Model family ERNIE Code
Model type Coding
Context window 128K tokens
Release date 2023-12-26
Status Retired; Qianfan ModelBuilder listed August 14, 2025 as the retirement date.
Deprecation date 2025-08-14
Shutdown date 2025-08-14
Knowledge cutoff notes

Baidu's available documentation identifies the model's coding functions and sequence limit but does not provide a reliable explicit knowledge-cutoff date.

Model notes

The canonical official spelling is ERNIE-Code3-128K, while some Baidu materials and platform announcements use ERNIE-Code-3-128K. Baidu documented the model as a base model for Qianfan SFT and DPO workflows, with both full-parameter updating and LoRA training. Documented capabilities included code completion, natural-language code generation, unit-test generation, code optimization, comment generation, code explanation, and action prediction. The 128K figure refers to the maximum sequence length for a training example, not a verified maximum generated-output length. Historical fine-tuning prices were listed at 0.005 CNY per 1,000 tokens during non-idle discounted scheduling and 0.01 CNY per 1,000 tokens at the listed original price for both full-parameter and LoRA training; these were training charges, not standard inference input/output prices. Editorial scores are comparative estimates rather than vendor benchmarks.

Model guide

ERNIE-Code3-128K: Baidu’s Retired 128K Coding Model for Fine-Tuning

ERNIE-Code3-128K was Baidu’s coding-specialized ERNIE Code model with a documented 128K-token training sequence limit. It supported code completion, natural-language-to-code generation, unit-test generation, code optimization, comment generation, code explanation, and action prediction. Qianfan ModelBuilder provided full-parameter and LoRA fine-tuning, but the model was retired on August 14, 2025.

What ERNIE-Code3-128K was

ERNIE-Code3-128K was a coding-specialized language model from Baidu’s ERNIE Code family. Its main purpose was to process and generate programming-related text, including source code, comments, explanations, and tests. Baidu documentation described the broader ERNIE Code family as supporting more than 600 programming languages, with particular strengths in Go, Java, Python, and C++.

The model name contains two useful clues. “Code” identifies its software-development focus, while “128K” refers to a maximum training sequence length of 128,000 tokens in the documented configuration. A token is a small unit of text used by a language model; the sequence limit determines how much input context can be handled in one training example. The available documentation does not establish that 128K was a maximum generated-output length, so it should not be interpreted as an output limit.

ERNIE-Code3-128K was listed as a base model in Baidu Qianfan ModelBuilder. This made it more relevant to organizations building or fine-tuning a specialized coding model than to users looking for a ready-made consumer chatbot.

Documented coding capabilities

Baidu documented several software-development functions for the model:

  • Code completion: continuing partially written source code.
  • Natural-language code generation: producing code from a description of the desired behavior.
  • Unit-test generation: creating tests for existing functions or modules.
  • Code optimization: suggesting revised implementations intended to improve code quality or efficiency.
  • Comment generation: adding explanatory comments to source code.
  • Code explanation: describing what a code fragment does in natural language.
  • Action prediction: predicting a likely next coding action or continuation.

These functions cover a typical development-assistance workflow: a developer can provide code or a requirement, ask for a continuation or transformation, and use the result as a draft for review. The documentation describes capabilities, not guaranteed correctness. Generated code still requires testing, security review, dependency checks, and human validation before production use.

Fine-tuning through Qianfan ModelBuilder

One of the model’s clearest differentiators was its training support. Baidu documented both full-parameter updating and LoRA training for ERNIE-Code3-128K. Full-parameter fine-tuning updates the model’s parameters across the training process and can require substantially more computing resources. LoRA, or Low-Rank Adaptation, trains a smaller set of additional parameters while leaving the original model mostly unchanged. It is often used when a team wants a more economical way to adapt a model to a particular codebase, style, or internal task.

Qianfan ModelBuilder also documented supervised fine-tuning and preference-optimization workflows. Supervised fine-tuning can teach the model from examples of desired inputs and outputs, such as internal coding conventions or representative code transformations. Preference optimization can be used when one response should be ranked above another according to human or system preferences. The supplied documentation does not provide benchmark results showing how much either method improved accuracy, so these should be treated as supported workflows rather than performance guarantees.

Technical specifications and limitations

SpecificationVerified information
ProviderBaidu
Model familyERNIE Code
Model typeCoding language model
Release dateDecember 26, 2023
Documented context or training sequence limit128,000 tokens for a training example
Text inputSupported
Text outputSupported
Image, audio, and video inputNot supported in the supplied model record
Image, audio, and video outputNot supported
Tool or function callingNot documented as supported
Fine-tuningSupported through full-parameter updating and LoRA
Retirement dateAugust 14, 2025

The model record does not provide a verified maximum output-token limit, knowledge-cutoff date, streaming specification, caching support, batch API, or JSON-mode capability. It also does not document native web search, external tool use, or function calling. Those omissions are important when assessing the model for a modern application: a long input sequence does not by itself imply agentic behavior, structured-output guarantees, or access to external systems.

Pricing and cost considerations

Standard inference input and output prices were not supplied for ERNIE-Code3-128K. The available historical pricing information concerns fine-tuning rather than ordinary generation. Baidu listed training charges of 0.005 CNY per 1,000 tokens during non-idle discounted scheduling and 0.01 CNY per 1,000 tokens at the listed original price for both full-parameter and LoRA training.

These historical figures should not be presented as current availability or as inference prices. Since the model was retired from Qianfan ModelBuilder on August 14, 2025, a new deployment should verify whether an equivalent successor, archived artifact, or replacement service exists before estimating costs. The supplied research does not identify a current replacement model or current endpoint pricing.

Strengths and trade-offs

ERNIE-Code3-128K’s principal strength was specialization. Its documented functions addressed practical programming tasks, and its 128K training sequence limit was substantial for workflows involving long source files, multiple related files, or detailed code documentation. The combination of full-parameter and LoRA training also gave teams more than one way to adapt the model, depending on their computing budget and customization requirements.

Its limitations are equally significant. It was text-only, with no verified image, audio, or video input or output. It had no documented native tool or function support, so it was not a complete coding agent that could independently run tests, inspect a repository, edit files, or call development tools. The absence of a verified output limit also means that the documented 128K figure should not be used to estimate how much code the model could generate in one response.

Editorial assessments in the supplied record rate its coding suitability relatively highly, while giving it a middle-range reasoning and speed assessment and a favorable cost assessment. These are comparative editorial estimates, not Baidu benchmarks. They should not be confused with measured accuracy, latency, or total-cost results.

When to choose this model

Historically, ERNIE-Code3-128K would have been a reasonable candidate for teams that needed a code-focused base model and planned to fine-tune it on internal examples. It was especially relevant for code completion, code generation, unit-test drafting, code explanation, and transformations involving long training examples. LoRA would have been the practical starting point for teams seeking a lighter adaptation path, while full-parameter training could suit projects with greater compute resources and a need for deeper specialization.

It would not have been the right choice for a multimodal assistant, a general-purpose conversational model, or an application that required built-in tool use and structured actions. A currently maintained coding model would also be more appropriate for a new production project because ERNIE-Code3-128K was retired. Teams needing guaranteed JSON responses, external repository operations, test execution, or current API support should select an option whose documentation explicitly provides those features.

The model’s long sequence limit could also be attractive for source-code analysis, but users should distinguish between the training sequence limit and a production context or output guarantee. The supplied sources verify the former, not a complete current serving specification.

Availability and final assessment

ERNIE-Code3-128K was released on December 26, 2023 and later retired from Baidu Qianfan ModelBuilder on August 14, 2025. It therefore belongs in a historical model catalog rather than a list of currently dependable production endpoints.

Its importance lies in the combination of a dedicated coding focus, a documented 128K training sequence limit, and fine-tuning support through both full-parameter updating and LoRA. For historical evaluation or migration research, those properties make it useful to understand. For a new implementation, however, retirement status, unavailable current pricing, undocumented output limits, and the lack of verified tool support mean that a maintained alternative should be investigated first.


Answers to Frequently Asked Questions

What were the main limitations of ERNIE-Code3-128K?
The model was text-only and had no documented support for image, audio, or video input or output, tool calling, function calling, or native external-system access. Its documentation also did not verify a maximum output-token limit, JSON mode, streaming, or current inference pricing.
When was ERNIE-Code3-128K retired?
ERNIE-Code3-128K was released on December 26, 2023, and retired from Baidu Qianfan ModelBuilder on August 14, 2025. It should therefore be treated as a historical model rather than a dependable choice for a new production deployment.
Could ERNIE-Code3-128K be fine-tuned?
Yes. Baidu Qianfan ModelBuilder documented both full-parameter fine-tuning and LoRA training for ERNIE-Code3-128K. It also supported supervised fine-tuning and preference-optimization workflows for adapting the model to internal codebases, conventions, and tasks.
What was ERNIE-Code3-128K?
ERNIE-Code3-128K was a coding-specialized language model from Baidu’s ERNIE Code family. It was designed for tasks such as code completion, natural-language code generation, unit-test generation, code explanation, comment generation, and code optimization.
What did the 128K context designation mean for ERNIE-Code3-128K?
The 128K designation referred to a documented maximum training sequence length of 128,000 tokens. It described how much context could be handled in a training example, not a verified maximum output length or a guaranteed production context window.


Sources 3
Provider

About Baidu