{"id":16504,"date":"2025-02-13T11:57:46","date_gmt":"2025-02-13T02:57:46","guid":{"rendered":"https:\/\/highreso.jp\/edgehub\/?p=16504"},"modified":"2025-02-17T11:06:08","modified_gmt":"2025-02-17T02:06:08","slug":"deepseek-r1-local","status":"publish","type":"post","link":"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseek-r1-local.html","title":{"rendered":"DeepSeek-R1\u3092\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u5b89\u5168\u306b\u4f7f\u3046\u65b9\u6cd5\uff01\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304b\u3089\u69cb\u7bc9\u307e\u3067"},"content":{"rendered":"\n<p>DeepSeek-R1\u306f\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u4f7f\u7528\u3059\u308c\u3070\u3001\u5916\u90e8\u306b\u30c7\u30fc\u30bf\u304c\u9001\u4fe1\u3055\u308c\u308b\u3053\u3068\u306a\u304f\u3001\u5b89\u5168\u306b\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p><span class=\"swl-format-2\">HuggingFace\u3084Ollama\u304b\u3089\u30e2\u30c7\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306bDeepSeek-R1\u3092\u69cb\u7bc9\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001<span class=\"swl-format-2\"><span class=\"swl-format-2\">HuggingFace-Transformers\u3067\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5<\/span><\/span>\u3068\u3001<span class=\"swl-format-2\"><span class=\"swl-format-2\">Ollama-Python\u3067\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5<\/span><\/span>\u306e2\u3064\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p class=\"is-style-balloon_box\">\u3056\u3063\u304f\u308a\u8a00\u3046\u3068<\/p>\n\n\n\n<div class=\"wp-block-group is-style-big_icon_good\"><div class=\"wp-block-group__inner-container\">\n<ul class=\"wp-block-list\">\n<li>DeepSeek-R1\u3092\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u5229\u7528\u3059\u308b\u65b9\u6cd5\u3092\u89e3\u8aac<\/li>\n\n\n\n<li>HuggingFace-Transformers\u3067DeepSeek-R1\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb<\/li>\n\n\n\n<li>Ollama-Python\u3067DeepSeek-R1\u3092\u5b9f\u88c5\u3059\u308b\u65b9\u6cd5\u3092\u7d39\u4ecb<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">DeepSeek-R1\u306f\u3001\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u4f7f\u3048\u308b\uff1f<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"600\" height=\"300\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/08\/dragon_midashi.jpg\" alt=\"\u898b\u51fa\u3057\u753b\u50cf\" class=\"wp-image-9146\" srcset=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/08\/dragon_midashi.jpg 600w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/08\/dragon_midashi-300x150.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p>HuggingFace\u3084Ollama\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001DeepSeek-R1\u3092\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306b\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u5229\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p>DeepSeek-R1\u3092\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u5b9f\u884c\u3059\u308b\u3053\u3068\u3067\u3001<span class=\"swl-format-2\">\u5916\u90e8\u306e\u30b5\u30fc\u30d0\u30fc\u3078\u30c7\u30fc\u30bf\u3092\u9001\u4fe1\u3057\u306a\u304f\u3066\u6e08\u3080\u305f\u3081\u3001\u500b\u4eba\u60c5\u5831\u3084\u6a5f\u5bc6\u60c5\u5831\u304c\u6f0f\u6d29\u3059\u308b\u30ea\u30b9\u30af\u306f\u57fa\u672c\u7684\u306b\u3042\u308a\u307e\u305b\u3093\u3002<\/span><\/p>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001<span class=\"swl-format-2\">HuggingFace-Transformers<\/span>\u3067\u69cb\u7bc9\u3059\u308b\u65b9\u6cd5\u3068\u3001<span class=\"swl-format-2\">Ollama-Python<\/span>\u3067\u69cb\u7bc9\u3059\u308b\u65b9\u6cd5\u306e2\u3064\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>HuggingFace-Transformers\u3068Ollama-Python<\/span><\/div><div class=\"cap_box_content\">\n<p><span class=\"swl-format-2\">HuggingFace-Transformers<\/span><\/p>\n\n\n\n<p>HuggingFace\u304b\u3089\u30e2\u30c7\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3067\u304d\u3001\u30e2\u30c7\u30eb\u306e\u30d5\u30a1\u30a4\u30f3\u30c1\u30e5\u30fc\u30cb\u30f3\u30b0\u3084\u91cf\u5b50\u5316\u306a\u3069\u81ea\u7531\u5ea6\u304c\u9ad8\u3044\u5229\u7528\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p><span class=\"swl-format-2\">Ollama-Python<\/span><\/p>\n\n\n\n<p>Ollama\u3067\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u3067\u91cf\u5b50\u5316\u6e08\u307f\u306e\u30e2\u30c7\u30eb\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u7c21\u5358\u306b\u9ad8\u901f\u306a\u63a8\u8ad6\u3092\u5b9f\u884c\u53ef\u80fd\u3067\u3059\u3002\u307e\u305f\u3001Ollama\u306fLangChain\u306b\u3082\u5bfe\u5fdc\u3057\u3066\u304a\u308a\u3001RAG\u74b0\u5883\u3067\u306e LLM \u5229\u7528\u306b\u3082\u9069\u3057\u3066\u3044\u307e\u3059\u3002Ollama-Python\u306f\u3001Ollama\u3092Python\u304b\u3089\u64cd\u4f5c\u3059\u308b\u305f\u3081\u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002<\/p>\n<\/div><\/div>\n\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek-R1\u3092ChatGPT\u98a8\u306b\u69cb\u7bc9\u3059\u308b\u306b\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/ollamainference-eyecatch-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/ollamainference.html\">\u3010Ollama-OpenWebUI\u3011\u30ed\u30fc\u30ab\u30ebLLM\u3092ChatGPT\u98a8\u306b\u4f7f\u3046!<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Ollama-OpenWebUI\u306f\u3001ChatGPT\u306e\u3088\u3046\u306a\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3067\u30ed\u30fc\u30ab\u30ebLLM\u304c\u4f7f\u3048\u308b\u7121\u6599\u306e\u30c4\u30fc\u30eb\u3067\u3059\u3002 Ollama\u3092\u4f7f\u3048\u3070\u3001DeepSeek-R1\u3084Llama\u306a\u3069\u306e\u4eba\u6c17LLM\u3092\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u52d5&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek-R1\u306e\u65e5\u672c\u8a9e\u30e2\u30c7\u30eb\u3068\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2025\/02\/eyecatch-deepseekr1-japanese-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseek-r1-japanese.html\">DeepSeek-R1\u306e\u300c\u65e5\u672c\u8a9e\u30e2\u30c7\u30eb\u300d\u3068\u306f\uff1f\u30ed\u30fc\u30ab\u30eb\u3067\u306e\u4f7f\u3044\u65b9\u3092\u89e3\u8aac\uff01<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u30b5\u30a4\u30d0\u30fc\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u2060\u2060\u304cDeepSeek-R1\u306b\u65e5\u672c\u8a9e\u3067\u8ffd\u52a0\u5b66\u7fd2\u3057\u305f\u30e2\u30c7\u30eb\u3092\u7121\u6599\u3067\u516c\u958b\u3057\u307e\u3057\u305f\u3002 HuggingFace\u3084Ollama\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001DeepSeek-R1\u306e\u65e5\u672c\u8a9e\u30e2\u30c7\u30eb\u3092\u30ed\u30fc\u30ab&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek-R1\u3092\u6d3b\u7528\u3057\u305fRAG\u306e\u69cb\u7bc9\u65b9\u6cd5\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2025\/02\/eyecatch_deepseekr1_rag-300x157.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseekr1-rag.html\">DeepSeek-R1\u3067\u300c\u601d\u8003\u3059\u308bRAG\u300d\u3092\u69cb\u7bc9\uff01\u6df1\u3044\u601d\u8003\u3067\u7cbe\u5ea6\u5411\u4e0a<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">DeepSeek-R1\u306f\u3001OpenAI o1\u30e2\u30c7\u30eb\u306e\u3088\u3046\u306b\u9ad8\u5ea6\u306a\u63a8\u8ad6\u80fd\u529b\u3092\u6d3b\u304b\u3057\u305f\u300c\u6df1\u3044\u601d\u8003\u30d7\u30ed\u30bb\u30b9\u300d\u3092\u5f37\u307f\u3068\u3057\u3066\u3044\u307e\u3059\u3002 RAG\u306bDeepSeek-R1\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u6df1\u3044\u601d\u8003\u3092\u6d3b\u304b\u3057\u305f\u7cbe&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek\u306e\u30a2\u30d7\u30ea\u306e\u4f7f\u3044\u65b9\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2025\/01\/deepseek-eyecatch-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/wordgenerationai\/deepseekapp.html\">\u300cDeepSeek\u300d\u30a2\u30d7\u30ea\u306e\u4f7f\u3044\u65b9\uff01\u65e5\u672c\u8a9e\u3067\u5229\u7528\u306f\u3067\u304d\u308b\uff1f\u3010\u753b\u50cf\u3067\u89e3\u8aac\u3011<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u300cDeepSeek\u300d\u30a2\u30d7\u30ea\u306f\u3001iOS\u304a\u3088\u3073Android\u306e\u4e21\u65b9\u3067\u30b9\u30c8\u30a2\u304b\u3089\u7121\u6599\u3067\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002 \u5927\u304d\u306a\u8a71\u984c\u306b\u306a\u3063\u3066\u3044\u308b\u9ad8\u6027\u80fd\u306a\u5bfe\u8a71\u578bAI\u300cDeepSeek\u300d\u30a2\u30d7\u30ea\u306f\u3001\u30b9\u30de\u30db\u304b\u3089\u3082&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<h2 class=\"wp-block-heading\">DeepSeek-R1\u306e\u74b0\u5883\u69cb\u7bc9<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"600\" height=\"300\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/21_midashi_0921.jpg\" alt=\"\u898b\u51fa\u3057\u753b\u50cf\" class=\"wp-image-11856\" srcset=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/21_midashi_0921.jpg 600w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/09\/21_midashi_0921-300x150.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u7528\u610f\u3057\u305f\u5b9f\u884c\u74b0\u5883\u306f\u4ee5\u4e0b\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n\n\n\n<div class=\"wp-block-group is-style-big_icon_good\"><div class=\"wp-block-group__inner-container\">\n<ul class=\"wp-block-list\">\n<li>GPU\uff1aNVIDIA A100 80GB<\/li>\n\n\n\n<li>GPU\u30e1\u30e2\u30ea\uff08VRAM\uff09\uff1a80GB<\/li>\n\n\n\n<li>OS \uff1aUbuntu 22.04<\/li>\n\n\n\n<li>Docker<\/li>\n<\/ul>\n<\/div><\/div>\n\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek-R1\u306b\u5fc5\u8981\u306aGPU\u30e1\u30e2\u30ea\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2025\/02\/eyecatch-deepseekr1-model-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseek-r1-model.html\">\u3010DeepSeek-R1\u3011\u5404\u30e2\u30c7\u30eb\u306e\u6027\u80fd\u30fb\u5fc5\u8981\u306aGPU\u30e1\u30e2\u30ea\u30fb\u5546\u7528\u5229\u7528\u3092\u89e3\u8aac\uff01<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">DeepSeek-R1\u306f\u3001\u4e2d\u56fd\u306eAI\u4f01\u696dDeepSeek\u304c\u958b\u767a\u3057\u305f\u6700\u65b0\u306e\u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb\uff08LLM\uff09\u3067\u3059\u3002 DeepSeek-R1\u306f\u3001\u7121\u6599\u3067\u4f7f\u3048\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u3042\u308a\u306a\u304c\u3089\u3001OpenAI\u306eo1\u30e2\u30c7\u30eb\u306b\u5339&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<div class=\"p-blogParts post_content\" data-partsID=\"4485\"><p><div class=\"p-adBox -ranking -border-on\" data-id=\"4507\" data-ad=\"ranking\"><div class=\"p-adBox__title -rank1\">1\u6642\u959350\u5186\u304b\u3089\u4f7f\u3048\u308bGPU\u30af\u30e9\u30a6\u30c9\u300cGPUSOROBAN\u300d<\/div><div class=\"p-adBox__body\"><div class=\"p-adBox__img\"><div class=\"centerw250\"><a href=\"https:\/\/soroban.highreso.jp\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=highend-boxtop&adid=edgehub\" rel=\"nofollow\" referrerpolicy=\"no-referrer-when-downgrade\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/gpusorobanlllm_banner.jpg\" alt=\"GPUSOROBAN\"><\/a><\/div><\/div><div class=\"p-adBox__details\"><div class=\"p-adBox__star c-reviewStars\"><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><\/div><div class=\"p-adBox__price u-thin u-fz-s\">GPU\u306e\u30b3\u30b9\u30c8\u3067\u304a\u60a9\u307f\u306e\u65b9\u306b\uff01<\/div><div class=\"p-adBox__desc\">\u751f\u6210AI\u30fbLLM\u5411\u3051\u306e\u9ad8\u901fGPU\u3092\u696d\u754c\u6700\u5b89\u7d1a\u306e1\u6642\u959350\u5186\u304b\u3089\u5229\u7528\u3067\u304d\u307e\u3059\u3002\r\n\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u74b0\u5883\u3055\u3048\u3042\u308c\u3070\u3001GPU\u30b5\u30fc\u30d0\u30fc\u3092\u3059\u3050\u306b\u4f7f\u3048\u307e\u3059\u3002\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u8d77\u52d5\u3057\u3066\u3044\u308b\u3068\u304d\u306e\u307f\u306e\u8ab2\u91d1\u3067\u3001\u30b3\u30b9\u30c8\u3092\u6700\u5c0f\u5316\u3067\u304d\u307e\u3059\u3002\r\n<\/div><\/div><\/div><div class=\"p-adBox__btns\"><a href=\"https:\/\/soroban.highreso.jp\/compute\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=boxtop&adid=edgehub\" class=\"p-adBox__btn -btn1\" target=\"_blank\" rel=\"noopener nofollow\">\u516c\u5f0f\u30b5\u30a4\u30c8\u3092\u898b\u308b<\/a><a href=\"https:\/\/soroban.highreso.jp\/download\/compute-catalog\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=boxtop&adid=edgehub\" class=\"p-adBox__btn -btn2\" target=\"_blank\" rel=\"noopener nofollow\">\u8cc7\u6599\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a><\/div><\/div><\/p>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Docker\u3067\u74b0\u5883\u69cb\u7bc9<\/h3>\n\n\n\n<p><span class=\"swl-format-2\">Docker\u3092\u4f7f\u7528\u3057\u3066DeepSeek-R1\u306e\u74b0\u5883\u69cb\u7bc9\u3092\u3057\u307e\u3059<\/span><\/p>\n\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">Docker\u306e\u8a73\u3057\u3044\u4f7f\u3044\u65b9\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/ubuntudocker-eyecatch-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/ubuntudocker.html\">Ubuntu\u306bDocker\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff01GPU\u3092\u30b3\u30f3\u30c6\u30ca\u304b\u3089\u4f7f\u3046\u65b9\u6cd5<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">GPU\u306e\u74b0\u5883\u69cb\u7bc9\u3067\u306f\u3001\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u4e0d\u4e00\u81f4\u306b\u3088\u308b\u30a8\u30e9\u30fc\u304c\u983b\u767a\u3057\u307e\u3059\u3002 Docker\u3092\u4f7f\u3046\u3053\u3068\u3067\u3001\u3053\u306e\u3088\u3046\u306a\u4f9d\u5b58\u95a2\u4fc2\u306e\u30a8\u30e9\u30fc\u3092\u56de\u907f\u3057\u3084\u3059\u304f\u306a\u308a\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<div class=\"swell-block-step\" data-num-style=\"circle\">\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">Dockerfile\u306e\u4f5c\u6210<\/div><div class=\"swell-block-step__body\">\n<p>Ubuntu\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u3067\u3001Dockerfile\u3092\u4f5c\u6210\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>mkdir deepseekr1-inf\ncd deepseekr1-inf\nnano Dockerfile<\/code><\/pre>\n\n\n\n<p>Dockerfile\u306b\u4ee5\u4e0b\u306e\u8a18\u8ff0\u3092\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code># \u30d9\u30fc\u30b9\u30a4\u30e1\u30fc\u30b8(CUDA)\u306e\u6307\u5b9a\nFROM nvidia\/cuda:12.1.0-cudnn8-devel-ubuntu22.04\n\n# \u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nRUN apt-get update &amp;&amp; apt-get install -y python3-pip python3-venv git nano curl\n\n# Ollama\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nRUN curl -fsSL https:\/\/ollama.com\/install.sh | sh\n\n# \u4f5c\u696d\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u8a2d\u5b9a\nWORKDIR \/app\n\n# \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc\nCOPY . \/app\n\n# Python\u4eee\u60f3\u74b0\u5883\u306e\u4f5c\u6210\nRUN python3 -m venv \/app\/.venv\n\n# \u4eee\u60f3\u74b0\u5883\u3092\u30a2\u30af\u30c6\u30a3\u30d9\u30fc\u30c8\u3059\u308b\u30b3\u30de\u30f3\u30c9\u3092.bashrc\u306b\u8ffd\u52a0\nRUN echo \"source \/app\/.venv\/bin\/activate\" &gt;&gt; \/root\/.bashrc\n\n# JupyterLab\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nRUN \/app\/.venv\/bin\/pip install Jupyter jupyterlab\n\n# PyTorch\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nRUN \/app\/.venv\/bin\/pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https:\/\/download.pytorch.org\/whl\/cu121\n\n# Transformers\u95a2\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nRUN \/app\/.venv\/bin\/pip install transformers==4.47.0 accelerate bitsandbytes\n\n# Ollama\u95a2\u9023\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\nRUN \/app\/.venv\/bin\/pip install ollama==0.4.4\n\n# \u30b3\u30f3\u30c6\u30ca\u306e\u8d77\u52d5\u6642\u306bbash\u3092\u5b9f\u884c\nCMD &#091;\"\/bin\/bash\"]<\/code><\/pre>\n\n\n\n<p class=\"is-style-icon_info\">[Ctrl + S]\u30ad\u30fc\u3067\u5909\u66f4\u5185\u5bb9\u3092\u4fdd\u5b58\u3057\u3001[Ctrl + X]\u30ad\u30fc\u3067\u7de8\u96c6\u30e2\u30fc\u30c9\u304b\u3089\u629c\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30de\u30f3\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>FROM nvidia\/cuda:12.1.0-cudnn8-devel-ubuntu22.04<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">CUDA12.1\u306e\u30d9\u30fc\u30b9\u30a4\u30e1\u30fc\u30b8\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>RUN apt-get update &amp;&amp; apt-get install -y python3-pip python3-venv git nano curl<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Python\u95a2\u9023\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>RUN curl -fsSL https:\/\/ollama.com\/install.sh | sh<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Linux\u7528\u306eOllama\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>RUN \/app\/.venv\/bin\/pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https:\/\/download.pytorch.org\/whl\/cu121<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">PyTorch\u95a2\u9023\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>RUN \/app\/.venv\/bin\/pip install transformers==4.47.0 accelerate bitsandbytes<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Transformers\u95a2\u9023\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>RUN \/app\/.venv\/bin\/pip install ollama==0.4.4<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Python\u7528\u306eOllama\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">docker-compose.yml\u30d5\u30a1\u30a4\u30eb\u306e\u4f5c\u6210<\/div><div class=\"swell-block-step__body\">\n<p>docker-compose.yml\u3067Docker\u30b3\u30f3\u30c6\u30ca\u306e\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p>docker-compose.yml\u306eYAML\u30d5\u30a1\u30a4\u30eb\u3092\u4f5c\u6210\u3057\u3066\u958b\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>nano docker-compose.yml<\/code><\/pre>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc\u3057\u3066\u3001YAML\u30d5\u30a1\u30a4\u30eb\u306b\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>services:\n  deepseekr1-inf:\n    build:\n      context: .\n      dockerfile: Dockerfile\n    image: deepseekr1-inf\n    runtime: nvidia\n    container_name: deepseekr1-inf\n    ports:\n      - \"8888:8888\"\n    volumes:\n      - .:\/app\/deepseekr1-inf\n    deploy:\n      resources:\n        reservations:\n          devices:\n            - driver: nvidia\n              count: 1\n              capabilities: &#091;gpu]\n    command: &gt;\n      bash -c '\/usr\/local\/bin\/ollama serve &amp; \/app\/.venv\/bin\/jupyter lab --ip=\"*\" --port=8888 --NotebookApp.token=\"\" --NotebookApp.password=\"\" --no-browser --allow-root'<\/code><\/pre>\n\n\n\n<p class=\"is-style-icon_info\">[Ctrl + S]\u30ad\u30fc\u3067\u5909\u66f4\u5185\u5bb9\u3092\u4fdd\u5b58\u3057\u3001[Ctrl + X]\u30ad\u30fc\u3067\u7de8\u96c6\u30e2\u30fc\u30c9\u304b\u3089\u629c\u3051\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30de\u30f3\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>bash -c '\/usr\/local\/bin\/ollama serve<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Ollama Server\u3092\u8d77\u52d5\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>Python\u306eOllama\u3092\u4f7f\u7528\u3059\u308b\u969b\u306b\u3001Ollama Server\u3092\u8d77\u52d5\u3057\u3066\u304a\u304f\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>&amp; \/app\/.venv\/bin\/jupyter lab --ip=\"*\" --port=8888 --NotebookApp.token=\"\" --NotebookApp.password=\"\" --no-browser --allow-root'<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">Jupyter Lab\u30928888\u756a\u30dd\u30fc\u30c8\u3067\u8d77\u52d5\u3057\u3066\u3044\u307e\u3059\u3002<\/span><\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">Docker\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5<\/div><div class=\"swell-block-step__body\">\n<p>Dockerfile\u304b\u3089\u30d3\u30eb\u30c9\u3057\u3066\u30b3\u30f3\u30c6\u30ca\u3092\u8d77\u52d5\u3057\u307e\u3059\u3002&nbsp;&nbsp;&nbsp;<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>docker compose up<\/code><\/pre>\n\n\n\n<p>&nbsp;<\/p>\n\n\n\n<p>Docker\u306e\u8d77\u52d5\u5f8c\u306b\u30d6\u30e9\u30a6\u30b6\u306e\u691c\u7d22\u7a93\u306b&#8221;localhost:8888&#8243;\u3092\u5165\u529b\u3059\u308b\u3068\u3001Jupyter Lab\u3092\u30d6\u30e9\u30a6\u30b6\u3067\u8868\u793a\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>localhost:8888<\/code><\/pre>\n<\/div><\/div>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">DeepSeek-R1\u306e\u5b9f\u88c5\uff08HuggingFace-Transformers\u7de8\uff09<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"600\" height=\"300\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/08\/kuma58_midashi.jpg\" alt=\"\u898b\u51fa\u3057\u753b\u50cf\" class=\"wp-image-10034\" srcset=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/08\/kuma58_midashi.jpg 600w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/08\/kuma58_midashi-300x150.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p><span class=\"swl-format-2\">\u3053\u3053\u3067\u306f\u3001HuggingFace-Transformers\u3092\u4f7f\u3063\u305fDeepSeek-R1\u306e\u5b9f\u88c5\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p>\u305d\u306e\u6b21\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067Ollama\u3092\u4f7f\u7528\u3057\u305f\u5b9f\u88c5\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"swell-block-step\" data-num-style=\"circle\">\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">LLM\u306e\u8a2d\u5b9a<\/div><div class=\"swell-block-step__body\">\n<p>Docker\u30b3\u30f3\u30c6\u30ca\u3067\u8d77\u52d5\u3057\u305f JupyterLab\u4e0a\u3067\u3001DeepSeek-R1\u3092\u5b9f\u88c5\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><span class=\"swl-format-2\">DeepSeek-R1\u306e\u30e2\u30c7\u30eb\u300cdeepseek-ai\/DeepSeek-R1-Distill-Qwen-32B\u300d\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>import torch\nimport transformers\nfrom transformers import AutoModelForCausalLM, AutoTokenizer,BitsAndBytesConfig\n\nmodel_id = \"cyberagent\/DeepSeek-R1-Distill-Qwen-32B-Japanese\"\n\nquantization_config = BitsAndBytesConfig(\n    load_in_4bit=True,\n    bnb_4bit_quant_type=\"nf4\",\n    bnb_4bit_compute_dtype=torch.float16,\n)\n\ntokenizer = AutoTokenizer.from_pretrained(model_id)\n\nmodel = AutoModelForCausalLM.from_pretrained(\n    model_id,\n    torch_dtype=torch.bfloat16,\n    device_map=\"cuda\",\n    quantization_config=quantization_config, \n)<\/code><\/pre>\n\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek-R1\u306e\u4ed6\u306e\u30e2\u30c7\u30eb\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2025\/02\/eyecatch-deepseekr1-model-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseek-r1-model.html\">\u3010DeepSeek-R1\u3011\u5404\u30e2\u30c7\u30eb\u306e\u6027\u80fd\u30fb\u5fc5\u8981\u306aGPU\u30e1\u30e2\u30ea\u30fb\u5546\u7528\u5229\u7528\u3092\u89e3\u8aac\uff01<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">DeepSeek-R1\u306f\u3001\u4e2d\u56fd\u306eAI\u4f01\u696dDeepSeek\u304c\u958b\u767a\u3057\u305f\u6700\u65b0\u306e\u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb\uff08LLM\uff09\u3067\u3059\u3002 DeepSeek-R1\u306f\u3001\u7121\u6599\u3067\u4f7f\u3048\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u3042\u308a\u306a\u304c\u3089\u3001OpenAI\u306eo1\u30e2\u30c7\u30eb\u306b\u5339&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30de\u30f3\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>model_id = \"deepseek-ai\/DeepSeek-R1-Distill-Qwen-32B\"<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">HuggingFace\u304b\u3089\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3059\u308b\u30e2\u30c7\u30ebID\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>quantization_config = BitsAndBytesConfig(<br>    load_in_4bit=True,<br>    bnb_4bit_quant_type=\"nf4\",<br>    bnb_4bit_compute_dtype=torch.bfloat16,<br>)<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u91cf\u5b50\u5316\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u91cf\u5b50\u5316\u3088\u308a\u7cbe\u5ea6\u3092\u843d\u3068\u3059\u4ee3\u308f\u308a\u306bGPU\u30e1\u30e2\u30ea\u3092\u7bc0\u7d04\u3067\u304d\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p><code>load_in_4bit=True<\/code>\uff1a4-bit \u91cf\u5b50\u5316\u3092\u6709\u52b9\u5316\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>bnb_4bit_quant_type=\"nf4\"<\/code>\uff1a4-bit \u91cf\u5b50\u5316\u306e\u65b9\u5f0f\u3092NormalFloat4\u306b\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>bnb_4bit_compute_dtype=torch.float16<\/code> \uff1a\u91cf\u5b50\u5316\u30e2\u30c7\u30eb\u306e\u8a08\u7b97\u6642\u306e\u30c7\u30fc\u30bf\u578b\u3092bfloat16\u306b\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>tokenizer = AutoTokenizer.from_pretrained(model_id)<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u6307\u5b9a\u3057\u305f\u30e2\u30c7\u30eb\u306b\u5bfe\u5fdc\u3059\u308b\u30c8\u30fc\u30af\u30ca\u30a4\u30b6\u30fc\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>model = AutoModelForCausalLM.from_pretrained(\n    model_id,\n    torch_dtype=torch.bfloat16,\n    device_map=\"cuda\",\n    quantization_config=quantization_config, \n)<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30e2\u30c7\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u8aad\u307f\u8fbc\u307f\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p><code>torch_dtype=torch.bfloat16<\/code>\uff1a\u30e2\u30c7\u30eb\u306e\u30c7\u30fc\u30bf\u578b\u3092bfloat16\u306b\u6307\u5b9a\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>device_map=\"cuda\"<\/code>\uff1aGPU\u306b\u30e2\u30c7\u30eb\u306b\u5272\u308a\u5f53\u3066\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>quantization_config=quantization_config<\/code>\uff1a\u91cf\u5b50\u5316\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u6e21\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<\/div><\/div>\n<\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\" data-num=\"2\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">DeepSeek-R1\u3092\u4f7f\u3063\u305f\u30c6\u30ad\u30b9\u30c8\u751f\u6210<\/div><div class=\"swell-block-step__body\">\n<p><span class=\"swl-format-2\">DeepSeek-R1\u306e\u30e2\u30c7\u30eb\u3092\u6d3b\u7528\u3057\u3066\u3001\u5b9f\u969b\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u751f\u6210\u3057\u3066\u307f\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>DEFAULT_SYSTEM_PROMPT = \"\u3042\u306a\u305f\u306f\u65e5\u672c\u8a9e\u3067\u56de\u7b54\u3059\u308b\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u3067\u3059\u3002\"\ntext = \"\"\"P\u3001Q\u3001R\u306f\u305d\u308c\u305e\u308c\u30dc\u30fc\u30eb\u3092\u6301\u3063\u3066\u3044\u3066\u3001\u6b21\u306e\u3053\u3068\u304c\u308f\u304b\u3063\u3066\u3044\u308b\u3002\n\u2160. 3\u4eba\u5408\u308f\u305b\u3066 8 \u500b\u306e\u30dc\u30fc\u30eb\u3092\u6301\u3063\u3066\u3044\u308b\u3002\n\u2161. P \u3068 Q \u306f\u540c\u3058\u500b\u6570\u306e\u30dc\u30fc\u30eb\u3092\u6301\u3063\u3066\u3044\u308b\u3002\n\u2162. R \u306f P \u306e 2 \u500d\u306e\u30dc\u30fc\u30eb\u3092\u6301\u3063\u3066\u3044\u308b\u3002\n\u3053\u306e\u3068\u304d\u3001R \u306f\u4f55\u500b\u306e\u30dc\u30fc\u30eb\u3092\u6301\u3063\u3066\u3044\u308b\u304b\uff1f\"\"\"\n\nmessages = &#091;\n    {\"role\": \"system\", \"content\": DEFAULT_SYSTEM_PROMPT},\n    {\"role\": \"user\", \"content\": text},\n]\n\nprompt = tokenizer.apply_chat_template(\n    messages,\n    tokenize=False,\n    add_generation_prompt=True\n)\n\ntoken_ids = tokenizer.encode(\n    prompt, add_special_tokens=False,\n    return_tensors=\"pt\"\n)\n\nwith torch.no_grad():\n    output_ids = model.generate(\n        token_ids.to(model.device),\n        max_new_tokens=4096,\n        do_sample=True,\n        temperature=0.7,\n    )\n\noutput = tokenizer.decode(\n    output_ids.tolist()&#091;0]&#091;token_ids.size(1):], \n    skip_special_tokens=True\n)\nprint(output)<\/code><\/pre>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30de\u30f3\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>messages = &#091;\n    {\"role\": \"system\", \"content\": DEFAULT_SYSTEM_PROMPT},\n    {\"role\": \"user\", \"content\": text},\n]<\/code><\/pre>\n\n\n\n<p><code>DEFAULT_SYSTEM_PROMPT<\/code>\u306b\u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30f3\u30d7\u30c8\u304c\u5165\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>text<\/code>\u306b\u30e6\u30fc\u30b6\u30fc\u30d7\u30ed\u30f3\u30d7\u30c8\u304c\u5165\u308a\u307e\u3059\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>prompt = tokenizer.apply_chat_template(\n    messages,\n    tokenize=False,\n    add_generation_prompt=True\n)<\/code><\/pre>\n\n\n\n<p><code>apply_chat_template() <\/code>: \u4f1a\u8a71\u5c65\u6b74\u3092\u30e2\u30c7\u30eb\u304c\u7406\u89e3\u3057\u3084\u3059\u3044\u30d7\u30ed\u30f3\u30d7\u30c8\u306e\u5f62\u5f0f\u306b\u6574\u5f62\u3057\u307e\u3059\u3002<br><code>tokenize=False<\/code> : \u3053\u3053\u3067\u306f\u6587\u5b57\u5217\u3068\u3057\u3066\u30d7\u30ed\u30f3\u30d7\u30c8\u3092\u8fd4\u3059\u305f\u3081\u3001\u5185\u90e8\u3067\u306e\u30c8\u30fc\u30af\u30f3\u5316\u306f\u884c\u3044\u307e\u305b\u3093\u3002<br><code>add_generation_prompt=True<\/code> : \u30e2\u30c7\u30eb\u304c\u56de\u7b54\u3092\u958b\u59cb\u3059\u308b\u4f4d\u7f6e\u3092\u660e\u793a\u3059\u308b\u305f\u3081\u306e\u6307\u793a\u304c\u30d7\u30ed\u30f3\u30d7\u30c8\u306b\u81ea\u52d5\u7684\u306b\u8ffd\u52a0\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>token_ids = tokenizer.encode(\n    prompt, add_special_tokens=False,\n    return_tensors=\"pt\"\n)<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u751f\u6210\u3055\u308c\u305f\u6587\u5b57\u5217\u3092\u3001\u30e2\u30c7\u30eb\u304c\u51e6\u7406\u3067\u304d\u308b\u30c8\u30fc\u30af\u30f3ID\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p><code>add_special_tokens=False<\/code>: \u7279\u6b8a\u30c8\u30fc\u30af\u30f3\u3092\u8ffd\u52a0\u3057\u306a\u3044\u8a2d\u5b9a\u3092\u3057\u307e\u3059\u3002<br><code>return_tensors=\"pt\"<\/code>: \u7d50\u679c\u3092 PyTorch \u306e\u30c6\u30f3\u30bd\u30eb\u5f62\u5f0f\u3067\u8fd4\u3057\u307e\u3059\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>with torch.no_grad():\n    output_ids = model.generate(\n        token_ids.to(model.device),\n        max_new_tokens=4096,\n        do_sample=True,\n        temperature=0.7,\n    )<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30e2\u30c7\u30eb\u306e\u56de\u7b54\u3092\u30c8\u30fc\u30af\u30f3ID\u306e\u5f62\u5f0f\u3067\u751f\u6210\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p><code>torch.no_grad()<\/code>: \u63a8\u8ad6\u6642\u306f\u52fe\u914d\u8a08\u7b97\u3092\u884c\u308f\u305a\u3001\u30e1\u30e2\u30ea\u3084\u8a08\u7b97\u30ea\u30bd\u30fc\u30b9\u306e\u6d88\u8cbb\u3092\u6291\u3048\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>token_ids.to(model.device)<\/code>: \u30c8\u30fc\u30af\u30f3ID\u3092\u30e2\u30c7\u30eb\u304c\u52d5\u4f5c\u3057\u3066\u3044\u308b\u30c7\u30d0\u30a4\u30b9\uff08CPU\u307e\u305f\u306fGPU\uff09\u306b\u8ee2\u9001\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>max_new_tokens=4096<\/code>: \u751f\u6210\u3059\u308b\u65b0\u898f\u30c8\u30fc\u30af\u30f3\u306e\u6700\u5927\u6570\u3092\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u3053\u3067\u306f\u6700\u59274096\u30c8\u30fc\u30af\u30f3\u307e\u3067\u751f\u6210\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p><code>do_sample=True<\/code>: \u30b5\u30f3\u30d7\u30ea\u30f3\u30b0\u3092\u4f7f\u3063\u3066\u6587\u7ae0\u3092\u751f\u6210\u3059\u308b\u8a2d\u5b9a\u3067\u3059\u3002\u751f\u6210\u7d50\u679c\u306b\u78ba\u7387\u7684\u306a\u30d0\u30ea\u30a8\u30fc\u30b7\u30e7\u30f3\u304c\u751f\u307e\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>temperature=0.7<\/code>: \u5024\u3092\u4e0a\u3052\u308b\u3068\u751f\u6210\u306b\u3088\u308a\u30e9\u30f3\u30c0\u30e0\u6027\u304c\u52a0\u308f\u308a\u3001\u5024\u3092\u4e0b\u3052\u308b\u3068\u3088\u308a\u4fdd\u5b88\u7684\u3067\u78ba\u5b9a\u7684\u306a\u30c6\u30ad\u30b9\u30c8\u304c\u751f\u6210\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>output = tokenizer.decode(\n    output_ids.tolist()&#091;0]&#091;token_ids.size(1):], \n    skip_special_tokens=True\n)<\/code><\/pre>\n\n\n\n<p><span class=\"swl-format-2\">\u30e2\u30c7\u30eb\u304c\u751f\u6210\u3057\u305f\u30c8\u30fc\u30af\u30f3ID\u3092\u3001\u4eba\u9593\u304c\u8aad\u3081\u308b\u6587\u5b57\u5217\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<p><code>output_ids<\/code> \u306f\u30c8\u30fc\u30af\u30f3ID\u306e\u30c6\u30f3\u30bd\u30eb\u5f62\u5f0f\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u306e\u3067\u3001<code>.tolist()<\/code> \u3067PyTorch\u306e\u30c6\u30f3\u30bd\u30eb\u3092Python\u306e\u30ea\u30b9\u30c8\u5f62\u5f0f\u306b\u5909\u63db\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>[token_ids.size(1):] <\/code>\u306b\u3088\u308a\u3001\u5165\u529b\u30d7\u30ed\u30f3\u30d7\u30c8\u90e8\u5206\u3092\u30b9\u30e9\u30a4\u30b9\u3067\u9664\u5916 \u3057\u3001\u30e2\u30c7\u30eb\u304c\u65b0\u305f\u306b\u751f\u6210\u3057\u305f\u90e8\u5206\u306e\u307f\u3092\u53d6\u5f97\u3057\u307e\u3059\u3002<\/p>\n<\/div><\/div>\n\n\n\n<p class=\"is-style-balloon_box\">\u30e2\u30c7\u30eb\u306e\u56de\u7b54<\/p>\n\n\n\n<pre class=\"wp-block-code has-swl-gray-background-color has-background\"><code>\u307e\u305a\u3001P\u3001Q\u3001R\u304c\u6301\u3063\u3066\u3044\u308b\u30dc\u30fc\u30eb\u306e\u500b\u6570\u3092P\u3001Q\u3001R\u3068\u3057\u307e\u3059\u3002\n\n\u6761\u4ef6\u2160\u3088\u308a\u3001P + Q + R = 8\u3067\u3059\u3002\n\n\u6761\u4ef6\u2161\u3088\u308a\u3001P = Q\u3067\u3059\u3002\n\n\u6761\u4ef6\u2162\u3088\u308a\u3001R = 2P\u3067\u3059\u3002\n\nQ\u3092P\u3067\u7f6e\u304d\u63db\u3048\u308b\u3068\u3001P + P + 2P = 8\u3068\u306a\u308a\u30014P = 8\u3067\u3059\u3002\n\n\u3057\u305f\u304c\u3063\u3066\u3001P = 2\u3067\u3059\u3002\n\nR = 2P = 4\u3067\u3059\u3002\n&lt;\/think&gt;\n\n**\u89e3\u7b54\uff1a**\n\nP\u3001Q\u3001R\u304c\u6301\u3063\u3066\u3044\u308b\u30dc\u30fc\u30eb\u306e\u500b\u6570\u3092\u305d\u308c\u305e\u308c \\( P \\)\u3001\\( Q \\)\u3001\\( R \\) \u3068\u3057\u307e\u3059\u3002\n\n1. **\u6761\u4ef6\u2160\uff1a**  \n   \\( P + Q + R = 8 \\)\n\n2. **\u6761\u4ef6\u2161\uff1a**  \n   \\( P = Q \\)\n\n3. **\u6761\u4ef6\u2162\uff1a**  \n   \\( R = 2P \\)\n\n**\u89e3\u304d\u65b9\uff1a**\n\n- \u6761\u4ef6\u2161\u3088\u308a\u3001\\( Q = P \\) \u3067\u3042\u308b\u306e\u3067\u3001\u6761\u4ef6\u2160\u3092 \\( P \\) \u3067\u8868\u3057\u307e\u3059\uff1a\n  \\&#091;\n  P + P + R = 8 \\quad \\Rightarrow \\quad 2P + R = 8\n  \\]\n  \n- \u6761\u4ef6\u2162\u3088\u308a\u3001\\( R = 2P \\) \u3067\u3042\u308b\u306e\u3067\u3001\u4e0a\u5f0f\u306b\u4ee3\u5165\u3057\u307e\u3059\uff1a\n  \\&#091;\n  2P + 2P = 8 \\quad \\Rightarrow \\quad 4P = 8 \\quad \\Rightarrow \\quad P = 2\n  \\]\n  \n- \u3057\u305f\u304c\u3063\u3066\u3001\\( R = 2P = 2 \\times 2 = 4 \\) \u3067\u3059\u3002\n\n**\u7b54\uff1a**  \n\\(\\boxed{4}\\)<\/code><\/pre>\n\n\n\n<p class=\"is-style-icon_good\">\u6b63\u3057\u304f\u63a8\u8ad6\u3067\u304d\u3066\u3044\u307e\u3059\uff01<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<div class=\"p-blogParts post_content\" data-partsID=\"4485\"><p><div class=\"p-adBox -ranking -border-on\" data-id=\"4540\" data-ad=\"ranking\"><div class=\"p-adBox__title -rank1\">50\uff05\u5b89\u3044\u696d\u754c\u6700\u5b89\u7d1aGPU\u30af\u30e9\u30a6\u30c9\u300cGPUSOROBAN\u300d<\/div><div class=\"p-adBox__body\"><div class=\"p-adBox__img\"><div class=\"centerw250\"><a href=\"https:\/\/soroban.highreso.jp\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=highend-boxtop&adid=edgehub\" rel=\"nofollow\" referrerpolicy=\"no-referrer-when-downgrade\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/gpusorobanlllm_banner.jpg\" alt=\"GPUSOROBAN\"><\/a><\/div><\/div><div class=\"p-adBox__details\"><div class=\"p-adBox__star c-reviewStars\"><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><i class=\"icon-star-full\"><\/i><\/div><div class=\"p-adBox__price u-thin u-fz-s\">GPU\u306e\u30b3\u30b9\u30c8\u3067\u304a\u60a9\u307f\u306e\u65b9\u306b\uff01<\/div><div class=\"p-adBox__desc\">AWS\u3068\u6bd4\u3079\u306650%\u4ee5\u4e0a\u5b89\u3044\u6599\u91d1\u3067\u3001\u9ad8\u901fGPU\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u3054\u5229\u7528\u3044\u305f\u3060\u3051\u307e\u3059\u3002\r\n\u9762\u5012\u306a\u8a2d\u5b9a\u306f\u4e0d\u8981\u3001\u308f\u305a\u304b3\u5206\u3067\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u7acb\u3061\u4e0a\u3052\u304c\u53ef\u80fd\u3067\u3059\u3002\r\n\u30bf\u30b9\u30af\u306b\u5fdc\u3058\u3066\u6700\u9069\u306aGPU\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u9078\u629e\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/div><\/div><\/div><div class=\"p-adBox__btns\"><a href=\"https:\/\/soroban.highreso.jp\/compute\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=boxtop&adid=edgehub\" class=\"p-adBox__btn -btn1\" target=\"_blank\" rel=\"noopener nofollow\">\u516c\u5f0f\u30b5\u30a4\u30c8\u3092\u898b\u308b<\/a><a href=\"https:\/\/soroban.highreso.jp\/download\/compute-catalog\/?utm_medium=edgehub&utm_source=edgehub&utm_campaign=boxtop&adid=edgehub\" class=\"p-adBox__btn -btn2\" target=\"_blank\" rel=\"noopener nofollow\">\u8cc7\u6599\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a><\/div><\/div><\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">DeepSeek-R1\u306e\u5b9f\u88c5\uff08Ollama-Python\u7de8\uff09<\/h2>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"600\" height=\"300\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/08\/cat37_midashi.jpg\" alt=\"\u898b\u51fa\u3057\u753b\u50cf\" class=\"wp-image-9935\" srcset=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/08\/cat37_midashi.jpg 600w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/08\/cat37_midashi-300x150.jpg 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/figure>\n\n\n\n<p><span class=\"swl-format-2\">\u3053\u3053\u304b\u3089Ollama-Python\u4f7f\u3063\u305fDeepSeek-R1\u5b9f\u88c5\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<div class=\"swell-block-step\" data-num-style=\"circle\">\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">LLM\u306e\u8a2d\u5b9a<\/div><div class=\"swell-block-step__body\">\n<p>Docker\u30b3\u30f3\u30c6\u30ca\u3067\u8d77\u52d5\u3057\u305f JupyterLab\u4e0a\u3067\u3001DeepSeek-R1\u3092\u5b9f\u88c5\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><span class=\"swl-format-2\">Ollama\u304b\u3089DeepSeek-R1\u306e\u30e2\u30c7\u30eb\u300cdeepseek-r1:32b\u300d\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<\/span><\/p>\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>import ollama\nollama.pull('deepseek-r1:32b')<\/code><\/pre>\n\n\n\n<p class=\"is-style-icon_good\">status=&#8217;success&#8217;\u304c\u8868\u793a\u3055\u308c\u305f\u3089\u3001\u30e2\u30c7\u30eb\u306e\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u304c\u5b8c\u4e86\u3067\u3059\u3002<\/p>\n\n\n\n<p><span class=\"swl-format-2\">DeepSeek-R1\u306e\u4ed6\u306e\u30e2\u30c7\u30eb\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2025\/02\/eyecatch-deepseekr1-model-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseek-r1-model.html\">\u3010DeepSeek-R1\u3011\u5404\u30e2\u30c7\u30eb\u306e\u6027\u80fd\u30fb\u5fc5\u8981\u306aGPU\u30e1\u30e2\u30ea\u30fb\u5546\u7528\u5229\u7528\u3092\u89e3\u8aac\uff01<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">DeepSeek-R1\u306f\u3001\u4e2d\u56fd\u306eAI\u4f01\u696dDeepSeek\u304c\u958b\u767a\u3057\u305f\u6700\u65b0\u306e\u5927\u898f\u6a21\u8a00\u8a9e\u30e2\u30c7\u30eb\uff08LLM\uff09\u3067\u3059\u3002 DeepSeek-R1\u306f\u3001\u7121\u6599\u3067\u4f7f\u3048\u308b\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u3067\u3042\u308a\u306a\u304c\u3089\u3001OpenAI\u306eo1\u30e2\u30c7\u30eb\u306b\u5339&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div><\/div><\/div>\n\n\n\n<div class=\"swell-block-step__item\"><div class=\"swell-block-step__number u-bg-main\" data-num=\"2\"><span class=\"__label\">STEP<\/span><\/div><div class=\"swell-block-step__title u-fz-l\">DeepSeek-R1\u3092\u4f7f\u3063\u305f\u30c6\u30ad\u30b9\u30c8\u751f\u6210<\/div><div class=\"swell-block-step__body\">\n<p><span class=\"swl-format-2\">DeepSeek-R1\u306e\u30e2\u30c7\u30eb\u3092\u6d3b\u7528\u3057\u3066\u3001\u5b9f\u969b\u306b\u30c6\u30ad\u30b9\u30c8\u3092\u751f\u6210\u3057\u3066\u307f\u307e\u3059\u3002<\/span><\/p>\n\n\n\n\n\n\n\n<pre class=\"wp-block-code has-black-background-color has-background\"><code>DEFAULT_SYSTEM_PROMPT = \"\u3042\u306a\u305f\u306f\u65e5\u672c\u8a9e\u3067\u56de\u7b54\u3059\u308b\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8\u3067\u3059\u3002\"\n\ntext =\"\"\"\n\u3010\u554f\u984c\u3011\nX\u3001Y\u3001Z\u304c\u540c\u3058\u7d75\u3092\u898b\u3066\u3066\u3001\u6b21\u306e\u3088\u3046\u306b\u767a\u8a00\u3057\u305f\u3002\nX\u3000\u3053\u306e\u7d75\u306b\u306f\u864e\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u3002\nY\u3000\u3053\u306e\u7d75\u306b\u306f\u5c11\u306a\u304f\u3068\u3082\u864e\u304b\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u3002\nZ\u3000\u3053\u306e\u7d75\u306b\u306f\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u3002\n\u5168\u54e1\u304c\u672c\u5f53\u306e\u3053\u3068\u3092\u8a00\u3063\u3066\u3044\u308b\u3068\u306f\u9650\u3089\u306a\u3044\u3002\u305d\u3053\u3067\u3001\u4ee5\u4e0b\u306e\u63a8\u8ad6\u304c\u306a\u3055\u308c\u305f\u3002\u6b21\u306e\u3046\u3061\u6b63\u3057\u3044\u3082\u306e\u3092\u4e00\u3064\u9078\u3073\u306a\u3055\u3044\u3002\n\n\uff1c\u9078\u629e\u80a2\uff1e\nY\u304c\u6b63\u3057\u3051\u308c\u3070X\u306f\u5fc5\u305a\u6b63\u3057\u3044\nZ\u304c\u6b63\u3057\u3051\u308c\u3070Y\u306f\u5fc5\u305a\u6b63\u3057\u3044\nX\u304c\u6b63\u3057\u3051\u308c\u3070Z\u306f\u5fc5\u305a\u6b63\u3057\u3044\n\"\"\"\n\nresponse = ollama.chat(model='deepseek-r1:32b', messages=&#091;\n    {\n        'role': 'system',\n        'content': DEFAULT_SYSTEM_PROMPT,\n    },\n    {\n        'role': 'user',\n        'content': text,\n    },\n])\nprint(response&#091;'message']&#091;'content'])<\/code><\/pre>\n\n\n\n<div class=\"swell-block-capbox cap_box is-style-onborder_ttl2\" data-colset=\"col3\"><div class=\"cap_box_ttl\"><span>\u30b3\u30de\u30f3\u30c9\u306e\u8aac\u660e<\/span><\/div><div class=\"cap_box_content\">\n<p><code>response = ollama.chat(...) <\/code>\uff1adeepseek-r1:32b&#8217;\u30e2\u30c7\u30eb\u3092\u4f7f\u7528\u3057\u3066\u56de\u7b54\u3092\u751f\u6210<\/p>\n\n\n\n<p><code>DEFAULT_SYSTEM_PROMPT<\/code>\u306b\u30b7\u30b9\u30c6\u30e0\u30d7\u30ed\u30f3\u30d7\u30c8\u304c\u5165\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p><code>text<\/code>\u306b\u30e6\u30fc\u30b6\u30fc\u30d7\u30ed\u30f3\u30d7\u30c8\u304c\u5165\u308a\u307e\u3059\u3002<\/p>\n<\/div><\/div>\n\n\n\n<p class=\"is-style-balloon_box\">\u30e2\u30c7\u30eb\u306e\u56de\u7b54<\/p>\n\n\n\n<pre class=\"wp-block-code has-swl-gray-background-color has-background\"><code>&lt;think&gt;\n\u307e\u305a\u3001\u554f\u984c\u306e\u5185\u5bb9\u3092\u7406\u89e3\u3057\u307e\u3059\u3002X\u3001Y\u3001Z\u306e3\u4eba\u304c\u540c\u3058\u7d75\u3092\u898b\u3066\u3044\u3066\u3001\u305d\u308c\u305e\u308c\u6b21\u306e\u3088\u3046\u306a\u767a\u8a00\u3092\u3057\u3066\u3044\u307e\u3059\u3002\n\n- X: \u7d75\u306b\u306f\u864e\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u3002\n- Y: \u7d75\u306b\u306f\u5c11\u306a\u304f\u3068\u3082\u864e\u304b\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u3002\n- Z: \u7d75\u306b\u306f\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u3002\n\n\u5168\u54e1\u304c\u771f\u5b9f\u3092\u8ff0\u3079\u3066\u3044\u308b\u3068\u306f\u9650\u3089\u306a\u3044\u305f\u3081\u3001\u4ee5\u4e0b\u306e\u63a8\u8ad6\u306e\u4e2d\u3067\u6b63\u3057\u3044\u3082\u306e\u3092\u9078\u3070\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\u9078\u629e\u80a2\u306f3\u3064\u3042\u308a\u307e\u3059\uff1a\n\n1. Y\u304c\u6b63\u3057\u3051\u308c\u3070X\u306f\u5fc5\u305a\u6b63\u3057\u3044\n2. Z\u304c\u6b63\u3057\u3051\u308c\u3070Y\u306f\u5fc5\u305a\u6b63\u3057\u3044\n3. X\u304c\u6b63\u3057\u3051\u308c\u3070Z\u306f\u5fc5\u305a\u6b63\u3057\u3044\n\n\u6b21\u306b\u3001\u5404\u9078\u629e\u80a2\u306b\u3064\u3044\u3066\u5206\u6790\u3057\u307e\u3059\u3002\n\n**\u7b2c\u4e00\u306e\u9078\u629e\u80a2\uff1aY\u304c\u6b63\u3057\u3051\u308c\u3070X\u306f\u5fc5\u305a\u6b63\u3057\u3044**\n\n- Y\u306e\u767a\u8a00\u306f\u300c\u5c11\u306a\u304f\u3068\u3082\u864e\u304b\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u300d\u3067\u3059\u3002\n- \u3057\u304b\u3057\u3001\u3053\u306e\u767a\u8a00\u304c\u771f\u3067\u3042\u308b\u5834\u5408\u3067\u3082\u3001\u7d75\u306b\u864e\u306e\u307f\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u305d\u306e\u5834\u5408\u3001X\u306e\u767a\u8a00\u3082\u771f\u3068\u306a\u308a\u307e\u3059\u3002\n- \u53cd\u5bfe\u306b\u3001\u7d75\u306b\u9f8d\u306e\u307f\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u5834\u5408\u3067\u3082Y\u306e\u767a\u8a00\u306f\u771f\u3067\u3059\u304c\u3001X\u306e\u767a\u8a00\u306f\u507d\u306b\u306a\u308a\u307e\u3059\u3002\n- \u3057\u305f\u304c\u3063\u3066\u3001Y\u304c\u6b63\u3057\u304f\u3066\u3082X\u304c\u5fc5\u305a\u6b63\u3057\u3044\u3068\u306f\u9650\u3089\u306a\u3044\u305f\u3081\u3001\u3053\u306e\u9078\u629e\u80a2\u306f\u4e0d\u6b63\u89e3\u3067\u3059\u3002\n\n**\u7b2c\u4e8c\u306e\u9078\u629e\u80a2\uff1aZ\u304c\u6b63\u3057\u3051\u308c\u3070Y\u306f\u5fc5\u305a\u6b63\u3057\u3044**\n\n- Z\u306e\u767a\u8a00\u306f\u300c\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u300d\u3067\u3059\u3002\n- Y\u306e\u767a\u8a00\u306f\u300c\u864e\u304b\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u300d\u3068\u3044\u3046\u8ad6\u7406\u7684\u306aOR\u3067\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001\u3082\u3057Z\u306e\u767a\u8a00\u304c\u771f\u3067\u3042\u308c\u3070\uff08\u3059\u306a\u308f\u3061\u7d75\u306b\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\uff09\u3001Y\u306e\u767a\u8a00\u3082\u81ea\u52d5\u7684\u306b\u771f\u306b\u306a\u308a\u307e\u3059\u3002\n- \u9006\u306b\u3001Z\u306e\u767a\u8a00\u304c\u507d\u3067\u3042\u308b\u5834\u5408\u3067\u3082\u3001Y\u306e\u767a\u8a00\u304c\u771f\u3067\u3042\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\uff08\u4f8b\u3048\u3070\u864e\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u5834\u5408\uff09\u3002\n- \u3057\u304b\u3057\u554f\u984c\u306f\u300cZ\u304c\u6b63\u3057\u3051\u308c\u3070Y\u306f\u5fc5\u305a\u6b63\u3057\u3044\u300d\u304b\u3069\u3046\u304b\u306b\u3064\u3044\u3066\u3067\u3001Z\u304c\u771f\u3067\u3042\u308c\u3070Y\u3082\u771f\u306b\u306a\u308b\u305f\u3081\u3001\u3053\u306e\u9078\u629e\u80a2\u306f\u6b63\u89e3\u3067\u3059\u3002\n\n**\u7b2c\u4e09\u306e\u9078\u629e\u80a2\uff1aX\u304c\u6b63\u3057\u3051\u308c\u3070Z\u306f\u5fc5\u305a\u6b63\u3057\u3044**\n\n- X\u306e\u767a\u8a00\u306f\u300c\u864e\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u300d\u3067\u3059\u3002\n- Z\u306e\u767a\u8a00\u306f\u300c\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u300d\u3067\u3059\u3002\u3053\u308c\u3089\u306f\u72ec\u7acb\u3057\u305f\u4e8b\u67c4\u3067\u3001X\u304c\u771f\u3067\u3042\u308b\u5834\u5408\u3067\u3082Z\u304c\u771f\u3067\u3042\u308b\u5fc5\u8981\u306f\u3042\u308a\u307e\u305b\u3093\uff08\u4f8b\u3048\u3070\u7d75\u306b\u864e\u306e\u307f\u63cf\u304b\u308c\u3066\u3044\u305f\u5834\u5408\uff09\u3002\n- \u3057\u305f\u304c\u3063\u3066\u3001X\u304c\u6b63\u3057\u304f\u3066\u3082Z\u304c\u5fc5\u305a\u6b63\u3057\u3044\u3068\u306f\u9650\u3089\u306a\u3044\u305f\u3081\u3001\u3053\u306e\u9078\u629e\u80a2\u3082\u4e0d\u6b63\u89e3\u3067\u3059\u3002\n\n**\u7d50\u8ad6**\n\n\u5206\u6790\u306e\u7d50\u679c\u3001\u7b2c\u4e8c\u306e\u9078\u629e\u80a2\u300cZ\u304c\u6b63\u3057\u3051\u308c\u3070Y\u306f\u5fc5\u305a\u6b63\u3057\u3044\u300d\u304c\u552f\u4e00\u6b63\u3057\u3044\u63a8\u8ad6\u3067\u3059\u3002\u7406\u7531\u306fZ\u304c\u771f\u3067\u3042\u308c\u3070\u3001Y\u306eOR\u6761\u4ef6\u3067\u3042\u308b\u864e\u304b\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u3053\u3068\u306e\u3069\u3061\u3089\u304b\u304c\u771f\u306b\u306a\u308b\u304b\u3089\u3067\u3059\u3002\n&lt;\/think&gt;\n\n\uff1c\u89e3\u7b54\uff1e  \n**Z\u304c\u6b63\u3057\u3051\u308c\u3070Y\u306f\u5fc5\u305a\u6b63\u3057\u3044**\n\n\uff1c\u89e3\u8aac\uff1e  \n- **Y\u306e\u767a\u8a00**\uff1a\u300c\u5c11\u306a\u304f\u3068\u3082\u864e\u304b\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u300d\u3002\u3053\u308c\u306f\u3001\u864e\u307e\u305f\u306f\u9f8d\u306e\u5c11\u306a\u304f\u3068\u3082\u4e00\u65b9\u304c\u63cf\u304b\u308c\u3066\u3044\u308c\u3070\u6210\u7acb\u3057\u307e\u3059\u3002\n- **Z\u306e\u767a\u8a00**\uff1a\u300c\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u308b\u300d\u3002\u3082\u3057Z\u304c\u6b63\u3057\u304f\uff08\u9f8d\u304c\u63cf\u304b\u308c\u3066\u3044\u305f\u5834\u5408\uff09\u3001Y\u306e\u6761\u4ef6\uff08\u864e\u304b\u9f8d\uff09\u3082\u5f53\u7136\u6e80\u305f\u3055\u308c\u307e\u3059\u3002\u3057\u305f\u304c\u3063\u3066\u3001Z\u304c\u771f\u3067\u3042\u308c\u3070Y\u3082\u5fc5\u305a\u771f\u306b\u306a\u308a\u307e\u3059\u3002\n\n\uff1c\u4ed6\u306e\u9078\u629e\u80a2\uff1e  \n1. **Y\u304c\u6b63\u3057\u3051\u308c\u3070X\u306f\u5fc5\u305a\u6b63\u3057\u3044**\uff1aY\u304c\u6b63\u3057\u304f\u3066\u3082\u3001\u9f8d\u306e\u307f\u63cf\u304b\u308c\u3066\u3044\u308b\u5834\u5408\u306bX\u304c\u4e0d\u6b63\u78ba\u306b\u306a\u308b\u305f\u3081\u4e0d\u6210\u7acb\u3067\u3059\u3002\n2. **X\u304c\u6b63\u3057\u3051\u308c\u3070Z\u306f\u5fc5\u305a\u6b63\u3057\u3044**\uff1aX\u304c\u6b63\u3057\u304f\u3066\u3082\u3001\u864e\u306e\u307f\u63cf\u304b\u308c\u3066\u304a\u308a\u9f99\u304c\u63cf\u304b\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u3082\u3042\u308a\u3048\u308b\u305f\u3081\u4e0d\u6210\u7acb\u3067\u3059\u3002\n\n\u3057\u305f\u304c\u3063\u3066\u3001\u552f\u4e00\u6b63\u3057\u3044\u9078\u629e\u80a2\u306f\u300cZ\u304c\u6b63\u3057\u3051\u308c\u3070Y\u306f\u5fc5\u305a\u6b63\u3057\u3044\u300d\u3067\u3059\u3002<\/code><\/pre>\n\n\n\n<p class=\"is-style-icon_good\">\u3057\u3063\u304b\u308a\u63a8\u8ad6\u3057\u3066\u56de\u7b54\u3067\u304d\u3066\u3044\u307e\u3059\uff01<\/p>\n<\/div><\/div>\n<\/div>\n\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek-R1\u3092ChatGPT\u98a8\u306b\u69cb\u7bc9\u3059\u308b\u306b\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/ollamainference-eyecatch-300x158.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/ollamainference.html\">\u3010Ollama-OpenWebUI\u3011\u30ed\u30fc\u30ab\u30ebLLM\u3092ChatGPT\u98a8\u306b\u4f7f\u3046!<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">Ollama-OpenWebUI\u306f\u3001ChatGPT\u306e\u3088\u3046\u306a\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30a4\u30b9\u3067\u30ed\u30fc\u30ab\u30ebLLM\u304c\u4f7f\u3048\u308b\u7121\u6599\u306e\u30c4\u30fc\u30eb\u3067\u3059\u3002 Ollama\u3092\u4f7f\u3048\u3070\u3001DeepSeek-R1\u3084Llama\u306a\u3069\u306e\u4eba\u6c17LLM\u3092\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u52d5&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek-R1\u306e\u65e5\u672c\u8a9e\u30e2\u30c7\u30eb\u3068\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2025\/02\/eyecatch-deepseekr1-japanese-300x169.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseek-r1-japanese.html\">DeepSeek-R1\u306e\u300c\u65e5\u672c\u8a9e\u30e2\u30c7\u30eb\u300d\u3068\u306f\uff1f\u30ed\u30fc\u30ab\u30eb\u3067\u306e\u4f7f\u3044\u65b9\u3092\u89e3\u8aac\uff01<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">\u30b5\u30a4\u30d0\u30fc\u30a8\u30fc\u30b8\u30a7\u30f3\u30c8\u2060\u2060\u304cDeepSeek-R1\u306b\u65e5\u672c\u8a9e\u3067\u8ffd\u52a0\u5b66\u7fd2\u3057\u305f\u30e2\u30c7\u30eb\u3092\u7121\u6599\u3067\u516c\u958b\u3057\u307e\u3057\u305f\u3002 HuggingFace\u3084Ollama\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u3001DeepSeek-R1\u306e\u65e5\u672c\u8a9e\u30e2\u30c7\u30eb\u3092\u30ed\u30fc\u30ab&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<p class=\"is-style-balloon_box2\"><span class=\"swl-format-2\">DeepSeek-R1\u3092\u6d3b\u7528\u3057\u305fRAG\u306e\u69cb\u7bc9\u65b9\u6cd5\u306f\uff1f<\/span><\/p>\n\n\n<div class=\"swell-block-postLink\">\t\t\t<div class=\"p-blogCard -internal\" data-type=\"type1\" data-onclick=\"clickLink\">\n\t\t\t\t<div class=\"p-blogCard__inner\">\n\t\t\t\t\t<span class=\"p-blogCard__caption\">\u3042\u308f\u305b\u3066\u8aad\u307f\u305f\u3044<\/span>\n\t\t\t\t\t<div class=\"p-blogCard__thumb c-postThumb\"><figure class=\"c-postThumb__figure\"><img decoding=\"async\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2025\/02\/eyecatch_deepseekr1_rag-300x157.jpg\" alt=\"\" class=\"c-postThumb__img u-obf-cover\" width=\"320\" height=\"180\"><\/figure><\/div>\t\t\t\t\t<div class=\"p-blogCard__body\">\n\t\t\t\t\t\t<a class=\"p-blogCard__title\" href=\"https:\/\/highreso.jp\/edgehub\/machinelearning\/deepseekr1-rag.html\">DeepSeek-R1\u3067\u300c\u601d\u8003\u3059\u308bRAG\u300d\u3092\u69cb\u7bc9\uff01\u6df1\u3044\u601d\u8003\u3067\u7cbe\u5ea6\u5411\u4e0a<\/a>\n\t\t\t\t\t\t<span class=\"p-blogCard__excerpt\">DeepSeek-R1\u306f\u3001OpenAI o1\u30e2\u30c7\u30eb\u306e\u3088\u3046\u306b\u9ad8\u5ea6\u306a\u63a8\u8ad6\u80fd\u529b\u3092\u6d3b\u304b\u3057\u305f\u300c\u6df1\u3044\u601d\u8003\u30d7\u30ed\u30bb\u30b9\u300d\u3092\u5f37\u307f\u3068\u3057\u3066\u3044\u307e\u3059\u3002 RAG\u306bDeepSeek-R1\u3092\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u6df1\u3044\u601d\u8003\u3092\u6d3b\u304b\u3057\u305f\u7cbe&#8230;<\/span>\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n\n\n<h2 class=\"wp-block-heading\" id=\"index_id8\">\u751f\u6210AI\u30fbLLM\u306e\u30b3\u30b9\u30c8\u3067\u304a\u56f0\u308a\u306a\u3089<\/h2>\n\n\n\n<p>GPU\u306e\u30b9\u30da\u30c3\u30af\u4e0d\u8db3\u3067\u751f\u6210AI\u306e\u958b\u767a\u304c\u601d\u3046\u3088\u3046\u306b\u9032\u307e\u306a\u3044\u3053\u3068\u306f\u3042\u308a\u307e\u305b\u3093\u304b\uff1f<\/p>\n\n\n\n<p>\u305d\u3093\u306a\u3068\u304d\u306b\u306f\u3001<strong><span class=\"swl-format-2\">\u9ad8\u6027\u80fd\u306aGPU\u3092\u30ea\u30fc\u30ba\u30ca\u30d6\u30eb\u306a\u4fa1\u683c\u3067\u4f7f\u3048\u308bGPU\u30af\u30e9\u30a6\u30c9\u30b5\u30fc\u30d3\u30b9\u304c\u304a\u3059\u3059\u3081\u3067\u3059\uff01<\/span><\/strong><\/p>\n\n\n\n<div class=\"p-blogParts post_content\" data-partsID=\"4543\">\n<div class=\"swell-block-capbox cap_box\" data-colset=\"col2\"><div class=\"cap_box_ttl\"><span>GPUSOROBAN<\/span><\/div><div class=\"cap_box_content\">\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"800\" height=\"283\" src=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/gpusorobanpr_1.jpg\" alt=\"GPUSOROBAN\" class=\"wp-image-4552\" srcset=\"https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/gpusorobanpr_1.jpg 800w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/gpusorobanpr_1-300x106.jpg 300w, https:\/\/highreso.jp\/edgehub\/wp-content\/uploads\/2024\/06\/gpusorobanpr_1-768x272.jpg 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>GPUSOROBAN\u306f\u3001<span class=\"swl-format-1\"><span class=\"swl-marker mark_yellow\">\u751f\u6210AI\u30fbLLM\u5411\u3051\u306e\u9ad8\u901fGPU\u3092\u696d\u754c\u6700\u5b89\u7d1a\u306e\u6599\u91d1\u3067\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/span><\/span><\/p>\n\n\n\n<p>\u30a4\u30f3\u30bf\u30fc\u30cd\u30c3\u30c8\u74b0\u5883\u3055\u3048\u3042\u308c\u3070\u3001\u30af\u30e9\u30a6\u30c9\u74b0\u5883\u306eGPU\u30b5\u30fc\u30d0\u30fc\u3092\u3059\u3050\u306b\u5229\u7528\u53ef\u80fd\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u5927\u898f\u6a21\u306a\u8a2d\u5099\u6295\u8cc7\u306e\u5fc5\u8981\u304c\u306a\u304f\u3001\u7169\u96d1\u306a\u30b5\u30fc\u30d0\u30fc\u7ba1\u7406\u304b\u3089\u3082\u89e3\u653e\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"swell-block-columns\"><div class=\"swell-block-columns__inner\">\n<div class=\"swell-block-column swl-has-mb--s\">\n<div class=\"swell-block-button blue_ -size-l is-style-btn_normal\"><a href=\"https:\/\/soroban.highreso.jp\/?utm_medium=edgehub&amp;utm_source=edgehub&amp;utm_campaign=highend_boxa&amp;adid=edgehub\" class=\"swell-block-button__link\"><span>\u516c\u5f0f\u30b5\u30a4\u30c8\u3092\u307f\u308b<\/span><\/a><\/div>\n<\/div>\n\n\n\n<div class=\"swell-block-column swl-has-mb--s\">\n<div class=\"swell-block-button red_ -size-l is-style-btn_normal\"><a href=\"https:\/\/soroban.highreso.jp\/download\/compute-catalog\/?utm_medium=edgehub&amp;utm_source=edgehub&amp;utm_campaign=highend_boxa&amp;adid=edgehub\" class=\"swell-block-button__link\"><span>\u8cc7\u6599\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/span><\/a><\/div>\n<\/div>\n<\/div><\/div>\n<\/div><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>DeepSeek-R1\u306f\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u3067\u4f7f\u7528\u3059\u308c\u3070\u3001\u5916\u90e8\u306b\u30c7\u30fc\u30bf\u304c\u9001\u4fe1\u3055\u308c\u308b\u3053\u3068\u306a\u304f\u3001\u5b89\u5168\u306b\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3067\u3059\u3002 HuggingFace\u3084Ollama\u304b\u3089\u30e2\u30c7\u30eb\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u3001\u30ed\u30fc\u30ab\u30eb\u74b0\u5883\u306bDeepSeek-R1\u3092 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":16936,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[20],"tags":[],"class_list":["post-16504","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-machinelearning"],"_links":{"self":[{"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/posts\/16504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/comments?post=16504"}],"version-history":[{"count":3,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/posts\/16504\/revisions"}],"predecessor-version":[{"id":17196,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/posts\/16504\/revisions\/17196"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/media\/16936"}],"wp:attachment":[{"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/media?parent=16504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/categories?post=16504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/highreso.jp\/edgehub\/wp-json\/wp\/v2\/tags?post=16504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}