Act well your part for those who love you, and those who don't will start loving you.
Understanding ChatGPT
發現ChatGPT
就在兩個月前(2023.10.8),像往常一樣,使用「谷哥釣魚」(Google Fishing) ,以關鍵詞: 「Blending和mixing有什麼區別?」於Google進行搜尋。出乎意料,出現的第一個連結竟然是由ChatGPT所提供。
Discovering ChatGPT:
Just two months ago, while engaged in my usual “Google Fishing” – which I am accustomed to using for searching queries on Google – I typed in “What is the difference between blending and mixing”. To my surprise, the first link that appeared was provided by ChatGPT.
什麼是ChatGPT
從那時起,迷上了ChatGPT(3.5版),之後不久即註冊了ChatGPT 4 (要付費)。目前,ChatGPT 4是OpenAI Inc.提供使用者使用的最新版本,為一先進的、創新的,基於預訓練生成型AI的對話轉換器。
ChatGPT是基於GPT(生成式預訓練轉換器)特地為了和使用者進行對話而開發的一種轉換器模型。其版本的演進,包括GPT-1, GPT-2, GPT-3, 2022年11月首次公佈使用的ChatGPT 3.5,及2023年4月上線的ChatGPT 4。
What is ChatGPT:
Since then, I have become addicted to ChatGPT (version 3.5), and not long afterward, I registered for ChatGPT 4. ChatGPT 4 is the latest version, a variant of the GPT model, published by OpenAI Inc. for general users. It is an advanced, innovative conversational transformer based on pre-trained generative AI.
ChatGPT is specifically developed for conversing with users based on the GPT (Generative Pre-trained Transformer) model. It has evolved through various iterations, including GPT-1, GPT-2, GPT-3, and ChatGPT 3.5, which was first announced and made available in December 2022, followed by the launch of ChatGPT 4 in April 2023.
GPT模型運作(GPT Model Operations)
如前所述,GPT模型是ChatGPT架構的主軸。GPT模型由多重層面(multiple layers)組成:其上為輸入層(input layers),中間是隱藏層(於電腦內部運作,人們是看不到的),其下為輸出層(output layers)。GPT模型在這多層架構中,執行循序的運作,由理解輸入數據(understand input data ),至生成輸出(generate outputs)。
GPT Model Operation:
As previously mentioned, the GPT model is the backbone of the ChatGPT architecture. It is constructed with multiple layers: input layers at the top, hidden layers in the middle, and output layers at the bottom. Within these layers, the GPT model performs sequential operations to understand input data and generate outputs.
預訓練(Pre-training)
在ChatGPT發布使用之前,必須經過廣泛的預訓練 — 使用來自網站、書籍以及其他各式各樣的文本資料數據庫。在這一階段,輸入的數據(如句子)被分解成很小的單位[一般為字(words)、字首、字根(sub-words)、字元(characters)],稱為「標記」(tokens),接著編碼成以向量(vectors)表示,稱為嵌入(embeddings)。
模型採用深度學習演算法(deep learning algorithms),模型中一層接著一層,使這些表示輸入數據(例如英文句子)的標記愈來愈精細(refined)。這些過程從最基本的語法(syntax)、文法(grammar)等分析開始,逐漸進展到更複雜的理解層面(layers),如上下文(context)、語義(semantics)和抽象的概念。這種精細化使模型能夠生成針對輸入數據(input data)的細微差別量身定制而輸出(outputs)。
當模型處理這些數據時,會在其多個層面(layers in the model)進行大量計算,每一層的輸出進一步整合並精煉輸入數據。這些層面中的神經元(neurons)會處理並更新標記嵌入,最後通過前饋網絡(feedforward networks)傳遞,在輸出層(output layers)生成最終輸出(generating outputs)。
Pre-training:
Before ChatGPT is deployed for practical use, it undergoes extensive pre-training using data from various sources such as websites, books, and other diverse textual materials. During this phase, input data, like sentences, are broken down into smaller units (words, sub-words, or characters) called ‘tokens’, which are then encoded as vector representations known as embeddings.
The model employs deep learning algorithms, particularly focusing on layers within the Transformer architecture. This process involves analyzing basic elements of language like syntax and grammar, and progressively advances to more complex layers of understanding, including context, semantics, and abstract concepts. This refinement leads to the ability of the model to generate nuanced outputs, tailored to the nuances of the input data.
As the model processes this data, a substantial number of calculations are performed across its multiple layers, with each layer’s output integrating and refining the input data further. Neurons in these layers process and update the token embeddings, which are then passed through feedforward networks, culminating in the generation of final outputs in the output layers.
實際使用ChatGPT
經過預訓練階段後,ChatGPT即以某既定版本發布,例如ChatGPT 4。使用者可以藉由輸入提示(prompts)與該版本互動,用於查詢信息、進行對話等多種用途。當使用者輸入文本序列(input sequence)(如句子)時,ChatGPT會使用其於預訓練期間採用的方法處理此輸入,包括理解輸入數據(understanding input data)和利用模型廣泛的預訓練知識庫,以生成輸出(generating outputs)。
與預訓練階段不同的是,在預訓練時,模型經由學習調整相關參數;於實際使用時,ChatGPT則應用其已預訓練完成的知識,根據使用者的特定輸入,生成與上下文相關的回應,而不會再對其已建立的模型(如參數、相關權重)進行進一步的修改。
ChatGPT的預訓練階段為學習和提升其語言處理能力;實際使用階段時,則應用這些學到的知識與使用者進行互動。
ChatGPT in Practices:
Following its pre-training phase, ChatGPT is released in specific versions, like ChatGPT 4. Users can interact with these versions for a variety of purposes, including querying information, engaging in dialogue, and more, by providing input prompts. When a user inputs a sequence of text, such as sentences, ChatGPT processes this input using methods similar to those employed during its pre-training. This includes understanding the input data and leveraging the model’s extensive pre-trained knowledge base to generate outputs.
However, unlike in the pre-training phase, where the model actively learns and adjusts its parameters, in practical use, ChatGPT applies its fixed pre-trained knowledge to generate contextually relevant responses based on the user’s specific input, without further modification to its underlying model (for instance, parameters and related weights).
In the pre-training phase, ChatGPT learns and refines its language processing capabilities, while in the practical use, it applies this learned knowledge to interact with users.
深度學習演算法(Deep Learning Algorithms)
和早期主要用於翻譯的轉換器模型,分別具有編碼器(encoders)和解碼器(decoders)組件不同的是,ChatGPT中的GPT模型運作是一種僅有解碼器的轉換器(decoding-only transformers)。此意謂GPT model的解碼過程是包括編碼,由理解輸入文字及至生成數據的過程是連貫的,而沒有分別的編碼器和解碼器的運作階段。也因為ChatGPT所使用的GPT模型,其運作方式為僅解碼(decoding-only),比其他轉換器模型能生成更連貫(coherent)、更符合上下文(contextual)的文本輸出。
此外,與其他學習演算法(例如強化學習)可能在實際使用中繼續學習的模式不同,GPT模型在發布後就不再進行學習。這是為了確保個人使用者的隱私和模型安全。不過,GPT模型會擁有臨時記憶,在一個對話或會話(conversation or session)結束前,會理解、記得上下文並生成輸出。”
The Deep Learning Algorithms:
Unlike earlier transformer models primarily used for translation, which featured distinct encoder and decoder components, the GPT model in ChatGPT operates as a decoding-only transformer. This means it understands and generates data by sequentially decoding texts, including encoding information, without separate encoder and decoder stages. The decoding-only approach, as seen in the GPT model used by ChatGPT, enables it to generate more coherent and contextually relevant text outputs than other transformer models.
Furthermore, unlike other learning algorithms, such as reinforcement learning, which may continue to learn during their practical use, the GPT model does not learn after its release. This is to ensure individual user privacy and model security. However, the model does possess a temporary memory that aids in understanding context and generating outputs before a conversation or session ends.
應用ChatGPT於英語的教與學
探討一個概念(concept)、理論(theory)或架構(framework)時,徹底了解「什麼」、「為什麼」和「如何」是至關重要的,尤其是對於如此創新的ChatGPT,基於預訓練的生成式AI轉換器。本文即描述發現ChatGPT的過程,什麼是ChatGPT,以及ChatGPT的基本運作方式。
此外,本文的目的是希望未來能運用ChatGPT於英語的教與學,由以前「谷哥釣魚」轉變為使用ChatGPT此革新的方法。然而,重要的是,輸入提示(input prompts)的品質大大影響輸出的精確性和準確性。沒有充分的斟酌輸入,是不可能獲得期望的結果的。
Using ChatGPT in English Teaching and Learning:
Fully understanding the “what”, “why”, and “how” is crucial when approaching a concept, theory, or framework, particularly for an innovative tool like ChatGPT, which is a transformer based on pre-trained generative AI. This essay aims to describe how I discovered ChatGPT, what it is, and the basics of its operation.
Furthermore, the objective of this essay is to explore the use of ChatGPT in teaching and learning English for the future, proposing a revolutionary approach that shifts from traditional “Google fishing” to employing “ChatGPT”. However, it’s important to remember that the quality of the input prompts significantly influences the precision and accuracy of the responses. Without careful preparation of inputs, achieving the desired outcomes is unlikely.
省思
切記:天下沒有不勞而獲的事情。千萬不能認為只要輸入提示即可獲得答案,甚至認為ChatGPT可以為我們做任何事。ChatGPT確實是一個強大的工具,能夠協助我們解決很多問題。然而,尤其對於學生,為了有效運用ChatGPT,必須正確地投入與持續地努力,以有效運用ChatGPT,而不要過度依賴。
Final Thoughts:
We should keep in mind the adage “no pains, no gains.” We cannot adopt the attitude that ChatGPT will do everything for us simply because we input prompts. ChatGPT is indeed a powerful tool that can help us solve many problems. Particularly for students, its effective use requires appropriate engagement and consistent effort. This approach will ensure that we benefit from its capabilities without becoming overly dependent on it.