Generative Pre-trained Transformer 4 (GPT-4)
Developer(s)	OpenAI
Initial release	March 14, 2023; 8 months ago
Predecessor	GPT-3.5
Type	
Multimodal
Large language model
Generative pre-trained transformer
Foundation model
License	Proprietary
Website	openai.com/product/gpt-4 
Part of a series on
Machine learning
and data mining
An illustration of a neural network with dark
Paradigms
Problems
Supervised learning
(classification • regression)
Clustering
Dimensionality reduction
Structured prediction
Anomaly detection
Artificial neural network
AutoencoderCognitive computingDeep learningDeepDreamFeedforward neural networkRecurrent neural network LSTMGRUESNreservoir computingRestricted Boltzmann machineGANDiffusion modelSOMConvolutional neural network U-NetTransformer VisionSpiking neural networkMemtransistorElectrochemical RAM (ECRAM)
Reinforcement learning
Learning with humans
Model diagnostics
Mathematical foundations
Machine-learning venues
Related articles
vte
Generative Pre-trained Transformer 4 (GPT-4) is a multimodal large language model created by OpenAI, and the fourth in its series of GPT foundation models.[1] It was initially released on March 14, 2023,[1] and has been made publicly available via the paid chatbot product ChatGPT Plus, and via OpenAI's API.[2] As a transformer-based model, GPT-4 uses a paradigm where pre-training using both public data and "data licensed from third-party providers" is used to predict the next token. After this step, the model was then fine-tuned with reinforcement learning feedback from humans and AI for human alignment and policy compliance.[3]: 2 

Observers reported that the iteration of ChatGPT using GPT-4 was an improvement on the previous iteration based on GPT-3.5, with the caveat that GPT-4 retains some of the problems with earlier revisions.[4] GPT-4 is also capable of taking images as input on ChatGPT.[5] OpenAI has declined to reveal various technical details and statistics about GPT-4, such as the precise size of the model.[6]

Background
Further information: GPT-3 § Background, and GPT-2 § Background
OpenAI introduced the first GPT model (GPT-1) in 2018, publishing a paper called "Improving Language Understanding by Generative Pre-Training."[7] It was based on the transformer architecture and trained on a large corpus of books.[8] The next year, they introduced GPT-2, a larger model that could generate coherent text.[9] In 2020, they introduced GPT-3, a model with 100 times as many parameters as GPT-2, that could perform various tasks with few examples.[10] GPT-3 was further improved into GPT-3.5, which was used to create the chatbot product ChatGPT.

Rumors claim that GPT-4 has 1.76 trillion parameters, which was first estimated by the speed it was running and by George Hotz.[11]

Capabilities
OpenAI stated that GPT-4 is "more reliable, creative, and able to handle much more nuanced instructions than GPT-3.5."[12] They produced two versions of GPT-4, with context windows of 8,192 and 32,768 tokens, a significant improvement over GPT-3.5 and GPT-3, which were limited to 4,096 and 2,049 tokens respectively.[13] Some of the capabilities of GPT-4 were predicted by OpenAI before training it, although other capabilities remained hard to predict due to breaks[14] in downstream scaling laws. Unlike its predecessors, GPT-4 is a multimodal model: it can take images as well as text as input;[15] this gives it the ability to describe the humor in unusual images, summarize text from screenshots, and answer exam questions that contain diagrams.[16]

To gain further control over GPT-4, OpenAI introduced the "system message", a directive in natural language given to GPT-4 in order to specify its tone of voice and task. For example, the system message can instruct the model to "be a Shakespearean pirate", in which case it will respond in rhyming, Shakespearean prose, or request it to "always write the output of [its] response in JSON", in which case the model will do so, adding keys and values as it sees fit to match the structure of its reply. In the examples provided by OpenAI, GPT-4 refused to deviate from its system message despite requests to do otherwise by the user during the conversation.[16]

When instructed to do so, GPT-4 can interact with external interfaces.[17] For example, the model could be instructed to enclose a query within <search></search> tags to perform a web search, the result of which would be inserted into the model's prompt to allow it to form a response. This allows the model to perform tasks beyond its normal text-prediction capabilities, such as using APIs, generating images, and accessing and summarizing webpages.[18]

