Disclaimer: since OpenAI hasn't provided all the details, some parts of the diagram may be inaccurate. @sama, we would love to hear your feedback.
We attempted to explain how it works in the diagram below. The process can be broken down into two parts.
/2 1. Training. To train a ChatGPT model, there are two stages:
- Pre-training: In this stage, we train a GPT model (decoder-only transformer) on a large chunk of internet data.
/3 The objective is to train a model that can predict future words given a sentence in a way that is grammatically correct and semantically meaningful.
After the pre-training stage, the model can complete given sentences, but it is not capable of responding to questions.
/4 - Fine-tuning: This stage is a 3-step process that turns the pre-trained model into a question-answering ChatGPT model:
/5 1). Collect training data that comprise (questions and answers), and fine-tune the pre-trained model on this data. The model takes a question as input and learns to generate an answer similar to the training data.
/6
2). Collect more data that comprise (question, several answers) and train a reward model to rank these answers from most relevant to least relevant.
3). Use reinforcement learning (PPO optimization) to fine-tune the model, so the model's answers are more accurate.
/7 2. Answer a prompt
🔹Step 1: The user enters the full question.
🔹Step 2: The question is sent to a content moderation component. This component ensures that the question does not violate safety guidelines and filters inappropriate questions.
/8 🔹Steps 3-4: If the input passes content moderation, it is sent to the chatGPT model. If the input doesn’t pass content moderation, it goes straight to template response generation.
/9 🔹Step 5-6: Once the model generates the response, it is sent to a content moderation component again. This ensures the generated response is safe, harmless, unbiased, etc.
/10 🔹Step 7: If the input passes content moderation, it is shown to the user. If the input doesn’t pass content moderation, it goes to template response generation and shows a template answer to the user.
/11 Subscribe to our weekly free newsletter to learn something new every week: bit.ly/3FEGliw
Let’s look at this question 𝐢𝐧 𝐚 𝐥𝐨𝐧𝐠𝐞𝐫 𝐭𝐢𝐦𝐞 𝐫𝐚𝐧𝐠𝐞 to see what the cloud brings us.
/2 🔹 When a company or a business line initially starts, product-market fit is key. The cloud enables quick setup to run the system with minimal necessary hardware. The cost is also transparent.
/3 For example, if we run the databases on-premise, we need to take care of hardware setup, operating system installation, DBMS maintenance, etc. But if we use Amazon RDS, we need to take care of optimization.
This saves us the trouble to hire Linux admins and DB admins
/1 What is Buy Now, Pay Later (BNPL), and how does it work? What is the revenue model for BNPL providers?
/2 The growth of BNPL has been dramatic in recent years. The BNPL provider represents the primary interface between the merchants and the customers for both eCommerce and POS (Point of Sale).
/3 The diagram below shows how the process works:
Step 0. Bob registers with AfterPay. An approved credit/debit card is linked to this account.
Step 1. The "Buy Now, Pay Later" payment option is chosen by Bob when he wants to purchase a $100 product.
/1 8 Data Structures That Power Your Databases. Which one should we pick?
/2 The answer will vary depending on your use case. Data can be indexed in memory or on disk. Similarly, data formats vary, such as numbers, strings, geographic coordinates, etc. The system might be write-heavy or read-heavy.
/3 All of these factors affect your choice of database index format.
The following are some of the most popular data structures used for indexing data:
🔹Skiplist: a common in-memory index type. Used in Redis
A dispute happens when a cardholder disagrees with a merchant’s charge. A chargeback is a process of reversing the charge. Sometimes, the two terms are used interchangeably.
/2 A dispute is 𝐞𝐱𝐩𝐞𝐧𝐬𝐢𝐯𝐞: for every dollar in disputed transactions, an additional $1.50 is spent on fees and expenses.
The diagram below shows why. 👇
/3 🔹 Steps 1-3: The cardholder Bob raises a dispute with the card issuer. Details are reviewed by the issuing bank. In cases of legitimate disputes, the issuing bank submits a chargeback request to the card network.
The diagram below shows several common 𝐝𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭 𝐬𝐭𝐫𝐚𝐭𝐞𝐠𝐢𝐞𝐬.
2/ 𝐁𝐢𝐠 𝐁𝐚𝐧𝐠 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
Big Bang Deployment is quite straightforward, where we roll out a new version in one go with service downtime. We roll back to the previous version if the deployment fails.
💡 No downtime ❌
💡 Targeted users ❌
3/ 𝐑𝐨𝐥𝐥𝐢𝐧𝐠 𝐃𝐞𝐩𝐥𝐨𝐲𝐦𝐞𝐧𝐭
Rolling Deployment applies phased deployment compared with big bang deployment. The whole plant is upgraded one by one over a period of time.