Back to Blog
MediumImported

[快速帶你看] phi-2: 微軟訓練的開源小型語言模型

💡 本文同步發表於 Medium:原文連結

https://medium.com/@simon3458/quick-demo-2-phi-2-intro-49208a8db193

點擊查看連結詳情...

https://medium.com/@simon3458/quick-demo-2-phi-2-intro-49208a8db193

[快速帶你看] phi-2: 微軟訓練的開源小型語言模型

看完文章後歡迎按鼓勵,訂閱,並分享給所有想知道此類知識的所有人!

[快速帶你看] phi-2: 微軟訓練的開源小型語言模型

I. phi-2 模型介紹

模型名稱

Microsoft/phi-2

License

近期將 License 改成 MIT ,是一個開源模型。

參數量

2.7B
(其他模型參考數值:Llama 2: 最小 7B、Gemini Nano 2: 3.2B)

過往歷史

  1. Ph1–1 模型:微軟於 2023 年 6 月份發表,以 Transformer 來進行建置,目的為了轉寫 Python 程式碼而轉寫的模型,當時僅使用 1.3B 參數量進行建置。
  2. Phi-1.5 模型:微軟於 2023 年 9 月份發表,擴展至常識推理及語言理解,其效能可媲美5倍的模型。
  3. Phi-2 模型:微軟於 2023 年 12 月份發表,探索機制可解釋性,安全性的改善,並且針對各種任務進行微調實驗。其訓練素材包含科學、日常活動與心理學等,再加上篩選過且具有教育價值的高品質網路內容,並將參數量從1.3B擴大至2.7B。

Phi-2 (2.7B) 和 Phi-1.5 (1.3B) 模型之間的比較。除了 BBH 和 MMLU 分別使用 3-shot CoT 和 5-shot 之外,所有任務均以 0-shot 進行評估。

模型表現

  • 平均而言,Phi-2 優於 Mistral-7B,後者優於 Llama-2 模型(7B、13B 和 70B)。
  • Phi-2 的性能可與 Google Gemini Nano 2 相媲美,但是 Phi-2 參數較少。

與目前開源大型語言模型相比,比較模型表現。

Phi-2 和 Gemini Nano 2 模型在 Gemini 報告的基準上的比較。

相關資源

  • Phi-2 官方介紹:

Phi-2: The surprising power of small language models

Phi-2 is now accessible on the Azure model catalog. Its compact size and new innovations in model scaling and training data curation make it ideal for exploration around mechanistic interpretability, safety improvements, and fine-tuning experimentation on a variety of tasks.

https://www.microsoft.com/en-us/research/blog/phi-2-the-surprising-power-of-small-language-models/
  • HuggingFace: microsoft/phi-2

microsoft/phi-2 · Hugging Face

Text Generation model with 3B parameters. Download, explore files and run it on Hugging Face.

https://huggingface.co/microsoft/phi-2
  • HuggingFace: TheBloke/phi-2-GGUF

TheBloke/phi-2-GGUF · Hugging Face

Text Generation model with 3B parameters. Download, explore files and run it on Hugging Face.

https://huggingface.co/TheBloke/phi-2-GGUF

II. 我的觀點

Phi-2 這類型的小模型,可以用很小的參數,就能夠得到好的表現,其實這樣的模型,會在 2024 年啟動相關大型語言模型專案時,可以考慮的模型之一,畢竟 GPU 的成本昂貴,能夠放在小型裝置來進行處理,其實對於成本控制和專案製作是非常重要的事情。

至於這模型有一個很大的限制,就是這模型理解中文能力極差,這在台灣的專案上仍有非常大的限制,但如果這個模型是負責有關內部專案,不需對外進行溝通的狀況下,這樣的模型,可以考慮放在公司的小型專案上,來幫助團隊可以很快的導入模型。

I am Simon

大家好,我是 Simon 劉育維,目前在 InfuseAI 擔任人工智慧領域的客戶成功工程師,幫助企業規劃並實踐人工智慧相關技術。如果這篇文章對您有幫助,請在 Medium 上按一下鼓勵並追蹤我的個人帳號,這樣您就可以隨時閱讀我所撰寫的文章。歡迎在我的 Linkedin 上留言提供意見,並與我一起討論有關人工智慧的主題,期待能夠對大家有所幫助!

我的 Linkedin:<https://www.linkedin.com/in/simonliuyuwei/>

We are InfuseAI

InfuseAI provides LLM, MLOps, and data tools:

  1. PrimeHub— Our end-to-end MLOps platform is the entire machine learning lifecycle in one platform.
  2. PrimeLM — Our enterprise platform solution enables the company to implement the LLM Project more rapidly.
  3. MLOps and LLM solution and consulting — Let the user know how to use MLOps and/or LLM Models to do the machine learning pipeline.
  4. PipeRider— The data quality toolkit for data professionals.

Feel free to contact us for assistance in implementing AI models!
Email: [email protected]

這篇文章有幫上忙嗎?

留言

載入留言中…