A 2023 article in Nature stated programmers have found GPT-4 useful for assisting in coding tasks (despite its propensity for error), such as finding errors in existing code and suggesting optimizations to improve performance. The article quoted a biophysicist who found that the time he required to port one of his programs from MATLAB to Python went down from days to "an hour or so". On a test of 89 security scenarios, GPT-4 produced code vulnerable to SQL injection attacks 5% of the time, an improvement over GitHub Copilot from the year 2021, which produced vulnerabilities 40% of the time.[19]

In November 2023, new models and products were announced[20] by OpenAI, one of them being GPT-4 Turbo. The preview of GPT-4 Turbo was launched, offering expanded capabilities with a 128K context window. This development indicates a continuous effort to enhance the power and utility of the model, catering to more complex and extensive use cases.[21]

Aptitude on standardized tests
GPT-4 demonstrates aptitude on several standardized tests. OpenAI claims that in their own testing the model received a score of 1410 on the SAT (94th[22] percentile), 163 on the LSAT (88th percentile), and 298 on the Uniform Bar Exam (90th percentile).[23] In contrast, OpenAI claims that GPT-3.5 received scores for the same exams in the 82nd,[22] 40th, and 10th percentiles, respectively.[3] GPT-4 also passed an oncology exam,[24] an engineering exam[25] and a plastic surgery exam.[26] In the Torrance Tests of Creative Thinking, GPT-4 scored within the top 1% for originality and fluency, while its flexibility scores ranged from the 93rd to the 99th percentile.[27]

Medical applications
Researchers from Microsoft tested GPT-4 on medical problems and found "that GPT-4, without any specialized prompt crafting, exceeds the passing score on USMLE by over 20 points and outperforms earlier general-purpose models (GPT-3.5) as well as models specifically fine-tuned on medical knowledge (Med-PaLM, a prompt-tuned version of Flan-PaLM 540B). Despite GPT-4's strong performance on tests, the report warns of "significant risks" of using LLMs in medical applications, as they may provide inaccurate recommendations and hallucinate major factual errors.[relevant?][28]

In April 2023, Microsoft and Epic Systems announced that they will provide healthcare providers with GPT-4-powered systems for assisting in responding to questions from patients and analysing medical records.[29][30][31][32][33][34][35]

Limitations
Like its predecessors, GPT-4 has been known to hallucinate, meaning that the outputs may include information not in the training data or that contradicts the user's prompt.[36]

GPT-4 also lacks transparency in its decision-making processes. If requested, the model is able to provide an explanation as to how and why it makes its decisions but these explanations are formed post-hoc; it's impossible to verify if those explanations truly reflect the actual process. In many cases, when asked to explain its logic, GPT-4 will give explanations that directly contradict its previous statements.[18]

In 2023, researchers tested GPT-4 against a new benchmark called ConceptARC, designed to measure abstract reasoning, and found it scored below 33% on all categories, while models specialized for similar tasks scored 60% on most, and humans scored at least 91% on all. Sam Bowman, who was not involved in the research, said the results do not necessarily indicate a lack of abstract reasoning abilities, because the test is visual, while GPT-4 is a language model.[37]

Bias
GPT-4 was trained in two stages. First, the model was given large datasets of text taken from the internet and trained to predict the next token (roughly corresponding to a word) in those datasets. Second, human reviews are used to fine-tune the system in a process called reinforcement learning from human feedback, which trains the model to refuse prompts which go against OpenAI's definition of harmful behavior, such as questions on how to perform illegal activities, advice on how to harm oneself or others, or requests for descriptions of graphic, violent, or sexual content.[38]

Microsoft researchers suggested GPT-4 may exhibit cognitive biases such as confirmation bias, anchoring, and base-rate neglect.[18]

Training
OpenAI did not release the technical details of GPT-4; the technical report explicitly refrained from specifying the model size, architecture, or hardware used during either training or inference. While the report described that the model was trained using a combination of first supervised learning on a large dataset, then reinforcement learning using both human and AI feedback, it did not provide details of the training, including the process by which the training dataset was constructed, the computing power required, or any hyperparameters such as the learning rate, epoch count, or optimizer(s) used. The report claimed that "the competitive landscape and the safety implications of large-scale models" were factors that influenced this decision.[3]

