放心,GPT-3不會“殺死”編程

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"italic"},{"type":"strong"}],"text":"本文由Alberto Romero發表在towardsdatascience.com,經原作者授權由InfoQ中文站翻譯並分享"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GPT-3和任何人工智能都不會讓編程”凋亡“,所以程序員不需要感到焦慮。"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"OpenAI 於 2020 年 7 月發佈了GPT-3的 beta API。此後不久,開發人員開始試用該系統並將其“炒作”得熱火朝天,由此人們開始宣稱GPT-3具有諸多強大的功能。該系統被稱爲是“有情感”的,能夠“推理和理解”,甚至可以稱作“通用智能”(general intelligence)。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/medium.com\/u\/16c852692647?source=post_page-----f4cabd3a536b--------------------------------","title":"","type":null},"content":[{"type":"text","text":"Frederik Bussler"}]},{"type":"text","text":"寫了一篇在 "},{"type":"text","marks":[{"type":"italic"}],"text":"Towards Data Science"},{"type":"text","text":" 上風靡一時的文章,他在討論中提出了一個重要問題:GPT-3 能否讓我們所知的編程技術凋亡?近幾年來,我們已經看到了不少邁向自動化編程或至少減少人工參與的編程技術的趨勢。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Bussler提到了 No-code 和 AutoML 是扼殺未來編程崗位的力量。No-code是一類設計工具(例如 WordPress),它讓用戶無需編程就能構建複雜的應用程序。AutoML 是一種基於人工智能的端到端解決方案,用於解決機器學習問題。這兩種方法都能讓非程序員使用之前他們無力掌握的技術。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GPT-3遵循了同樣的道路。它能根據英文指令生成代碼,這是非程序員的終極夢想。我們有理由關注新一代人工智能,但更不應該去驚慌失措。讓我們看看GPT-3可以做什麼,以及爲什麼我們仍然可以和AI程序員做朋友。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"GPT-3的編程能力"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GPT-3最令人驚訝的用例之一是它能夠按照自然語言提示進行編程(提示是我們輸入系統的文本塊)。Sharif Shameen 創建了 "},{"type":"link","attrs":{"href":"https:\/\/debuild.co","title":"","type":null},"content":[{"type":"text","text":"debuild.co"}]},{"type":"text","text":",這是一個基於GPT-3的代碼生成器。他在"},{"type":"link","attrs":{"href":"https:\/\/twitter.com\/sharifshameem\/status\/1282676454690451457","title":"","type":null},"content":[{"type":"text","text":"這個例子"}]},{"type":"text","text":"中展示了該系統如何能夠從一組簡單的英語指令中構建一個簡易的HTML\/CSS\/JSX程序。Jordan Singer創建了"},{"type":"link","attrs":{"href":"https:\/\/twitter.com\/jsngr\/status\/1284511080715362304","title":"","type":null},"content":[{"type":"text","text":"Designer"}]},{"type":"text","text":",一個可以替用戶進行設計的Figma插件。Amjad Masad創建了"},{"type":"link","attrs":{"href":"https:\/\/twitter.com\/amasad\/status\/1285789362647478272","title":"","type":null},"content":[{"type":"text","text":"Replit"}]},{"type":"text","text":",這是一個可以用英語解釋代碼甚至可以告訴使用者如何改進代碼的應用程序。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GPT-3是如何根據自然語言的輸入編寫代碼的?原因在於它的多任務元學習能力。它可以在僅僅看過幾個例子後,學習完成它沒有被訓練過的文本任務。Sharif Shameen和其公司調整了GPT-3來學習這些任務。元學習是一種令人驚豔的能力,但我們往往高估了人工智能獲得這些人類具備的技能的能力,GPT-3 也不例外。它可以編程,但不能寫出所有類型的代碼。以下是三個重要的限制:"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"上下文窗口過小"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GPT-3的記憶很短,它只能記住過去很小的一個文本窗口。你可以給它展示幾百個字,但也僅此而已。你可以提示它學習編程,但你不能提示它學習寫詩。而且你也不可能讓它編寫一些行數很多的大程序。儘管如此,GPT-3在它的上下文窗口內的能力還是很令人驚豔的。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"缺少責任感"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GPT-3可以做很多事,但它不能評估它的答案是對是錯——而它也不在乎對錯。如果你在研究一個你也不知道答案的問題,有時使用GPT-3就和瞎猜一樣。因此,OpenAI建議不要將GPT-3用於“高風險類別“的系統。GPT-3並不值得信賴。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"對不準確的提示同樣敏感"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"GPT-3的學習能力和我們給出提示的能力成正比。技術博主Gwern Branwen證明了良好提示的重要性,他也反對了GPT-3的能力不受限於採樣的這一觀點。(每次我們提示GPT-3並獲得結果,我們都在創建一個樣本。)如果我們不知道如何和GPT-3交談,它就不會展示真正的知識,並且會犯錯誤。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“採樣可以證明知識的存在,但不能證明不存在。如果提示寫得不好,GPT-3可能會“失敗”。[...]問題不在於一個給定的提示是否有效,而在於是否所有提示都有效。“—— Gwern Branwen"}]}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"GPT-3的不確定性"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當我們提示 GPT-3 創建代碼時,我們其實正在編寫"},{"type":"link","attrs":{"href":"https:\/\/towardsdatascience.com\/software-3-0-how-prompting-will-change-the-rules-of-the-game-a982fbfe1e0","title":"","type":null},"content":[{"type":"text","text":"軟件3.0"}]},{"type":"text","text":"。Gwern說,“提示”應該被理解爲一種不同於傳統的編碼或神經網絡的新的編程範式。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"例如,當我們用 Python 編寫程序時,我們使用的是一種形式語言。有很多方法可以實現相同的解決方案,但每種方法都必須嚴格遵循該語言的語法規則。這其中沒有不確定性。你編寫一個程序,計算機以特定的方式運行,沒有任何模糊的解釋。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"提示 GPT-3 編寫代碼是完全不同的。英語——或者任何其他口語——不是一種形式語言;它是一種自然語言。自然語言不是設計出來的。它們與我們一起進化,並且充滿了歧義。大多數時候,實際意義是必須通過上下文的信息一起表達的。書面的自然語言失去了部分意義,因此可以用不同的方式來解釋。這會產生不確定性。而 GPT-3 模糊的內部工作原理所帶來的不確定性又和這種自然語言的不確定性疊加在了一起。我們無法訪問黑匣子,更不用說理解它了。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"所以,當我們將一個英語句子輸入到 GPT-3,它會輸出一些東西,這其中存在着一連串的不確定性,可能會恰好導致我們想要的和我們得到的之間出現災難性的差異。從這個意義上說,提示 GPT-3 和編程不一樣。它可以在某些情況下使用,但短期內不可能取代所有的程序。這是因爲這兩種方法的性質決定了它們應該用於解決不同的問題。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"人工智能不會完全“殺死”編程"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在上文中,我已經反駁了一些關於 GPT-3 對編程的威脅的觀點。在下文中,我將話題擴展到關於 AI 的論點。有 3 個充分的理由可以說明爲什麼程序員不需要害怕人工智能:"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"有些任務更適合其他範式"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當我說提示是一種新的編程範式(軟件 3.0)時,其中隱含了其他兩個範式:傳統編程(軟件 1.0)和神經網絡(軟件 2.0)。幾年前,Karpathy 發表了一篇傳播度非常廣的"},{"type":"link","attrs":{"href":"%E3%80%81https:\/\/karpathy.medium.com\/software-2-0-a64152b37c35","title":"","type":null},"content":[{"type":"text","text":"文章"}]},{"type":"text","text":",該文章捍衛了神經網絡應該被構​​建爲一種新形式的軟件的觀點,並且他認爲神經網絡比傳統編程更適用於某些任務。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在某種程度上我同意他的觀點。事實證明,神經網絡在處理傳統編程一直未能完成的一些任務方面非常成功。特別是,神經網絡非常適合視覺和語言。很明顯,對於某些問題,直接在程序中編寫出我們想要的行爲更容易(軟件 1.0),但對於其他問題,收集數據作爲我們想要重現的行爲的示例(軟件 2.0)是首選解決方案。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"軟件 3.0 也一樣。提示使得用戶能夠處理超出以前軟件範式能力的任務,但它不適用於其他情況。構建操作系統、辦公軟件包、數據庫或計算數字階乘的程序,仍將使用傳統編碼來完成。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"其他範式成本更低"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"深度學習的成本通常令人望而卻步。許多公司仍然使用非神經網絡機器學習的解決方案,因爲數據操作、清理和標記比項目的其餘部分的費用更高。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"即使更新的技術和技能會變得更快或更精確,經濟成本也始終會是一個現實世界的限制。訓練 GPT-3 花費了 OpenAI 大約 1200 萬美元。有多少公司能負擔得起?你會花幾百萬美元來創建一個爲你編寫 JSX 的人工智能嗎?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"即使 API 可供開發人員免費使用,也需要考慮另一個成本,那就是對地球環境的破壞。GPT-3 是如此之複雜,以至於訓練它產生的碳足跡與“駕駛汽車前往月球並返回”大致相同。有時更大更復雜的並不是更好的。"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"今天的人工智能有它的限制"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"神經網絡每年都在變得越來越聰明,但即使是最聰明、最強大的神經網絡也有無法處理的任務。 GPT-3 在解釋書面輸入時的不確定性是不可避免的。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"無實體的人工智能,也是迄今爲止幾乎所有的人工智能,無法獲得超越文字的含義。我們可以使用上下文來解釋我們周圍的世界,因爲我們和周圍的世界有互動。我們生活在這個世界上,這就是我們能理解語言的原因。我們可以將形式與意義聯繫起來;我們可以將文字與它們傳達的主觀體驗聯繫起來。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"無論神經網絡多麼強大,它都無法像人類那樣掌握語言。正如 Ragnar Fjelland 教授所說,“只要計算機不長大,不屬於一種文化,不活躍於世界,它們就永遠不會獲得類似人類的智能。”而這種假設不會很快發生。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"最後展望"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"不可否認,像 GPT-3 這樣的神經網絡是一個重要的里程碑,它將爲下一步邁向通用人工智能(AGI)敞開大門。隨着每次的新升級,他們將能夠處理更復雜的任務。例如,多模態人工智能將會成爲新常態(MUM 和Wu Dao 2.0 是最新的例子)。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"然而,對於某些任務,傳統的方法和技術是更好的選擇。人工智能將會蠶食掉大量以前屬於傳統編碼領域的存在問題的空間,這種情況在每項新技術誕生後都會發生。然而,新技術讓舊技術在一切領域都過時的情況是很少發生的。同時提高效率、減少成本和增加可用性不是必然,是一種例外。人工智能將觸及每個行業,但它也不能違反上述規律。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"italic"},{"type":"strong"}],"text":"原文鏈接:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/towardsdatascience.com\/gpt-3-or-any-ai-wont-kill-coding-f4cabd3a536b","title":"","type":null},"content":[{"type":"text","text":"https:\/\/towardsdatascience.com\/gpt-3-or-any-ai-wont-kill-coding-f4cabd3a536b"}]}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章