{"id":311,"date":"2024-01-11T22:41:10","date_gmt":"2024-01-11T14:41:10","guid":{"rendered":"https:\/\/eidolon168.com\/?p=311"},"modified":"2024-01-11T22:41:18","modified_gmt":"2024-01-11T14:41:18","slug":"transformer-ai-%e8%ae%93%e6%a8%a1%e5%9e%8b%e5%9c%a8-gpu-mps-%e4%b8%8a%e5%a5%94%e9%a6%b3%ef%bc%8c%e5%b8%b6%e4%be%86%e6%9b%b4%e9%ab%98%e7%9a%84%e6%95%88%e7%8e%87","status":"publish","type":"post","link":"https:\/\/web.eidolon.ddns.net\/?p=311","title":{"rendered":"[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387"},"content":{"rendered":"\n<p>\u6700\u8fd1\u6295\u5165\u4e0d\u5c11\u6642\u9593\u5728\u9019\u584a\u6280\u8853\u7684\u6478\u7d22\uff0c\u6240\u4ee5\u66f4\u65b0\u901f\u5ea6\u7a0d\u5fae\u6162\u4e86\u4e9b<br>\u4e0a\u6b21\u6211\u5011\u5728\u7cfb\u5217\u7684\u7b2c\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u8aaa\u660e\u5982\u4f55\u900f\u904ehugging face \u9019\u500b\u5e73\u53f0\u627e\u5230\u60f3\u8981\u4f7f\u7528\u7684\u6a21\u578b\uff0c\u4e26\u4e14\u6253\u9020\u4e00\u500b\u81ea\u5df1\u7684\u96e2\u7dda\u7ffb\u8b6f\u5f15\u64ce<br>\u6709\u8208\u8da3\u7684\u53ef\u4ee5\u53c3\u8003\u9019\u500b\u9023\u7d50\u9032\u884c\u56de\u9867- [Transformer AI] \u6253\u9020\u96e2\u7dda\u7248\u7684\u6587\u5b57\u7ffb\u8b6f\u670d\u52d9<br>\u76f8\u4fe1\u5c0d\u65bc\u670d\u52d9\u6574\u500b\u8dd1\u8d77\u4f86\u61c9\u8a72\u5f88\u662f\u632f\u596e\u5427\uff01\u4f46\u76f8\u4fe1\u5f88\u5feb\u5c31\u6703\u9047\u5230\u4e00\u500b\u554f\u984c\uff0c\u96d6\u7136\u6a21\u578b\u5f88\u65b9\u4fbf\uff0c\u4f46\u8981\u5927\u91cf\u4f7f\u7528\u6642\uff0c\u7d14\u7cb9\u9760\u8457CPU \u4f86\u904b\u7b97\uff0c\u6548\u7387\u9084\u662f\u7565\u986f\u6162\u4e86\u9ede\uff0c\u56e0\u6b64\u5c31\u9020\u5c31\u4e86\u9019\u7bc7\u6587\u7ae0\u7684\u8a95\u751f\uff0c\u80fd\u4e0d\u80fd\u8b93\u6a21\u578b\u5728\u6211\u7684\u986f\u793a\u5361\u4e0a\u982d\u904b\u884c\uff1f\u4ee5\u53ca\u8981\u5982\u4f55\u5feb\u901f\u5b8c\u6210\u7a0b\u5f0f\u78bc\u8abf\u6574\uff1f<\/p>\n\n\n\n<p>\u591a\u6578\u7db2\u8def\u4e0a\u982d\u7684\u6559\u5b78\u6587\u7ae0\u8ac7\u5230\u986f\u793a\u5361\u52a0\u901f\uff0c\u591a\u534a\u662f\u8aaa\u660eNvidia \u7684\u986f\u793a\u5361\uff0c\u4e5f\u5c31\u662f cuda platform \u3002<br>\u7136\u800c\u9019\u5e7e\u5e74 Apple M \u7cfb\u5217\u82af\u7247\u6240\u61c9\u7528\u7684\u7d71\u4e00\u8a18\u61b6\u9ad4\u67b6\u69cb(Unified Memory Architecture\uff0cUMA) \u518d\u5ea6\u5728 AI \u9818\u57df\u6380\u8d77\u4e00\u9663\u6ce2\u703e\uff0c\u7279\u5225\u662f\u5728 LLM \u5927\u578b\u8a9e\u8a00\u6a21\u578b\u6240\u9700\u8017\u8cbb\u7684 VRAM \u9700\u6c42\u4e0b\uff0c\u9019\u6a23\u7684\u65b9\u6848\u66f4\u986f\u8d85\u503c\u3002\u56e0\u70baVRAM \u8ddf RAM \u662f\u5171\u7528\u540c\u4e00\u500b\u8a18\u61b6\u9ad4\u7a7a\u9593\uff0c\u6240\u4ee5\u5c31\u4e0d\u9700\u8981\u64d4\u5fc3\u6a21\u578b\u9023\u6700\u8f09\u5165\u8a18\u61b6\u9ad4\u90fd\u6210\u4e86\u6700\u5927\u7684\u969c\u7919\uff0c\u7576\u7136\u9019\u9805\u6280\u8853\u4e5f\u4e0d\u662f\u842c\u9748\u4e39\uff0c\u7562\u7adf core \u7684\u6578\u91cf\u9084\u662f\u4e0d\u53ca Nvidia \u5177\u9f90\u5927\u898f\u6a21\u7684\u7d14\u5728\uff0c\u4f46\u81f3\u5c11\u80fd\u8b93\u6a21\u578b\u662f\u53ef\u4ee5\u8f09\u5165\u5716\u50cf\u52a0\u901f\u55ae\u5143\u9032\u884c\u904b\u7b97\u7684\uff0c\u7406\u8ad6\u4e0a\u53ea\u8981\u5145\u88d5\u7684\u6642\u9593\u4e0b\uff0c\u9084\u662f\u53ef\u4ee5\u9806\u5229\u5f97\u5230\u6a21\u578b\u7684\u7d50\u679c\u7522\u51fa\u3002<\/p>\n\n\n\n<p>\u6240\u4ee5\u8a00\u6b78\u6b63\u50b3\uff0c\u6211\u5011\u8a18\u9304\u4e00\u4e0b\u8a72\u5982\u4f55\u8abf\u6574\u65e2\u6709\u7a0b\u5f0f\u78bc\u4f86\u8b93\u6a21\u578b\u79fb\u8f49\u5230 apple M \u7cfb\u5217\u7684\u5716\u50cf\u55ae\u5143\u9032\u884c\u904b\u7b97\u3002<br>\u5148\u4e0a\u539f\u59cb\u7a0b\u5f0f\u78bc<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>from transformers import AutoTokenizer, AutoModelForSeq2SeqLM\n\ntokenizer = AutoTokenizer.from_pretrained(\".\/opus-mt-zh-en\")\nmodel = AutoModelForSeq2SeqLM.from_pretrained(\".\/opus-mt-zh-en\")\n\ntext = '\u4eca\u5929\u662f\u8056\u8a95\u7bc0\uff0c\u795d\u5927\u5bb6\u8056\u8a95\u5feb\u6a02\uff01'\n\n# \u76f4\u63a5\u4f7f\u7528 tokenizer \u5c07\u6587\u672c\u8f49\u63db\u6210\u6a21\u578b\u9700\u8981\u7684\u683c\u5f0f\ninputs = tokenizer(text, return_tensors=\"pt\", padding=True, truncation=True, max_length=512)\n\n# \u4f7f\u7528\u6a21\u578b\u9032\u884c\u7ffb\u8b6f\ntranslation = model.generate(**inputs)\n\n# \u5c07\u7ffb\u8b6f\u7d50\u679c\u8f49\u63db\u70ba\u6587\u672c\nresult = tokenizer.decode(translation&#91;0], skip_special_tokens=True)\n\n# \u5370\u51fa\u7ffb\u8b6f\u7d50\u679c\nprint(result) #It's Christmas. Merry Christmas to you all!<\/code><\/pre>\n\n\n\n<p>\u4fee\u6539\u5176\u5be6\u4e5f\u6eff\u5bb9\u6613\u7684\uff0c\u6211\u5011\u5148\u68b3\u7406\u4e00\u4e0b\u6d41\u7a0b\u518d\u4f86\u5beb\u7a0b\u5f0f\u78bc\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u5148\u6aa2\u67e5\u96fb\u8166\u662f\u5426\u6709\u627e\u5230\u5716\u50cf\u52a0\u901f\u55ae\u5143\uff0c\u5982\u679c\u6709\uff0c\u6211\u5011\u5b9a\u7fa9\u904b\u7b97\u7684\u88dd\u7f6e\u70ba\u300emps\u300f\uff1a\u56e0\u70ba\u6211\u5011\u662f\u5728 mac \u4e0a\u982d M \u7cfb\u5217\u7684\u5716\u50cf\u55ae\u5143\u52a0\u901f\u904b\u7b97\uff0c\u6240\u4ee5\u6709\u5225\u50b3\u7d71\u7684 \u300e cuda \u300f\uff0c\u800c\u662f\u4f7f\u7528 Apple\u7684\u6e32\u67d3\u5668Metal Performance Shaders\uff08MPS\uff09\u4f5c\u70ba\u904b\u884c\u88dd\u7f6e\uff1b\u5982\u679c\u5716\u50cf\u52a0\u901f\u55ae\u5143\u4e0d\u5b58\u5728\u6642\uff0c\u6211\u5011\u9084\u662f\u5e0c\u671b\u53ef\u4ee5\u5c07\u6a21\u578b\u904b\u884c\u88dd\u7f6e\u5b9a\u7fa9\u70ba\u300ecpu\u300f<\/li><li>\u88dd\u7f6e\u5b9a\u7fa9\u5b8c\u6210\u5f8c\uff0c\u6211\u5011\u9700\u8981\u5c07\u6a21\u578b\u8207\u8f38\u5165\u53c3\u6578\u63a8\u9001\u5230\u6307\u5b9a\u7684\u88dd\u7f6e\u4e0a\uff0c\u8b93\u5f8c\u7e8c\u7684\u63a8\u8ad6\uff08inference) \u5728\u6307\u5b9a\u88dd\u7f6e\u4e0a\u904b\u884c<\/li><\/ol>\n\n\n\n<p>\u63a5\u8457\u6211\u5011\u5c07\u4e0a\u9762\u63d0\u5230\u7684\u6d41\u7a0b\u8f49\u6210\u5c0d\u61c9\u7684\u7a0b\u5f0f\u78bc<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import torch\nfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM\ntokenizer = AutoTokenizer.from_pretrained(\".\/opus-mt-zh-en\")\nmodel = AutoModelForSeq2SeqLM.from_pretrained(\".\/opus-mt-zh-en\")\n\n# check whether the mps is available\ndevice = torch.device('mps' if torch.backends.mps.is_available() else 'cpu')\n\n# check whether the mps is enabled\nif device.type == 'mps':\n    print(\"MPS\u5df2\u7d93\u6210\u529f\u555f\u7528\uff01\")\nelse:\n    print(\"MPS\u672a\u555f\u7528\u3002\u8acb\u78ba\u4fdd\u4f60\u7684\u74b0\u5883\u548c\u8a2d\u5b9a\u6b63\u78ba\u3002\")\n\ntext = '\u4eca\u5929\u662f\u8056\u8a95\u7bc0\uff0c\u795d\u5927\u5bb6\u8056\u8a95\u5feb\u6a02\uff01'\n\n# \u76f4\u63a5\u4f7f\u7528 tokenizer \u5c07\u6587\u672c\u8f49\u63db\u6210\u6a21\u578b\u9700\u8981\u7684\u683c\u5f0f\ninputs = tokenizer(text, return_tensors=\"pt\", padding=True, truncation=True, max_length=512)\n\n# send the inputs to device\ninputs = {key: inputs&#91;key].to(device) for key in inputs}\n\n# send the model to device\nmodel.to(device)\n\nwith torch.no_grad():\n    # \u4f7f\u7528\u6a21\u578b\u9032\u884c\u7ffb\u8b6f\n    translation = model.generate(**inputs)\n\n    # \u5c07\u7ffb\u8b6f\u7d50\u679c\u8f49\u63db\u70ba\u6587\u672c\n    result = tokenizer.decode(translation&#91;0], skip_special_tokens=True)\n\n    # \u5370\u51fa\u7ffb\u8b6f\u7d50\u679c\n    print(result) #It's Christmas. Merry Christmas to you all!<\/code><\/pre>\n\n\n\n<p>\u5176\u5be6\u6574\u500b\u64cd\u4f5c\u8ddf\u50b3\u7d71\u7684 pytorch \u4e5f\u5f88\u50cf\uff0c\u5e7e\u884c\u4ee3\u78bc\u5c31\u5b8c\u6210\u52a0\u901f\u904b\u7b97\u4e86\uff01\u5982\u679c\u4eca\u5929\u4f7f\u7528\u7684\u662f cuda \u65b9\u6848\uff0c\u5176\u5be6\u4e5f\u5f88\u7c21\u55ae\uff0c\u5c07\u4ee3\u78bc\u4e2d\u7684mps \u8abf\u6574\u70ba cuda \u5c31\u80fd\u9806\u5229\u904b\u884c\uff0c\u4ee5\u53ca\u5224\u65b7\u52a0\u901f\u904b\u7b97\u662f\u5426\u5b58\u5728\u7684\u51fd\u5f0f\u4fee\u6539\u6574 torch.cuda.is_available()\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import torch\nfrom transformers import AutoTokenizer, AutoModelForSeq2SeqLM\ntokenizer = AutoTokenizer.from_pretrained(\".\/opus-mt-zh-en\")\nmodel = AutoModelForSeq2SeqLM.from_pretrained(\".\/opus-mt-zh-en\")\n\n# check whether the cuda is available\ndevice = torch.device('cuda' if torch.cuda.is_available() else 'cpu')\n\n# check whether the mps is enabled\nif device.type == 'mps':\n    print(\"CUDA\u5df2\u7d93\u6210\u529f\u555f\u7528\uff01\")\nelse:\n    print(\"CUDA\u672a\u555f\u7528\u3002\u8acb\u78ba\u4fdd\u4f60\u7684\u74b0\u5883\u548c\u8a2d\u5b9a\u6b63\u78ba\u3002\")\n\ntext = '\u4eca\u5929\u662f\u8056\u8a95\u7bc0\uff0c\u795d\u5927\u5bb6\u8056\u8a95\u5feb\u6a02\uff01'\n\n# \u76f4\u63a5\u4f7f\u7528 tokenizer \u5c07\u6587\u672c\u8f49\u63db\u6210\u6a21\u578b\u9700\u8981\u7684\u683c\u5f0f\ninputs = tokenizer(text, return_tensors=\"pt\", padding=True, truncation=True, max_length=512)\n\n# send the inputs to device\ninputs = {key: inputs&#91;key].to(device) for key in inputs}\n\n# send the model to device\nmodel.to(device)\n\nwith torch.no_grad():\n    # \u4f7f\u7528\u6a21\u578b\u9032\u884c\u7ffb\u8b6f\n    translation = model.generate(**inputs)\n\n    # \u5c07\u7ffb\u8b6f\u7d50\u679c\u8f49\u63db\u70ba\u6587\u672c\n    result = tokenizer.decode(translation&#91;0], skip_special_tokens=True)\n\n    # \u5370\u51fa\u7ffb\u8b6f\u7d50\u679c\n    print(result) #It's Christmas. Merry Christmas to you all!<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u6295\u5165\u4e0d\u5c11\u6642\u9593\u5728\u9019\u584a\u6280\u8853\u7684\u6478\u7d22\uff0c\u6240\u4ee5\u66f4\u65b0\u901f\u5ea6\u7a0d\u5fae\u6162\u4e86\u4e9b\u4e0a\u6b21\u6211\u5011\u5728\u7cfb\u5217\u7684\u7b2c\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u8aaa\u660e\u5982\u4f55\u900f\u904ehuggin &#8230; <a title=\"[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387\" class=\"read-more\" href=\"https:\/\/web.eidolon.ddns.net\/?p=311\" aria-label=\"Read more about [Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387\">\u95b1\u8b80\u5168\u6587<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[117,118],"tags":[130,129,119,128,127,120,121],"class_list":["post-311","post","type-post","status-publish","format-standard","hentry","category-artificial-intelligente-ai","category-nlp","tag-cuda","tag-gpu","tag-hugging-face","tag-macbookmchip","tag-mps","tag-nlp","tag-translation"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387 - Eidolon&#039;s \u7cfb\u7d71\u6574\u5408\u7814\u767c\u5de5\u7a0b\u5e2b\u7684\u6210\u9577\u624b\u672d<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/web.eidolon.ddns.net\/?p=311\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387 - Eidolon&#039;s \u7cfb\u7d71\u6574\u5408\u7814\u767c\u5de5\u7a0b\u5e2b\u7684\u6210\u9577\u624b\u672d\" \/>\n<meta property=\"og:description\" content=\"\u6700\u8fd1\u6295\u5165\u4e0d\u5c11\u6642\u9593\u5728\u9019\u584a\u6280\u8853\u7684\u6478\u7d22\uff0c\u6240\u4ee5\u66f4\u65b0\u901f\u5ea6\u7a0d\u5fae\u6162\u4e86\u4e9b\u4e0a\u6b21\u6211\u5011\u5728\u7cfb\u5217\u7684\u7b2c\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u8aaa\u660e\u5982\u4f55\u900f\u904ehuggin ... \u95b1\u8b80\u5168\u6587\" \/>\n<meta property=\"og:url\" content=\"https:\/\/web.eidolon.ddns.net\/?p=311\" \/>\n<meta property=\"og:site_name\" content=\"Eidolon&#039;s \u7cfb\u7d71\u6574\u5408\u7814\u767c\u5de5\u7a0b\u5e2b\u7684\u6210\u9577\u624b\u672d\" \/>\n<meta property=\"article:published_time\" content=\"2024-01-11T14:41:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-11T14:41:18+00:00\" \/>\n<meta name=\"author\" content=\"eidolon\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005:\" \/>\n\t<meta name=\"twitter:data1\" content=\"eidolon\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9810\u4f30\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/web.eidolon.ddns.net\/?p=311#article\",\"isPartOf\":{\"@id\":\"https:\/\/web.eidolon.ddns.net\/?p=311\"},\"author\":{\"name\":\"eidolon\",\"@id\":\"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/ace522d8ec4330e416cf13fe9d78b008\"},\"headline\":\"[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387\",\"datePublished\":\"2024-01-11T14:41:10+00:00\",\"dateModified\":\"2024-01-11T14:41:18+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/web.eidolon.ddns.net\/?p=311\"},\"wordCount\":47,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/ace522d8ec4330e416cf13fe9d78b008\"},\"keywords\":[\"cuda\",\"GPU\",\"hugging face\",\"MacBookMChip\",\"mps\",\"NLP\",\"translation\"],\"articleSection\":[\"Artificial Intelligente, AI\",\"NLP\"],\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/web.eidolon.ddns.net\/?p=311#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/web.eidolon.ddns.net\/?p=311\",\"url\":\"https:\/\/web.eidolon.ddns.net\/?p=311\",\"name\":\"[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387 - Eidolon&#039;s \u7cfb\u7d71\u6574\u5408\u7814\u767c\u5de5\u7a0b\u5e2b\u7684\u6210\u9577\u624b\u672d\",\"isPartOf\":{\"@id\":\"https:\/\/web.eidolon.ddns.net\/#website\"},\"datePublished\":\"2024-01-11T14:41:10+00:00\",\"dateModified\":\"2024-01-11T14:41:18+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/web.eidolon.ddns.net\/?p=311#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/web.eidolon.ddns.net\/?p=311\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/web.eidolon.ddns.net\/?p=311#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\/\/web.eidolon.ddns.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/web.eidolon.ddns.net\/#website\",\"url\":\"https:\/\/web.eidolon.ddns.net\/\",\"name\":\"Eidolon Blog\",\"description\":\"\u8a18\u9304\u4e00\u500b\u5c0f\u5c0f\u7cfb\u7d71\u5de5\u7a0b\u5e2b\u7684\u6210\u9577\u6b77\u7a0b\",\"publisher\":{\"@id\":\"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/ace522d8ec4330e416cf13fe9d78b008\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/web.eidolon.ddns.net\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/ace522d8ec4330e416cf13fe9d78b008\",\"name\":\"eidolon\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/i0.wp.com\/web.eidolon.ddns.net\/wp-content\/uploads\/2023\/05\/c32ebdc3-5c9b-4e77-8755-3d3caed96077.jpeg?fit=1024%2C1024&ssl=1\",\"contentUrl\":\"https:\/\/i0.wp.com\/web.eidolon.ddns.net\/wp-content\/uploads\/2023\/05\/c32ebdc3-5c9b-4e77-8755-3d3caed96077.jpeg?fit=1024%2C1024&ssl=1\",\"width\":1024,\"height\":1024,\"caption\":\"eidolon\"},\"logo\":{\"@id\":\"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387 - Eidolon&#039;s \u7cfb\u7d71\u6574\u5408\u7814\u767c\u5de5\u7a0b\u5e2b\u7684\u6210\u9577\u624b\u672d","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/web.eidolon.ddns.net\/?p=311","og_locale":"zh_TW","og_type":"article","og_title":"[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387 - Eidolon&#039;s \u7cfb\u7d71\u6574\u5408\u7814\u767c\u5de5\u7a0b\u5e2b\u7684\u6210\u9577\u624b\u672d","og_description":"\u6700\u8fd1\u6295\u5165\u4e0d\u5c11\u6642\u9593\u5728\u9019\u584a\u6280\u8853\u7684\u6478\u7d22\uff0c\u6240\u4ee5\u66f4\u65b0\u901f\u5ea6\u7a0d\u5fae\u6162\u4e86\u4e9b\u4e0a\u6b21\u6211\u5011\u5728\u7cfb\u5217\u7684\u7b2c\u4e00\u7bc7\u6587\u7ae0\u4e2d\uff0c\u8aaa\u660e\u5982\u4f55\u900f\u904ehuggin ... \u95b1\u8b80\u5168\u6587","og_url":"https:\/\/web.eidolon.ddns.net\/?p=311","og_site_name":"Eidolon&#039;s \u7cfb\u7d71\u6574\u5408\u7814\u767c\u5de5\u7a0b\u5e2b\u7684\u6210\u9577\u624b\u672d","article_published_time":"2024-01-11T14:41:10+00:00","article_modified_time":"2024-01-11T14:41:18+00:00","author":"eidolon","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005:":"eidolon","\u9810\u4f30\u95b1\u8b80\u6642\u9593":"2 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/web.eidolon.ddns.net\/?p=311#article","isPartOf":{"@id":"https:\/\/web.eidolon.ddns.net\/?p=311"},"author":{"name":"eidolon","@id":"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/ace522d8ec4330e416cf13fe9d78b008"},"headline":"[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387","datePublished":"2024-01-11T14:41:10+00:00","dateModified":"2024-01-11T14:41:18+00:00","mainEntityOfPage":{"@id":"https:\/\/web.eidolon.ddns.net\/?p=311"},"wordCount":47,"commentCount":0,"publisher":{"@id":"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/ace522d8ec4330e416cf13fe9d78b008"},"keywords":["cuda","GPU","hugging face","MacBookMChip","mps","NLP","translation"],"articleSection":["Artificial Intelligente, AI","NLP"],"inLanguage":"zh-TW","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/web.eidolon.ddns.net\/?p=311#respond"]}]},{"@type":"WebPage","@id":"https:\/\/web.eidolon.ddns.net\/?p=311","url":"https:\/\/web.eidolon.ddns.net\/?p=311","name":"[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387 - Eidolon&#039;s \u7cfb\u7d71\u6574\u5408\u7814\u767c\u5de5\u7a0b\u5e2b\u7684\u6210\u9577\u624b\u672d","isPartOf":{"@id":"https:\/\/web.eidolon.ddns.net\/#website"},"datePublished":"2024-01-11T14:41:10+00:00","dateModified":"2024-01-11T14:41:18+00:00","breadcrumb":{"@id":"https:\/\/web.eidolon.ddns.net\/?p=311#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/web.eidolon.ddns.net\/?p=311"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/web.eidolon.ddns.net\/?p=311#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/web.eidolon.ddns.net\/"},{"@type":"ListItem","position":2,"name":"[Transformer AI] \u8b93\u6a21\u578b\u5728 GPU\/ MPS \u4e0a\u5954\u99b3\uff0c\u5e36\u4f86\u66f4\u9ad8\u7684\u6548\u7387"}]},{"@type":"WebSite","@id":"https:\/\/web.eidolon.ddns.net\/#website","url":"https:\/\/web.eidolon.ddns.net\/","name":"Eidolon Blog","description":"\u8a18\u9304\u4e00\u500b\u5c0f\u5c0f\u7cfb\u7d71\u5de5\u7a0b\u5e2b\u7684\u6210\u9577\u6b77\u7a0b","publisher":{"@id":"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/ace522d8ec4330e416cf13fe9d78b008"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/web.eidolon.ddns.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":["Person","Organization"],"@id":"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/ace522d8ec4330e416cf13fe9d78b008","name":"eidolon","image":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/image\/","url":"https:\/\/i0.wp.com\/web.eidolon.ddns.net\/wp-content\/uploads\/2023\/05\/c32ebdc3-5c9b-4e77-8755-3d3caed96077.jpeg?fit=1024%2C1024&ssl=1","contentUrl":"https:\/\/i0.wp.com\/web.eidolon.ddns.net\/wp-content\/uploads\/2023\/05\/c32ebdc3-5c9b-4e77-8755-3d3caed96077.jpeg?fit=1024%2C1024&ssl=1","width":1024,"height":1024,"caption":"eidolon"},"logo":{"@id":"https:\/\/web.eidolon.ddns.net\/#\/schema\/person\/image\/"}}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/web.eidolon.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/311"}],"collection":[{"href":"https:\/\/web.eidolon.ddns.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/web.eidolon.ddns.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/web.eidolon.ddns.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/web.eidolon.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=311"}],"version-history":[{"count":1,"href":"https:\/\/web.eidolon.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions"}],"predecessor-version":[{"id":312,"href":"https:\/\/web.eidolon.ddns.net\/index.php?rest_route=\/wp\/v2\/posts\/311\/revisions\/312"}],"wp:attachment":[{"href":"https:\/\/web.eidolon.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/web.eidolon.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/web.eidolon.ddns.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}