What is GPT-4.1
GPT-4.1 is the latest generation language model launched by OpenAI, including three versions: GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano. The series of models have significantly improved in coding ability, instruction following, and long text processing, supporting a context window of up to 1 million tokens. In multiple benchmark tests, GPT-4.1 performs excellently, such as scoring 54.6% on the SWE-bench Verified test, an increase of 21.4 percentage points over GPT-4o. The GPT-4.1 series has lower costs and is currently the fastest and cheapest model. The GPT-4.1 series models are currently only provided through the API and are open to all developers.
Main features of GPT-4.1
- Long context processing capability: The GPT-4.1 series models support context processing capability of up to 1 million tokens. This enables the model to process longer texts, such as entire books or large codebases.
- Multimodal processing: The GPT-4.1 series models have also been optimized in multimodal processing. The visual encoder and text encoder are separate, with cross-attention. The design enables the model to better process mixed image-text content.
- Code generation and optimization: GPT-4.1 performs significantly better than previous generation models on programming tasks. On the SWE-bench Verified test, the accuracy reaches 54.6%, an increase of 21.4 percentage points over GPT-4o. It can more efficiently explore codebases, write code, and test cases.
- Multilingual support: In multilingual coding ability tests, GPT-4.1's performance doubled, making it more efficient when handling multilingual programming tasks, code optimization, and version management.
- Tool calling efficiency: In practical applications, such as Windsurf's internal coding benchmark test, GPT-4.1 scored 60% higher than GPT-4o , and tool calling efficiency improved by 30%.
- Complex instruction processing: GPT-4.1 performs excellently in instruction following and can more reliably follow complex instructions. On Scale's MultiChallenge benchmark test, the score improved by 10.5 percentage points over GPT-4o.
- Multi-turn dialogue capability: In multi-turn dialogues, GPT-4.1 can better track context information and maintain dialogue coherence. In OpenAI's internal instruction-following evaluation, GPT-4.1 performs especially prominently on difficult prompts.
- Ultra-large context window: The GPT-4.1 series models support context processing capability of up to 1 million tokens, 8 times that of GPT-4o. This enables the model to process ultra-long texts, such as 8 complete sets of React source code or hundreds to thousands of pages of documents.
- Long text understanding: In long text understanding, GPT-4.1 can more accurately locate and extract key information. In OpenAI's long context evaluation, GPT-4.1 can accurately locate target text within a context of up to 1 million tokens.
- Image understanding: The GPT-4.1 series performs excellently in image understanding, and GPT-4.1 mini often exceeds GPT-4o in image benchmark tests.
- Video content understanding: In the Video-MME test, GPT-4.1 understood 30 to 60 minute videos without subtitles and answered multiple-choice questions, achieving a score of 72%, reaching the current state of the art.
- High cost-effectiveness: While improving performance, the GPT-4.1 series has lower costs. GPT-4.1's medium-scale query cost is 26% lower than GPT-4o, and GPT-4.1 nano is OpenAI's cheapest and fastest model to date.
- Low Latency and High Efficiency: GPT-4.1 mini reduces latency by nearly half and cost by 83%, making it suitable for tasks requiring low latency.
Technical Principles of GPT-4.1
- Optimization of the Transformer Architecture: GPT-4.1 is still based on the Transformer architecture, with further optimization. It supports the model in capturing broader contextual information during training. Through learning from a large corpus, the GPT-4.1 series models have learned how to maintain attention across a vast range of text, accurately locate relevant information, and improve their ability to solve complex tasks.
- Mixture of Experts (MoE): To reduce computational cost and storage requirements while maintaining high performance, GPT-4.1 adopts a Mixture of Experts model. The model contains 16 independent expert models, each with 111 billion parameters. Each forward pass is routed through two expert models, enabling the model to be more flexible and efficient when handling different data and task distributions.
- Training Dataset: GPT-4.1 was trained on a dataset containing 13 trillion tokens. These tokens are not unique, but are calculated based on the number of iterations. The massive dataset enables GPT-4.1 to learn more language knowledge and contextual information during training, improving the model's accuracy in natural language processing tasks.
- Inference Optimization: GPT-4.1 adopts a variety of optimization techniques during inference, such as variable batch sizes and continuous batching. This greatly optimizes latency and reduces inference costs.
- Cost Control: By adopting a Mixture of Experts model and optimized training and inference strategies, GPT-4.1 significantly reduces computational cost and storage requirements while maintaining high performance. This makes the model more economical and efficient in practical applications.
Performance of the GPT-4.1 Model Series
- GPT-4.1: In coding ability, GPT-4.1 scored 54.6% on the SWE-bench Verified test, an improvement of 21.4 percentage points over GPT-4o, making it the current leading coding model. In instruction following, its score on Scale's MultiChallenge benchmark improved by 10.5 percentage points over GPT-4o. In long-text understanding, the Video-MME test shows that GPT-4.1 scored 72.0% in the long-video no-subtitle category, an improvement of 6.7 percentage points over GPT-4o.
- GPT-4.1 mini: It has made significant progress in small-model performance, even surpassing GPT-4o on many benchmarks. In intelligence evaluation, it is comparable to GPT-4o while reducing latency by nearly half and cost by 83%.
- GPT-4.1 nano: It is the first nano model released by OpenAI and is currently the fastest and cheapest model. It scores 80.1% on MMLU, 50.3% on GPQA, and 9.8% on Aider polyglot coding, surpassing GPT-4o mini.
GPT-4.1 Project Address
- Project Official Website:https://openai.com/index/gpt-4-1/
GPT-4.1 Model Pricing
- GPT-4.1:: $2 per million input tokens, $8 per million output tokens.
- GPT-4.1 mini:: $0.4 per million input tokens, $1.6 per million output tokens.
- GPT-4.1 nano:: $0.1 per million input tokens, $0.4 per million output tokens.
Application Scenarios of GPT-4.1
- Legal Field: In legal document review, GPT-4.1's multi-document review accuracy is 17% higher than GPT-4o, processing complex legal documents more efficiently.
- Financial Analysis: In financial data analysis, GPT-4.1 can more accurately extract key information from large documents, providing analysts with more comprehensive data support.
- Front-end development: In front-end programming, GPT-4.1 can create more powerful and more aesthetically pleasing web applications, and the generated websites were preferred by paid human reviewers in 80% of cases.