{"id":6358,"date":"2024-04-26T20:00:43","date_gmt":"2024-04-26T12:00:43","guid":{"rendered":"https:\/\/aict.nkust.edu.tw\/digitrans\/?p=6358"},"modified":"2024-12-13T21:02:35","modified_gmt":"2024-12-13T13:02:35","slug":"%e5%ad%b8%e7%bf%92%e7%ad%86%e8%a8%98%ef%bd%9cphi-3-mini-lm-studio%ef%bc%8c%e6%a8%a1%e5%9e%8b%e6%9b%b4%e5%b0%8f%e4%bd%86%e6%98%af%e6%95%88%e6%9e%9c%e4%b8%80%e6%a8%a3%e5%a5%bd","status":"publish","type":"post","link":"https:\/\/aict.nkust.edu.tw\/digitrans\/?p=6358","title":{"rendered":"\u5b78\u7fd2\u7b46\u8a18\uff5cPhi-3-mini + LM Studio\uff0c\u6a21\u578b\u66f4\u5c0f\u4f46\u662f\u6548\u679c\u4e00\u6a23\u597d"},"content":{"rendered":"\n<p>2024-04-26 | Eric Chang<\/p>\n\n\n\n<p id=\"1401\">\u5fae\u8edf\u6700\u8fd1\u767c\u8868\u4e86Microsoft Phi-3-mini\uff0c\u9019\u662f\u500b\u958b\u6e90\u7684 LLM\u6a21\u578b\uff0c\u4e5f\u662f\u500b\u6eff\u512a\u79c0\u7684\u5c0f\u578b\u8a9e\u8a00\u6a21\u578b\uff08SLM\uff09\uff0cPhi-3-mini 3.8B\u7684\u6a21\u578b\u5df2\u7d93\u5728 Azure AI Studio\u3001Hugging Face \u548c Ollama \u4e0a\u63d0\u4f9b\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/miro.medium.com\/v2\/resize%3Afit%3A1050\/1%2A2IycU8sRmoZV1xqbr-OTdw.png?w=640&#038;ssl=1\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p id=\"62d9\">\u5728\u8ac7\u6280\u8853\u6307\u6a19\u4e4b\u524d\uff0c\u6211\u5c0d\u65bcPhi-3-mini\u5728\u5546\u696d\u7684\u5b9a\u4f4d\u6703\u6bd4\u8f03\u5728\u610f\uff0c\u56e0\u70ba\u4ed6\u5c08\u6ce8\u5728<strong>\u5c0f\u6a21\u578b\u4e0a\u53bb\u63d0\u9ad8\u8a9e\u8a00\u6a21\u578b\u7684\u8868\u73fe<\/strong>\u3002\u5f9e\u8ad6\u6587\u7684\u6a19\u984c\u5c31\u53ef\u4ee5\u770b\u5230\uff0c\u4ed6\u5011\u662f\u66f4\u52a0\u9396\u5b9a\u5728\u884c\u52d5\u88dd\u7f6e\u7684\u61c9\u7528\u6027<strong>\uff08Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phone\uff09<\/strong><\/p>\n\n\n\n<p>https:\/\/drive.google.com\/viewerng\/viewer?url=https%3A\/\/arxiv.org\/pdf\/2404.14219&#038;embedded=true<\/p>\n\n\n\n<p id=\"16da\">\u5728\u8ad6\u6587\u7576\u4e2d\uff0c\u5fae\u8edf\u7684\u5718\u968a\u5c55\u793a\u4e86\u5728iPhone\u4e0a\u9762\u904b\u884c\u7684\u901f\u5ea6\uff0c\u5728A16\u6676\u7247\u4e0a\u9762\uff0cq4\u7684\u6a21\u578b\u53ef\u4ee5\u5728\u6bcf\u79d2\u751f\u621012 tokens\uff0c\u53ea\u6709\u5360\u7528\u7d041.8GB\u7684\u5167\u5b58\uff0c\u5c0d\u65bc\u79fb\u52d5\u88dd\u7f6e\u4f86\u8aaa\u9019\u662f\u4e00\u500b\u9084\u4e0d\u932f\u7684\u901f\u5ea6\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/miro.medium.com\/v2\/resize%3Afit%3A1050\/1%2AA3qA_UBJyrPq3WIKUs96RA.png?w=640&#038;ssl=1\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p id=\"78df\"><strong>Phi-3-mini\u6a21\u578b\u5982\u4f55\u8a13\u7df4<\/strong><\/p>\n\n\n\n<p id=\"451e\">Phi-3-mini \u6709\u5169\u7a2econtext-length\u2014 4K \u548c 128K tokens\uff0c\u652f\u6301\u6700\u591a 128K\u9019\u500b\u7248\u672c\u7b97\u662f\u6eff\u8b93\u6211\u5370\u8c61\u6df1\u523b\u7684\uff0c\u5c0f\u6a21\u578b\u4f46\u53ef\u4ee5\u6eff\u8db3\u591a\u6578\u7684input\u5834\u666f\u3002<\/p>\n\n\n\n<p id=\"df80\">Phi-3 Mini-128K-Instruct \u6709 3.8B\u53c3\u6578\uff0c\u9019\u6b21\u7528\u4f86\u8a13\u7df4\u7684GPU\u70ba512 H100\u201380G\uff0c\u8a13\u7df4\u6642\u9593\u9054\u5230\u4e867\u5929\uff0c\u800c\u8a13\u7df4\u6578\u64da\u5247\u662f\u6e96\u5099\u4e863.3T tokens\uff0c\u6211\u7528phi-3-mini\u5e6b\u6211\u7ffb\u8b6f\u4e86\u4e00\u4e0b\u8a13\u7df4\u8cc7\u6599\u7684\u5167\u5bb9\uff08\u770b\u8d77\u4f86\u53ef\u80fd\u6703\u6709\u9ede\u602a\uff09\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u516c\u5f00\u53ef\u7528\u7684\u6587\u4ef6\u539a\u7855\uff0c\u4e25\u683c\u8bc4\u67e5\u5e76\u9009\u51fa\u6559\u80b2\u6570\u636e\u548c\u4ee3\u7801\u7684\u9ad8\u8d28\u91cf\u7248\u672c\uff1b\n\u4e3a\u6559\u80b2\u76ee\u7684\u800c\u521b\u9020\u7684\u65b0\u9c9c\u5408\u6210\u5f0f\"\u6559\u79d1\u4e66\u5f0f\"\u6570\u636e\u4ee5\u4fbf\u5728\u6570\u5b66\u3001\u7f16\u7a0b\u3001\u5e38\u8bc6\u5224\u65ad\u548c\u4e16\u754c\u77e5\u8bc6\uff08\u79d1\u5b66\uff0c\u65e5\u5e38\u6d3b\u52a8\uff0c\u7406\u89e3\u4ed6\u4eba\u5fc3\u7406\u7b49\uff09\u4e0a\u6559\u80b2\uff1b\n\u9ad8\u8d28\u91cf\u7684\u5bf9\u8bdd\u683c\u5f0f\u8ddf\u76d1\u7763\u6570\u636e\u6db5\u76d6\u4e86\u5404\u79cd\u4e3b\u9898\uff0c\u4ee5\u53cd\u6620\u793e\u4f1a\u4e60\u4fd7\u4e2d\u4e0d\u540c\u65b9\u9762\u5982\u6307\u5bfc\u9075\u4ece\u6027\u3001\u771f\u5b9e\u6027\u3001\u8bda\u5b9e\u548c\u6709\u7528\u6027\u3002\n<a href=\"https:\/\/huggingface.co\/microsoft\/Phi-3-mini-128k-instruct?source=post_page-----150045dfb00b--------------------------------\" target=\"_blank\" rel=\"noreferrer noopener\"><\/a><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">microsoft\/Phi-3-mini-128k-instruct \u00b7 Hugging Face<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">We&#8217;re on a journey to advance and democratize artificial intelligence through open source and open science.<\/h3>\n\n\n\n<p id=\"cc2a\">\u5728\u6642\u9593\u7684\u90e8\u5206\uff0c\u9019\u500b\u6a21\u578b\u662f\u57282024\u5e742\u6708\u81f34\u6708\u4e4b\u9593\u8a13\u7df4\u7684\uff0c\u7531\u65bc\u662f\u7528\u96e2\u7dda\u8cc7\u6599\uff0c\u6240\u4ee5\u8cc7\u8a0a\u7684\u622a\u6b62\u65e5\u671f\u70ba2023\u5e7410\u6708\u3002<\/p>\n\n\n\n<p id=\"f9fe\"><strong>\u4f7f\u7528LM Studio\u4f86\u5be6\u4f5c<\/strong><\/p>\n\n\n\n<p id=\"e915\">\u9019\u6b21\u6211\u5011\u9078\u64c7\u4f7f\u7528LM Studio\u4f86\u9032\u884cphi-3-mini\u7684\u5be6\u4f5c\uff0c\u9019\u662f\u4e00\u6b3e\u529f\u80fd\u975e\u5e38\u5f37\u5927\u7684LLM\u57f7\u884c\u5e73\u53f0\uff0c\u8ddfollama\u4e0d\u540c\u7684\u662f\uff0cLM Studio\u63d0\u4f9b\u4e86\u975e\u5e38\u8c50\u5bcc\u7684\u4ecb\u9762\u8207\u529f\u80fd\uff0c\u53ef\u4ee5\u81ea\u5df1\u53bb\u641c\u5c0b\u60f3\u8981\u4f7f\u7528\u7684model\u8207\u4e92\u52d5\u4ecb\u9762\u5e73\u53f0\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">LM Studio<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Discover, download, and run local LLMs. LM Studio has 4 repositories available. Follow their code on GitHub.<\/h3>\n\n\n\n<p id=\"5746\">\u5728\u5b98\u65b9\u7db2\u7ad9\u4e0b\u8f09\u4e26\u4e14\u5b89\u88ddLM Studio\u4e4b\u5f8c\uff0c\u53ef\u4ee5\u5230\u641c\u5c0b\u76f4\u63a5\u53bb\u641c\u5c0bphi-3\uff0c\u5c31\u53ef\u4ee5\u9032\u884c\u6a21\u578b\u7684\u4e0b\u8f09\uff0c\u6211\u5728\u9019\u908a\u9078\u64c7\u7684\u662f\u4e0b\u8f09 microsoft\/Phi-3-mini-4k-instruct-gguf\uff0c\u8b93\u6c92\u6709GPU\u7684\u96fb\u8166\u4e5f\u53ef\u4ee5\u9806\u5229\u904b\u884c\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/miro.medium.com\/v2\/resize%3Afit%3A1050\/1%2AdRkeYCOO-GBaoiBmE7POSQ.png?w=640&#038;ssl=1\" alt=\"\"\/><\/figure>\n<\/div>\n\n\n<p id=\"8ab8\">\u5f9e\u5de6\u908a\u9078\u55ae\u56de\u5230\u5c0d\u8a71\u4ecb\u9762\uff0c\u53ef\u4ee5\u5728\u4e0a\u9762\u9078\u64c7\u60f3\u8981\u4f7f\u7528\u7684Model\uff0c\u6211\u5011\u9078\u64c7phi-3-mini\uff0c\u4e26\u4e14\u958b\u59cb\u91dd\u5c0d\u77e5\u8b58\u4e8b\u5be6\u9084\u6709\u7e3d\u7d50\u985e\u7684\u5de5\u4f5c\u9032\u884c\u6e2c\u8a66\uff0c\u770b\u770b\u624b\u611f\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/miro.medium.com\/v2\/resize%3Afit%3A1050\/1%2AYcw2lmieP8ODtmW59o9c7w.png?w=640&#038;ssl=1\" alt=\"\" style=\"width:859px;height:auto\"\/><\/figure>\n<\/div>\n\n\n<pre class=\"wp-block-preformatted\">USER<br>where is taiwan<br>AI<br>Taiwan, officially known as the Republic of China (ROC), is an island located in East Asia. It lies off the southeastern coast of mainland China across the Taiwan Strait and is situated to the north of the Philippines and northeast of Indonesia's province of Kalimantan. The capital city of Taiwan is Taipei. Please note that geopolitical recognition varies among different countries, with some recognizing it as an independent nation while others view it as part of China.<\/pre>\n\n\n\n<p id=\"4eb8\">\u6211\u5011\u4e5f\u4f86\u6e2c\u8a66\u770b\u770b\u7e3d\u7d50\u7684\u80fd\u529b\u5982\u4f55\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">USER<br>summary the content below:<br>Phi-3 models were developed in accordance with the Microsoft Responsible AI Standard, which is a company-wide set of requirements based on the following six principles: accountability, transparency, fairness, reliability and safety, privacy and security, and inclusiveness. Phi-3 models underwent rigorous safety measurement and evaluation, red-teaming, sensitive use review, and adherence to security guidance to help ensure that these models are responsibly developed, tested, and deployed in alignment with Microsoft's standards and best practices.<br>Building on our prior work with Phi models (\"Textbooks Are All You Need\"), Phi-3 models are also trained using high-quality data. They were further improved with extensive safety post-training, including reinforcement learning from human feedback (RLHF), automated testing and evaluations across dozens of harm categories, and manual red-teaming. Our approach to safety training and evaluations are detailed in our technical paper, and we outline recommended uses and limitations in the model cards. See the model card collection.<br>AI<br>The Phi-3 models were created following Microsoft's Responsible AI Standard, focusing on principles such as accountability, transparency, fairness, reliability, safety, privacy, security, and inclusiveness. These models underwent extensive testing for safety, including red-teaming, reviews of sensitive uses, and adherence to security protocols. Phi-3 models are enhanced by using high-quality data and additional safety measures like RLHF, automated evaluations across multiple harm categories, and manual red-teaming efforts. Details on their training and evaluation process are available in Microsoft's technical paper, along with recommended uses and restrictions outlined in the model cards.<\/pre>\n\n\n\n<p id=\"822d\"><strong>\u6240\u4ee5Phi-3-mini\u6a21\u578b\u7684\u8868\u73fe\u5982\u4f55\uff1f<\/strong><\/p>\n\n\n\n<p id=\"b1be\">\u55ae\u770b\u8868\u73fe\u7684\u8a71\uff0c\u6703\u89ba\u5f97phi-3-mini\u5728\u7d55\u5c0d\u7684\u5206\u6578\u4e0a\u4e26\u6c92\u6709\u7279\u5225\u4eae\u773c\uff0c\u5c24\u5176Phi-3\u5728\u4e8b\u5be6\u77e5\u8b58\u4e0a\uff08\u4f8b\u5982 TriviaQA\uff09\u7684\u8868\u73fe\u4e0d\u4f73\uff0c\u8ad6\u6587\u88e1\u9762\u8a8d\u70ba\u53ef\u80fd\u56e0\u70ba\u8f03\u5c0f\u7684\u6a21\u578b\u6703\u5c0e\u81f4\u4fdd\u7559\u4e8b\u5be6\u7684\u80fd\u529b\u8f03\u4f4e\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/miro.medium.com\/v2\/resize%3Afit%3A1050\/1%2Av6HXotwkU2dv0B6qVT3QZQ.png?w=640&#038;ssl=1\" alt=\"\" style=\"width:729px;height:auto\"\/><figcaption class=\"wp-element-caption\">\u6a21\u578b\u8868\u73fe\u6bd4\u8f03<\/figcaption><\/figure>\n<\/div>\n\n\n<p id=\"bf28\">\u4e0d\u904e\u5fae\u8edf\u8a8d\u70baphi-3-mini\u5728\u8868\u73fe\u4e0a\u53ef\u4ee5\u8ddfmeta\u7684llama2\u76f8\u63d0\u4e26\u8ad6\uff08\u96d6\u7136llama3\u5df2\u7d93\u63a8\u51fa\u4e86\uff09\u3002\u9664\u4e86\u79fb\u52d5\u7aef\u4e0a\u7684\u8868\u73fe\uff0c\u5fae\u8edf\u672a\u4f86\u6703\u5728\u958b\u6e90\u6a21\u578b\u518d\u63a8\u51faPhi-3-small 7b \u8ddfPhi-3-medium14b\uff0c\u5728\u958b\u6e90LLM\u8ddfMeta\u61c9\u8a72\u6703\u6709\u7af6\u722d\uff0c\u4e3b\u6253\u66f4\u5c0f\u7684\u6a21\u578b\uff0c\u4f46\u9054\u5230\u76f8\u7b49\u751a\u81f3\u66f4\u597d\u7684\u6548\u679c\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/miro.medium.com\/v2\/resize%3Afit%3A1050\/1%2AoK4g31QSiwp9Nu0m5yXrcQ.png?w=640&#038;ssl=1\" alt=\"\" style=\"width:810px;height:auto\"\/><figcaption class=\"wp-element-caption\"><em>\uff08\u8ad6\u6587\u6307\u51fa\uff0cphi\u5728\u8f03\u5c0f\u7684\u6a21\u578b\u4e0a\u537b\u6709\u76f8\u7576\u65bcllama2\u7684MMLU\u8868\u73fe\uff09<\/em><\/figcaption><\/figure>\n<\/div>\n\n\n<p>\u8cc7\u6599\u4f86\u6e90:<a href=\"https:\/\/ericchang.medium.com\/%E5%AD%B8%E7%BF%92%E7%AD%86%E8%A8%98-phi-3-mini-lm-studio-%E6%A8%A1%E5%9E%8B%E6%9B%B4%E5%B0%8F%E4%BD%86%E6%98%AF%E6%95%88%E6%9E%9C%E4%B8%80%E6%A8%A3%E5%A5%BD-150045dfb00b\" data-type=\"link\" data-id=\"https:\/\/ericchang.medium.com\/%E5%AD%B8%E7%BF%92%E7%AD%86%E8%A8%98-phi-3-mini-lm-studio-%E6%A8%A1%E5%9E%8B%E6%9B%B4%E5%B0%8F%E4%BD%86%E6%98%AF%E6%95%88%E6%9E%9C%E4%B8%80%E6%A8%A3%E5%A5%BD-150045dfb00b\">https:\/\/ericchang.medium.com\/%E5%AD%B8%E7%BF%92%E7%AD%86%E8%A8%98-phi-3-mini-lm-studio-%E6%A8%A1%E5%9E%8B%E6%9B%B4%E5%B0%8F%E4%BD%86%E6%98%AF%E6%95%88%E6%9E%9C%E4%B8%80%E6%A8%A3%E5%A5%BD-150045dfb00b<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>2024-04-26 | Eric Chang \u5fae\u8edf\u6700\u8fd1\u767c\u8868\u4e86Microsoft Phi-3-mini\uff0c\u9019\u662f\u500b\u958b\u6e90\u7684 LLM\u6a21\u578b\uff0c\u4e5f\u662f\u500b\u6eff\u512a\u79c0\u7684\u5c0f\u578b\u8a9e\u8a00\u6a21\u578b\uff08SLM\uff09\uff0cPhi-3-&hellip;<\/p>\n","protected":false},"author":9,"featured_media":6359,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[579,4],"tags":[26,40],"class_list":["post-6358","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-579","category-industry-news","tag-ai","tag-40"],"gutentor_comment":0,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/aict.nkust.edu.tw\/digitrans\/wp-content\/uploads\/2024\/07\/1_2IycU8sRmoZV1xqbr-OTdw.webp?fit=768%2C432&ssl=1","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/aict.nkust.edu.tw\/digitrans\/index.php?rest_route=\/wp\/v2\/posts\/6358","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/aict.nkust.edu.tw\/digitrans\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/aict.nkust.edu.tw\/digitrans\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/aict.nkust.edu.tw\/digitrans\/index.php?rest_route=\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/aict.nkust.edu.tw\/digitrans\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=6358"}],"version-history":[{"count":1,"href":"https:\/\/aict.nkust.edu.tw\/digitrans\/index.php?rest_route=\/wp\/v2\/posts\/6358\/revisions"}],"predecessor-version":[{"id":6360,"href":"https:\/\/aict.nkust.edu.tw\/digitrans\/index.php?rest_route=\/wp\/v2\/posts\/6358\/revisions\/6360"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/aict.nkust.edu.tw\/digitrans\/index.php?rest_route=\/wp\/v2\/media\/6359"}],"wp:attachment":[{"href":"https:\/\/aict.nkust.edu.tw\/digitrans\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=6358"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/aict.nkust.edu.tw\/digitrans\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=6358"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/aict.nkust.edu.tw\/digitrans\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=6358"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}