AB
AiBoss
project

GPT-4.1 - OpenAI introduces a new generation language model supporting millions of token contexts.

GPT-4.1 is OpenAI's latest next-generation language model, comprising three versions: GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano. This series of models shows significant improvements in encoding capabilities, instruction compliance, and long text processing...

What is GPT-4.1?

GPT-4.1 is OpenAI's latest next-generation language model, comprising three versions: GPT-4.1, GPT-4.1 mini, and GPT-4.1 nano. This series of models offers significant improvements in encoding capabilities, instruction compliance, and long text processing, supporting context windows with up to 1 million tokens. GPT-4.1 performs exceptionally well in multiple benchmark tests, achieving a score of 54.6% in the SWE-bench Verified test, a 21.4 percentage point improvement over GPT-4o. The GPT-4.1 series is also more cost-effective, making it the fastest and cheapest model currently available. The GPT-4.1 series is currently offered solely through an API, which is open to all developers.

Main functions of GPT-4.1

  • Long context processing capabilityThe GPT-4.1 series models support context processing of up to 1 million tokens, enabling them to handle longer texts, such as entire books or large codebases.
  • Multimodal processingThe GPT-4.1 series models have also been optimized for multimodal processing. The visual encoder and text encoder are separate, with cross-attention. The design enables the model to better handle mixed text and image content.
  • Code generation and optimizationGPT-4.1 significantly outperforms its predecessors in programming tasks. In the SWE-bench Verified test, it achieved an accuracy of 54.6%, a 21.4 percentage point improvement over GPT-4o. It enables more efficient codebase exploration, code writing, and test case development.
  • Multilingual supportIn multilingual coding ability tests, GPT-4.1 doubled the performance, making it more efficient in handling multilingual programming tasks, code optimization, and version management.
  • Tool call efficiencyIn practical applications, such as Windsurf's internal coding benchmark tests, GPT-4.1 scores 60% higher than GPT-4o, and tool call efficiency is improved by 30%.
  • Complex instruction processingGPT-4.1 performs exceptionally well in instruction execution, reliably following complex instructions. In Scale's MultiChallenge benchmark, it scores 10.5 percentage points higher than GPT-4o.
  • Multi-turn dialogue capabilityIn multi-turn dialogues, GPT-4.1 is better able to track contextual information and maintain dialogue coherence. In OpenAI's internal instruction compliance evaluation, GPT-4.1 performed particularly well in handling difficult prompts.
  • Extra Large Context WindowThe GPT-4.1 series models support context processing for up to 1 million tokens, eight times that of GPT-4o. This enables the models to handle extremely long texts, such as eight complete React source codes or hundreds or thousands of pages of documentation.
  • Long text comprehensionIn 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 in a context of up to 1 million tokens.
  • Image understandingThe GPT-4.1 series excels in image understanding, with the GPT-4.1 mini frequently outperforming the GPT-4o in image benchmarks.
  • Video content comprehensionIn the Video-MME test, GPT-4.1 achieved a 72% score on comprehension and multiple-choice questions for 30 to 60 minutes of video without subtitles, reaching the current best performance level.
  • High cost performanceThe GPT-4.1 series offers improved performance at a lower cost. Medium-sized queries with GPT-4.1 cost 26% less than GPT-4o, and GPT-4.1 nano is currently OpenAI's cheapest and fastest model.
  • Low latency and high efficiencyThe GPT-4.1 mini reduces latency by nearly half and costs by 83%, making it suitable for tasks requiring low latency.

Technical Principles of GPT-4.1

  • Optimization of Transformer architectureGPT-4.1 remains based on the Transformer architecture but has been further optimized. It supports the model capturing a wider range of contextual information during training. Through learning from a large corpus, the GPT-4.1 series of models has learned how to maintain attention across a vast text scope, accurately locate relevant information, and improve its ability to solve complex tasks.
  • Mixture of Experts (MoE)To maintain high performance while reducing computational costs and storage requirements, GPT-4.1 employs a hybrid expert model. The model comprises 16 independent expert models, each with 111 billion parameters. Each forward pass route traverses two expert models, enabling the model to be more flexible and efficient in handling different data and task distributions.
  • Training datasetGPT-4.1 was trained using a dataset containing 13 trillion tokens. These tokens are not unique but are calculated based on the number of iterations. This massive dataset allows GPT-4.1 to learn more linguistic knowledge and contextual information during training, improving the model's accuracy in natural language processing tasks.
  • Inference optimizationGPT-4.1 employs several optimization techniques during inference, such as variable batch size and sequential batch processing. This significantly optimizes latency and reduces inference costs.
  • Cost controlBy employing a hybrid expert model and optimized training and inference strategies, GPT-4.1 significantly reduces computational costs and storage requirements while maintaining high performance, making the model more cost-effective in practical applications.

Performance of the GPT-4.1 model series

  • GPT-4.1In terms of encoding capabilities, GPT-4.1 achieved a score of 54.6% in the SWE-bench Verified test, a 21.4 percentage point improvement over GPT-4o, making it the leading encoding model currently available. Regarding instruction compliance, it outperformed GPT-4o by 10.5 percentage points in Scale's MultiChallenge benchmark test. In long text understanding, the Video-MME test showed that GPT-4.1 achieved a score of 72.0% in the long video without subtitles category, a 6.7 percentage point improvement over GPT-4o.
  • GPT-4.1 miniSignificant improvements have been made in small-scale model performance, even surpassing GPT-4o in many benchmarks. It is comparable to GPT-4o in intelligent evaluation, while reducing latency by nearly half and cost by 83%.
  • GPT-4.1 nanoIt is OpenAI's first nano model and is currently the fastest and cheapest model. It scored 80.1% on MMLU, 50.3% on GPQA, and 9.8% on Aider polyglot encoding, surpassing GPT-4o mini.

Project address for 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.40 per million input tokens, $1.60 per million output tokens.
  • GPT-4.1 nano$0.10 per million input tokens, $0.40 per million output tokens.

Application scenarios of GPT-4.1

  • legal fieldIn terms of legal document review, GPT-4.1's multi-document review accuracy is 17% higher than GPT-4o, making it more efficient at handling complex legal documents.
  • Financial AnalysisIn financial data analysis, GPT-4.1 can extract key information more accurately from large documents, providing analysts with more comprehensive data support.
  • Front-end developmentIn front-end programming, GPT-4.1 can create more powerful and aesthetically pleasing web applications, and the generated websites are favored by paid human reviewers in 80% of cases.