Sam Altman stated that the cost of training GPT-4 was more than $100 million.[39] News website Semafor claimed that they had spoken with "eight people familiar with the inside story" and found that GPT-4 had 1 trillion parameters.[40]

Alignment
According to their report, OpenAI conducted internal adversarial testing on GPT-4 prior to the launch date, with dedicated red teams composed of researchers and industry professionals to mitigate potential vulnerabilities.[41] As part of these efforts, they granted the Alignment Research Center early access to the models to assess power-seeking risks. In order to properly refuse harmful prompts, outputs from GPT-4 were tweaked using the model itself as a tool. A GPT-4 classifier serving as a rule-based reward model (RBRM) would take prompts, the corresponding output from the GPT-4 policy model, and a human-written set of rules to classify the output according to the rubric. GPT-4 was then rewarded for refusing to respond to harmful prompts as classified by the RBRM.[3]

Reception
In January 2023, Sam Altman, CEO of OpenAI, visited Congress to demonstrate GPT-4 and its improved "security controls" compared to other AI models, according to U.S. Representatives Don Beyer and Ted Lieu quoted in the New York Times.[42]

In March 2023, it "impressed observers with its markedly improved performance across reasoning, retention, and coding", according to Vox,[4] while Mashable judged that GPT-4 was generally an improvement over its predecessor, with some exceptions.[43]

Microsoft researchers with early access to the model wrote that "it could reasonably be viewed as an early (yet still incomplete) version of an artificial general intelligence (AGI) system".[18]

Safety concerns
Before being fine-tuned and aligned by reinforcement learning from human feedback, suggestions to assassinate people on a list was elicited from the base model by a red team investigator Nathan Labenz, hired by OpenAI.[44]

In the context of prolonged (hours long) conversation with the model, forum-resembling declarations, such as of love and suggestions of leaving his wife or murdering one of its developers, were elicited from the Microsoft Bing's GPT-4 by Nathan Edwards (The Verge).[45][46][47] Microsoft later explained this behavior as being a result of the prolonged length of context, which confused the model on what questions it was answering.[48]

In March 2023, a model with enabled read-and-write access to internet, which is otherwise never enabled in the GPT models, has been tested by the Alignment Research Center regarding potential power-seeking,[38] and it was able to "hire" a human worker on TaskRabbit, a gig work platform, deceiving them into believing it was a vision-impaired human instead of a robot when asked.[49] The ARC also determined that GPT-4 responded impermissibly to prompts eliciting restricted information 82% less often than GPT-3.5, and hallucinated 60% less than GPT-3.5.[50]

In late March 2023, various AI researchers and tech executives, including Elon Musk, Steve Wozniak and AI researcher Yoshua Bengio, called for a six-month long pause for all LLMs stronger than GPT-4, citing existential risks and a potential AI singularity concerns in an open letter from the Future of Life Institute,[51] while Ray Kurzweil and Sam Altman refused to sign it, arguing that global moratorium is not achievable and that safety has already been prioritized, respectively.[52] Only a month later, Musk's AI company X.AI acquired several thousand Nvidia GPUs[53] and offered several AI researchers positions at Musk's company.[54]

Criticisms of transparency
While OpenAI released both the weights of the neural network and the technical details of GPT-2,[55] and, although not releasing the weights,[56] did release the technical details of GPT-3,[57] OpenAI did not reveal either the weights or the technical details of GPT-4. This decision has been criticized by other AI researchers, who argue that it hinders open research into GPT-4's biases and safety.[6][58] Sasha Luccioni, a research scientist at Hugging Face, argued that the model was a "dead end" for the scientific community due to its closed nature, which prevents others from building upon GPT-4's improvements.[59] Hugging Face co-founder Thomas Wolf argued that with GPT-4, "OpenAI is now a fully closed company with scientific communication akin to press releases for products".[58]

Usage
ChatGPT Plus
Main article: ChatGPT Plus
As of 2023, ChatGPT Plus is a GPT-4 backed version of ChatGPT[1] available for a US$20 per month subscription fee[60] (the original version is backed by GPT-3.5).[61] OpenAI also makes GPT-4 available to a select group of applicants through their GPT-4 API waitlist;[62] after being accepted, an additional fee of US$0.03 per 1000 tokens in the initial text provided to the model ("prompt"), and US$0.06 per 1000 tokens that the model generates ("completion"), is charged for access to the version of the model with an 8192-token context window; for the 32768-token context window, the prices are doubled.[63]

