top of page

Analysis of Comprehending ChatGPT Algorithm

IMG Credit: dienmaycholon
IMG Credit: dienmaycholon

Modern society is an era dominated by social media like Instagram, Netflix, and Facebook, and its integration into our daily lives has reached unprecedented levels. The ascent of these platforms to millions of users within remarkably short timeframes reflects society's reliance on digital communication channels. While Netflix took 3.5 years to reach a million users, Instagram accomplished the feat in only 2.5 months. However, amidst this digital revolution, there is one technology that stands out incomparably - ChatGPT. It merely took 5 days to reach 1 million users. 



What is ChatGPT?

ChatGPT (Chat Generative Pre-trained Transformer) is a language model that uses NLP (Natural Language Processing) technology to continue conversations, predicting the next word of an input sentence. It was generated by learning a large-scale dataset, which allows conversations to be naturally continued.



Mechanism of ChatGPT

  1. Pre-training

IMG Credit: GPTech
IMG Credit: GPTech

Chat GPT constructs Architecture Intelligence through a pre-learning stage. In this stage, the model is pre-trained using vast amounts of text data. This text data may include various documents, web pages, news articles, etc. collected from the Internet. The trained model acquires natural language comprehension skills by learning the structure and grammar of languages, and relationships between words.


  1. Fine Tuning

IMG Credit: TheConversation
IMG Credit: TheConversation

The pre-trained models are able to perform well on typical natural language processing tasks, but they have to be optimized for specific domains or tasks. To this end, Chat GPT proceeds with a fine-tuning step. Fine-tuning is a process that uses a specific dataset to further train the model to produce a more appropriate response for that domain.


  1. Tokenization

IMG Credit: Wisdom ML
IMG Credit: Wisdom ML

Chat GPT needs a step of tokenization when processing text, which refers to the process of separating input sentences (e.g. a user's question) into smaller units, tokens. Tokens usually consist of words, punctuation, numbers, and the like, and we utilize these token sequences as input to the model. Tokenization is an important step in transforming sentences into a form that the model can understand easily.


  1. LLM (Large Language Model) Learning

IMG Credit: Language Unlimited
IMG Credit: Language Unlimited

After tokenization, the preprocessed data is used in the learning process of LLM (Large Language Model). LLMs are trained with vast amounts of data to predict the words that follow in sentences accurately. LLMs use a Transformer structure, a form of artificial neural network, to understand the meaning of words according to context. This is done through a method called 'machine learning'. Chat GPT uses an artificial neural network structure called 'Transformer' to understand the context of sentences. Increment in collected word data has been shown to increase the performance of language models. This feature allows users not only to write multi-page content but also long-range paragraphs.


  1. RLHF (Reinforcement Learning from Human Feedback) Applying

IMG Credit: EDSurge
IMG Credit: EDSurge

Yet,, LLMs are limited in that they do not always understand exactly what humans want. RLHF is one of the ways to improve model performance, and it continuously improves the model through user feedback. RLHF initially learns using examples provided by humans, but it later starts learning using the model's own predictions. This allows the model to learn the user's feedback to provide more accurate and useful answers.


  1. Text Creating 

When learning is completed based on LLM and RLHF, sentences can be generated. Given an input (e.g. a user's question), the model generates the most likely answer based on a previously learned pattern. This generation is a process of converting an input into a number, processing via a neural network, and generating text as an output. At this moment, a sentence is generated by repetition of predicting the next word. Prediction is performed through the trained model, and sentences are generated by selecting the most appropriate and accurate word, according to the probability of selecting each word.

In conclusion, as ChatGPT continues to evolve, its accuracy and potential for the future are promising. While its current capabilities are impressive, ongoing research and development efforts aim to further enhance its accuracy and expand its utility in various domains. As we look ahead, ChatGPT holds the promise of becoming an indispensable tool for communication, education, customer service, and beyond, revolutionizing the way we interact with AI systems and each other.



References

Comentarios


bottom of page