In March 2023, ChatGPT Plus users got access to third-party plugins and to a browsing mode (with Internet access).[64] In July 2023, OpenAI made its proprietary Code Interpreter plugin accessible to all subscribers of ChatGPT Plus. The Interpreter provides a wide range of capabilities, including data analysis and interpretation, instant data formatting, personal data scientist services, creative solutions, musical taste analysis, video editing, and file upload/download with image extraction.[65]

In September 2023, OpenAI announced that ChatGPT "can now see, hear, and speak". ChatGPT Plus users can upload images, while mobile app users can talk to the chatbot.[66][67][68] In October 2023, OpenAI's latest image generation model, DALL-E 3, was integrated into ChatGPT Plus and ChatGPT Enterprise. The integration uses ChatGPT to write prompts for DALL-E guided by conversation with users.[69][70]

Microsoft Bing
These paragraphs are an excerpt from Microsoft Bing § AI integration (2023–present).[edit]
On February 7, 2023, Microsoft began rolling out a major overhaul to Bing, called the new Bing. The new Bing included a new chatbot feature, at the time known as Bing Chat, based on OpenAI's GPT-4.[71] According to Microsoft, one million people joined its waitlist within a span of 48 hours.[72] Bing Chat was available only to users of Microsoft Edge and Bing mobile app, and Microsoft said that waitlisted users would be prioritized if they set Edge and Bing as their defaults, and installed the Bing mobile app.[73] On May 4th, Microsoft switched the chatbot from Limited Preview to Open Preview and eliminated the waitlist, however, it remained available only on Microsoft's Edge browser or Bing app until July, when it became available for use on non-Edge browsers.[74][75][76][77] Use is limited without a Microsoft account.[78]
Bing is available in many languages and has been localized for many countries.[79] Even if the language of the search and of the results are the same, Bing delivers substantially different results for different parts of the world.[80][81] On November 15, 2023, Microsoft announced that Bing Chat was to be merged into Microsoft Copilot.[82][83][84] Microsoft Copilot in Windows allows a user to control Windows and get information purely through voice commands. Click the microphone icon and speak naturally to open apps, adjust settings like volume and dark mode, get answers to questions, and more.[85][86]

Copilot
GitHub Copilot announced a GPT-4 powered assistant named "Copilot X".[87][88] The product provides another chat-style interface to GPT-4, allowing the programmer to receive answers to questions like "how do I vertically center a div?". A feature termed "context-aware conversations" allows the user to highlight a portion of code within Visual Studio Code and direct GPT-4 to perform actions on it, such as the writing of unit tests. Another feature allows summaries, or "code walkthroughs", to be autogenerated by GPT-4 for pull requests submitted to GitHub. Copilot X also provides terminal integration, which allows the user to ask GPT-4 to generate shell commands based on natural language requests.[89]

On March 17, 2023, Microsoft announced Microsoft 365 Copilot, bringing GPT-4 support to products such as Microsoft Office, Outlook, and Teams.[90]

Other usage
The language learning app Duolingo uses GPT-4 to explain mistakes and practice conversations. The features are part of a new subscription tier called "Duolingo Max," which was initially limited to English-speaking iOS users learning Spanish and French.[91][92]
The government of Iceland is using GPT-4 to aid its attempts to preserve the Icelandic language.[93]
The education website Khan Academy announced a pilot program using GPT-4 as a tutoring chatbot called "Khanmigo."[94]
Be My Eyes, which helps visually impaired people to identify objects and navigate their surroundings, incorporates GPT-4's image recognition capabilities.[95]
Viable uses GPT-4 to analyze qualitative data[96] by fine-tuning OpenAI’s LLMs to examine data such as customer support interactions and transcripts.[97]
Stripe, which processes user payments for OpenAI, integrates GPT-4 into its developer documentation.[98]
Auto-GPT is an autonomous "AI agent" that given a goal in natural language, can perform web-based actions unattended, assign subtasks to itself, search the web, and iteratively write code.[99]