{"id":496671,"date":"2026-09-30T08:00:05","date_gmt":"2026-09-30T08:00:05","guid":{"rendered":"https:\/\/savepearlharbor.com\/?p=496671"},"modified":"-0001-11-30T00:00:00","modified_gmt":"2026-09-30T08:00:05","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=496671","title":{"rendered":"\u041a\u0430\u043a \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c Gemma \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435: \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c Ollama \u0438 llama.cpp"},"content":{"rendered":"<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c64\/ca8\/9bb\/c64ca89bbf6962384a8d396f57ca6f71.jpg\" width=\"1560\" height=\"880\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c64\/ca8\/9bb\/c64ca89bbf6962384a8d396f57ca6f71.jpg 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c64\/ca8\/9bb\/c64ca89bbf6962384a8d396f57ca6f71.jpg 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043b\u044e\u0431\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e-\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 LLM, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u0442 Ollama. \u0423\u0432\u0435\u0440\u0435\u043d, \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043d\u0435\u0439 \u0430\u0432\u0442\u043e\u0440\u0443 \u0443\u0436\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043b\u0438, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u043d\u0435\u043f\u0440\u0430\u0432 \u0438 \u0447\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0432\u0435\u0440\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c llama.cpp.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c Gemma 4 \u0438 \u0447\u0435\u0440\u0435\u0437 Ollama, \u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 llama.cpp \u2014 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0432\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e.<\/p>\n<h2>\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u0438<\/h2>\n<p>\u0412 2023 \u0433\u043e\u0434\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c Ollama \u2014 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0437\u0430\u043f\u0443\u0441\u043a \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430. \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 llama.cpp. \u0414\u0430\u043b\u0435\u0435 \u0432 2025 \u0433\u043e\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Ollama \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0434\u043b\u044f \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 GGML. \u041d\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043b\u0438 \u043d\u0430 \u043d\u0435\u0433\u043e. \u0410 \u0432 2026 \u0433\u043e\u0434\u0443 Ollama \u0432\u0435\u0440\u043d\u0443\u043b\u0430\u0441\u044c \u043a llama.cpp \u2014 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 GGUF.<\/p>\n<h2>\u0412\u044b\u0431\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u00a0<\/h2>\n<p>\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e Gemma 4 26B A4B. Gemma 4 \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0442 Google, \u0432\u044b\u0448\u0435\u0434\u0448\u0430\u044f \u0432\u0435\u0441\u043d\u043e\u0439 \u044d\u0442\u043e\u0433\u043e \u0433\u043e\u0434\u0430, \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f (Apache 2.0).\u00a0<\/p>\n<p>\u0411\u0435\u0440\u0435\u043c MoE-\u0432\u0435\u0440\u0441\u0438\u044e \u2014 \u044d\u0442\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u0433\u0434\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u00ab\u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432\u00bb, \u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445. \u0417\u0430 \u0441\u0447\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u0442\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0447\u0430\u0441\u0442\u043e \u0434\u0430\u044e\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u2014 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 26B A4B.\u00a0<\/p>\n<p>\u0412 \u043c\u043e\u0434\u0435\u043b\u0438 26 \u043c\u043b\u0440\u0434 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 4 \u043c\u043b\u0440\u0434 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043e\u0442\u0441\u044e\u0434\u0430 \u0438 A4B \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438. \u0412 Q4-\u043a\u0432\u0430\u043d\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0435\u0441\u0438\u0442 14\u201318 \u0413\u0411, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0435\u0435 \u043d\u0430 RTX 4090 \u0441 24 \u0413\u0411.<\/p>\n<h3>\u0417\u0430\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440<\/h3>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c <a href=\"http:\/\/my.selectel.ru\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=myselectel_article_gemma4_300926_content\">\u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/a>, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c <strong>\u041f\u0440\u043e\u0434\u0443\u043a\u0442\u044b<\/strong> \u2192 <strong>\u041e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b.<\/strong><\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e51\/9ea\/044\/e519ea04417072d9a7348b87be2c1f1f.png\" width=\"1498\" height=\"820\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e51\/9ea\/044\/e519ea04417072d9a7348b87be2c1f1f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e51\/9ea\/044\/e519ea04417072d9a7348b87be2c1f1f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412 \u043f\u043e\u043b\u0435 <strong>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/strong> \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0432\u044b\u0431\u043e\u0440 \u043e\u0431\u0440\u0430\u0437\u0430, \u0441 \u043d\u0438\u043c \u0432 GPU-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0434\u043b\u044f \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7ef\/ecf\/982\/7efecf9822cb1dc26216dd11d4d05f23.png\" width=\"1350\" height=\"132\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/7ef\/ecf\/982\/7efecf9822cb1dc26216dd11d4d05f23.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7ef\/ecf\/982\/7efecf9822cb1dc26216dd11d4d05f23.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 <strong>\u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f<\/strong> \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u043a\u043b\u0430\u0434\u043a\u0443 <strong>GPU<\/strong>.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3e4\/48c\/421\/3e448c421b8674c7ea6b7aa4fc4354a8.png\" width=\"1360\" height=\"318\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/3e4\/48c\/421\/3e448c421b8674c7ea6b7aa4fc4354a8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3e4\/48c\/421\/3e448c421b8674c7ea6b7aa4fc4354a8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412 \u0444\u0438\u043b\u044c\u0442\u0440\u0435 \u043f\u043e \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e RTX 4090.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1b4\/169\/292\/1b41692923475e93cbfb4e11272d0df3.png\" width=\"1544\" height=\"1094\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/1b4\/169\/292\/1b41692923475e93cbfb4e11272d0df3.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1b4\/169\/292\/1b41692923475e93cbfb4e11272d0df3.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0432\u043e\u0439 SSH-\u043a\u043b\u044e\u0447 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (root).<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/175\/fc6\/484\/175fc64849512c66a6520f8e1ca5add6.png\" width=\"1220\" height=\"502\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/175\/fc6\/484\/175fc64849512c66a6520f8e1ca5add6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/175\/fc6\/484\/175fc64849512c66a6520f8e1ca5add6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c <strong>\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440<\/strong>.\u00a0<\/p>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u0442\u0443\u0441 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043d\u0430 \u00ab\u0413\u043e\u0442\u043e\u0432\u00bb, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e SSH \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>nvidia-smi<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:87px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/50a\/2cc\/462\/50a2cc4629a7fceb431da0604e681f78.png\" width=\"1894\" height=\"924\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/50a\/2cc\/462\/50a2cc4629a7fceb431da0604e681f78.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/50a\/2cc\/462\/50a2cc4629a7fceb431da0604e681f78.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<div class=\"floating-image\">\n<figure class=\"float \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dbd\/50d\/bb6\/dbd50dbb6316408a3d20c62b3ced3f3c.gif\" alt=\"\" title=\"\" width=\"200\" height=\"200\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dbd\/50d\/bb6\/dbd50dbb6316408a3d20c62b3ced3f3c.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dbd\/50d\/bb6\/dbd50dbb6316408a3d20c62b3ced3f3c.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><strong>\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0418\u0418\u2011\u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/strong><\/p>\n<p>\u0421\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u00a0\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f LLM\u00a0\u0432\u00a0\u043e\u0431\u043b\u0430\u043a\u0435 Selectel. \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438\u00a0\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0434\u043b\u044f\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0\u043d\u0435\u0439.<\/p>\n<p><a href=\"https:\/\/selectel.ru\/services\/cloud\/foundation-models-catalog\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=fmc_article_gemma4_300926_banner_ord\"><strong>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u2192<\/strong><\/a><\/p>\n<\/div>\n<h2>Ollama<\/h2>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0430\u0435\u043c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432\u0441\u0435 \u0447\u0435\u0440\u0435\u0437 Ollama. \u041f\u043b\u044e\u0441 \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u043f\u0440\u044f\u0447\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u044c \u0432\u0441\u044e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0412\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0438\u043b\u0438 \u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438. \u0412\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 Docker.\u00a0<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Ollama<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:<\/p>\n<pre><code>curl -fsSL https:\/\/ollama.com\/install.sh | sh<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/117\/759\/1fa\/1177591fa5be23b4e356e4e70d1b99ef.png\" width=\"2048\" height=\"585\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/117\/759\/1fa\/1177591fa5be23b4e356e4e70d1b99ef.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/117\/759\/1fa\/1177591fa5be23b4e356e4e70d1b99ef.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441\u0442\u0430\u0442\u0443\u0441:<\/p>\n<pre><code>systemctl status ollama<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c4e\/df0\/63a\/c4edf063a68bcaa32d84458aec8c2388.png\" width=\"1768\" height=\"470\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c4e\/df0\/63a\/c4edf063a68bcaa32d84458aec8c2388.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c4e\/df0\/63a\/c4edf063a68bcaa32d84458aec8c2388.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Ollama \u0431\u0438\u043d\u0434\u0438\u0442\u0441\u044f \u043d\u0430 loopback-\u0430\u0434\u0440\u0435\u0441 127.0.0.1:11434 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>lsof -i :11434<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/23b\/c4d\/c03\/23bc4dc036cf33e9ac7939267df8fa12.png\" width=\"1550\" height=\"146\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/23b\/c4d\/c03\/23bc4dc036cf33e9ac7939267df8fa12.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/23b\/c4d\/c03\/23bc4dc036cf33e9ac7939267df8fa12.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c<\/h3>\n<p>Ollama \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 CLI \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438:<\/p>\n<pre><code>ollama --help # \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044b<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b0d\/5b3\/633\/b0d5b3633d15c2c9245148f9861b1c55.png\" width=\"1410\" height=\"1404\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b0d\/5b3\/633\/b0d5b3633d15c2c9245148f9861b1c55.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b0d\/5b3\/633\/b0d5b3633d15c2c9245148f9861b1c55.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>pull, run, rm, ps \u2014 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043a\u0430\u043a \u0432 Docker.<\/p>\n<p>\u0414\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443: <code>ollama pull &lt;model&gt;<\/code>. \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u043c \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u2014 <code>ollama run &lt;model&gt;<\/code>. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u043c\u0435\u0441\u0442\u043e <code>&lt;model&gt;<\/code> \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<p>\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 Hugging Face \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:<\/p>\n<pre><code>ollama pull hf.co\/ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ff\/76d\/25c\/8ff76d25ce0def2dcdf111951826c4bb.png\" width=\"2048\" height=\"216\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/8ff\/76d\/25c\/8ff76d25ce0def2dcdf111951826c4bb.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ff\/76d\/25c\/8ff76d25ce0def2dcdf111951826c4bb.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c API<\/h3>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u043a Ollama \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043f\u043e HTTP. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439:<\/p>\n<pre><code>curl http:\/\/localhost:11434\/api\/tags<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 JSON \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0441\u043a\u0430\u0447\u0430\u043d\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dab\/344\/4bc\/dab3444bc19f7f235171557ab574dff6.png\" width=\"2048\" height=\"270\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/dab\/344\/4bc\/dab3444bc19f7f235171557ab574dff6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dab\/344\/4bc\/dab3444bc19f7f235171557ab574dff6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \/api\/chat. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Ollama \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0432 streaming-\u0440\u0435\u0436\u0438\u043c\u0435 \u2014 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0447\u0430\u043d\u043a\u0430\u043c\u0438 \u043f\u043e \u043c\u0435\u0440\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c <code>\"stream\": false<\/code>.\u00a0<\/p>\n<p>\u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c:<\/p>\n<pre><code>curl http:\/\/localhost:11434\/api\/chat \\\u00a0\u00a0-H \"Content-Type: application\/json\" \\\u00a0\u00a0-d '{\u00a0\u00a0\u00a0\u00a0\"model\": \"hf.co\/ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0\",\u00a0\u00a0\u00a0\u00a0\"messages\": [\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"role\": \"user\",\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"content\": \"Hello!\"\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\u00a0\u00a0\u00a0\u00a0],\u00a0\u00a0\u00a0\u00a0\"stream\": false\u00a0\u00a0}'<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0432 JSON-\u0444\u043e\u0440\u043c\u0430\u0442\u0435:<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/87d\/5e1\/c86\/87d5e1c863eb6487bd9f983fd5b389d2.png\" width=\"2048\" height=\"741\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/87d\/5e1\/c86\/87d5e1c863eb6487bd9f983fd5b389d2.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/87d\/5e1\/c86\/87d5e1c863eb6487bd9f983fd5b389d2.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435.<\/p>\n<h2>llama.cpp<\/h2>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u0443 \u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 llama.cpp, \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f <a href=\"https:\/\/github.com\/ggml-org\/llama.cpp\/blob\/master\/docs\/build.md?utm_source=chatgpt.com\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438<\/a>.<\/p>\n<h3>\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c llama.cpp<\/h3>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438:<\/p>\n<pre><code>sudo apt updatesudo apt install -y git cmake build-essential libssl-dev<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0421\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c:<\/p>\n<pre><code>git clone https:\/\/github.com\/ggml-org\/llama.cppcd llama.cpp\/<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f CUDA (Compute Unified Device Architecture) \u2014 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043e\u0442 NVIDIA, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0410 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0434 \u043d\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 nvcc \u2014 (NVIDIA CUDA Compiler) \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 CUDA C\/C++ \u043f\u043e\u0434 GPU.<\/p>\n<p>\u0410\u0432\u0442\u043e\u0432\u044b\u0431\u043e\u0440 \u043e\u0431\u0440\u0430\u0437\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0435\u0441\u0442\u044c \u043b\u0438 nvcc:<\/p>\n<pre><code>nvcc --version<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/207\/bb7\/72b\/207bb772b8601c20c8c9f4fc3bef9ceb.png\" width=\"1122\" height=\"180\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/207\/bb7\/72b\/207bb772b8601c20c8c9f4fc3bef9ceb.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/207\/bb7\/72b\/207bb772b8601c20c8c9f4fc3bef9ceb.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u0441\u0442\u0430\u0432\u0438\u043c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:<\/p>\n<pre><code>apt install nvidia-cuda-toolkit\u00a0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0443 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c GGML_CUDA=ON \u2014 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e cmake \u0441\u043e\u0431\u0435\u0440\u0435\u0442 CPU-\u0432\u0435\u0440\u0441\u0438\u044e:<\/p>\n<pre><code>cmake -B build -DGGML_CUDA=ONcmake --build build --config Release -j$(nproc)<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/582\/84a\/0bc\/58284a0bcdb7c333d988245c663a6b60.png\" width=\"1762\" height=\"714\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/582\/84a\/0bc\/58284a0bcdb7c333d988245c663a6b60.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/582\/84a\/0bc\/58284a0bcdb7c333d988245c663a6b60.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e llama.cpp \u0432\u0438\u0434\u0438\u0442 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443:<\/p>\n<pre><code>.\/build\/bin\/llama-server --list-devices<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cee\/b07\/c24\/ceeb07c24aac9354c6166e506227fd22.png\" width=\"1294\" height=\"142\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/cee\/b07\/c24\/ceeb07c24aac9354c6166e506227fd22.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cee\/b07\/c24\/ceeb07c24aac9354c6166e506227fd22.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c<\/h3>\n<p>llama.cpp, \u043a\u0430\u043a \u0438 Ollama, \u0443\u043c\u0435\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 Hugging Face \u0447\u0435\u0440\u0435\u0437 -hf:<\/p>\n<pre><code>.\/build\/bin\/llama-cli -hf ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ab8\/c08\/9cd\/ab8c089cd75b287e8bab31bf750b2a1e.png\" width=\"1734\" height=\"290\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ab8\/c08\/9cd\/ab8c089cd75b287e8bab31bf750b2a1e.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ab8\/c08\/9cd\/ab8c089cd75b287e8bab31bf750b2a1e.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u043f\u043e\u043f\u0430\u0434\u0435\u043c \u0432 CLI-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u043e\u043a\u0430 \u043e\u043d \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u043f\u0438\u0448\u0435\u043c \/exit \u0438 Ctrl+C \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/40d\/868\/d7c\/40d868d7c3d14061e6486eae29729d91.png\" width=\"1720\" height=\"1324\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/40d\/868\/d7c\/40d868d7c3d14061e6486eae29729d91.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/40d\/868\/d7c\/40d868d7c3d14061e6486eae29729d91.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c llama-server<\/h3>\n<p>\u0423 llama.cpp \u0435\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 HTTP API, \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 OpenAI. \u0414\u043b\u044f \u0447\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 Ollama, \u043f\u043e\u043a\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u0432 \u0442\u043e\u043c \u0436\u0435 \u0440\u0435\u0436\u0438\u043c\u0435 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0430 GPU, \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<pre><code>.\/build\/bin\/llama-server \\\u00a0\u00a0-hf ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0 \\\u00a0\u00a0--host 0.0.0.0 \\\u00a0\u00a0--port 8080 \\\u00a0\u00a0--n-gpu-layers all \\\u00a0\u00a0--ctx-size 4096 \\\u00a0\u00a0--parallel 1<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p><code>--n-gpu-layers all<\/code> \u2014 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 GPU \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0435\u0432 \u043c\u043e\u0434\u0435\u043b\u0438. <code>--ctx-size 4096<\/code> \u2014 \u0430 \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0432 4 096 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.\u00a0<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/809\/0a1\/7cd\/8090a17cd3a9b1b7b940b385b681bf82.png\" width=\"2012\" height=\"998\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/809\/0a1\/7cd\/8090a17cd3a9b1b7b940b385b681bf82.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/809\/0a1\/7cd\/8090a17cd3a9b1b7b940b385b681bf82.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h3>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c API<\/h3>\n<pre><code>curl http:\/\/localhost:8080\/v1\/chat\/completions \\\u00a0\u00a0-H \"Content-Type: application\/json\" \\\u00a0\u00a0-d '{\u00a0\u00a0\u00a0\u00a0\"model\": \"gemma-4-26b-a4b\",\u00a0\u00a0\u00a0\u00a0\"messages\": [\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"role\": \"user\",\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"content\": \"Hello!\"\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\u00a0\u00a0\u00a0\u00a0],\u00a0\u00a0\u00a0\u00a0\"stream\": false\u00a0\u00a0}'<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/eeb\/5a2\/0a2\/eeb5a20a2a37e5ae35b3b0d0d0c8034b.png\" width=\"2048\" height=\"649\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/eeb\/5a2\/0a2\/eeb5a20a2a37e5ae35b3b0d0d0c8034b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/eeb\/5a2\/0a2\/eeb5a20a2a37e5ae35b3b0d0d0c8034b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443 \u043d\u0430\u0441 \u0434\u0432\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0432 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u043a\u0432\u0430\u043d\u0442\u0435. \u041c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e.<\/p>\n<h2>\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438<\/h2>\n<p>\u0427\u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\n<p>TTFT (Time To First Token) \u2014 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043e\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u043e\u0442\u0432\u0435\u0442\u0430;<\/p>\n<\/li>\n<li>\n<p>ITL (Inter-Token Latency) \u2014 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438;<\/p>\n<\/li>\n<li>\n<p>Output tokens\/s \u2014 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438;<\/p>\n<\/li>\n<li>\n<p>Request latency \u2014 \u043f\u043e\u043b\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0420\u0443\u0447\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u043e\u0447\u0435\u043d\u044c \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b. \u0410 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c GuideLLM \u2014 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 LLM.\u00a0<\/p>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432 \u043d\u0435\u043c GuideLLM:<\/p>\n<pre><code>apt install -y python3.12-venvpython3 -m venv ~\/llm-venvsource ~\/llm-venv\/bin\/activatepip install -U pippip install 'guidellm[recommended]'<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:<\/p>\n<pre><code>guidellm --version<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/78d\/453\/221\/78d453221ea1d59a51436ab8ce917f92.png\" width=\"908\" height=\"98\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/78d\/453\/221\/78d453221ea1d59a51436ab8ce917f92.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/78d\/453\/221\/78d453221ea1d59a51436ab8ce917f92.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 (\u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443), \u0430 \u043f\u043e\u0442\u043e\u043c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e.<\/p>\n<p>GuideLLM \u0443\u043c\u0435\u0435\u0442 \u0441\u0430\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0437\u043e\u0433\u0440\u0435\u0432\u043e\u0447\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u043d\u0438\u0436\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b prompt_tokens \u0438 output_tokens. \u041e\u043d\u0438 \u0437\u0430\u0434\u0430\u044e\u0442 \u0434\u043b\u0438\u043d\u0443 \u0432\u0445\u043e\u0434\u0430 \u0438 \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.<\/p>\n<p>\u0412 \u0442\u0435\u0441\u0442\u0430\u0445 \u0431\u0443\u0434\u0435\u0442 32K \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u2192 256 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445.<\/p>\n<h3>Ollama<\/h3>\n<p>\u0414\u043b\u044f Ollama \u043d\u0443\u0436\u043d\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 33 792, \u0447\u0435\u0440\u0435\u0437 API \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u2014 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 model alias \u0447\u0435\u0440\u0435\u0437 <a href=\"https:\/\/docs.ollama.com\/modelfile\">Modelfile<\/a>.\u00a0<\/p>\n<pre><code>cat &gt; Modelfile.32k &lt;&lt;'EOF'\u00a0FROM hf.co\/ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0\u00a0PARAMETER num_ctx 33792\u00a0EOF<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u0441\u0430\u043c alias:<\/p>\n<pre><code>ollama create gemma4-q4_0-32k -f Modelfile.32k<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/de0\/447\/f5b\/de0447f5b338d9611a6a268c20bc47a6.png\" width=\"1904\" height=\"438\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/de0\/447\/f5b\/de0447f5b338d9611a6a268c20bc47a6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/de0\/447\/f5b\/de0447f5b338d9611a6a268c20bc47a6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:<\/p>\n<pre><code>ollama show gemma4-q4_0-32k<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/941\/2cc\/12d\/9412cc12d02633cbc4cd80114ad520c7.png\" width=\"894\" height=\"1028\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/941\/2cc\/12d\/9412cc12d02633cbc4cd80114ad520c7.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/941\/2cc\/12d\/9412cc12d02633cbc4cd80114ad520c7.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438: \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u0437\u0430 \u0440\u0430\u0437. \u041a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043a\u043e\u043b\u043e 32K \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0430 \u043e\u0442\u0432\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d 256 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438. \u0412\u0441\u0435\u0433\u043e GuideLLM \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 30 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.<\/p>\n<pre><code>guidellm run \\\u00a0\u00a0--backend '{\"kind\":\"openai_http\",\"target\":\"http:\/\/localhost:11434\",\"model\":\"gemma4-q4_0-32k\",\"request_format\":\"\/v1\/chat\/completions\",\"validate\\_backend\":false,\"extras\":{\"body\":{\"max\\_tokens\":256}}}' \\\u00a0\u00a0--tokenizer kind=huggingface_auto,model=google\/gemma-4-26B-A4B-it \\\u00a0\u00a0--profile kind=synchronous \\\u00a0\u00a0--data kind=synthetic_text,prompt_tokens=32768,output_tokens=256 \\\u00a0\u00a0--constraint kind=max_requests,count=30 \\\u00a0\u00a0--seed kind=static,value=42 \\\u00a0\u00a0--output kind=json,path=ollama-32k-sync.json \\\u00a0\u00a0--output kind=csv,path=ollama-32k-sync.csv \\\u00a0\u00a0--output kind=html,path=ollama-32k-sync.html<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6ed\/70c\/dda\/6ed70cdda1b0bbb1d5bca406c283bb2c.png\" width=\"2048\" height=\"537\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/6ed\/70c\/dda\/6ed70cdda1b0bbb1d5bca406c283bb2c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6ed\/70c\/dda\/6ed70cdda1b0bbb1d5bca406c283bb2c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0412\u0441\u0435 30 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0438\u0441\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u041c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 7,7 \u0441, \u0438\u0437 \u043d\u0438\u0445 \u043e\u043a\u043e\u043b\u043e 5,9 \u0441 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430. \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0447\u0430\u043b\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 6,9 \u043c\u0441. \u0421\u0435\u0440\u0432\u0435\u0440 \u0432\u044b\u0434\u0430\u0432\u0430\u043b \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c 34,1 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443.<\/p>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c 32K \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0430 \u043e\u043a\u043e\u043b\u043e 16,7 \u0413\u0411 VRAM.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/065\/626\/20f\/06562620f1ba77b9e2b2a4a49adb5ba8.png\" width=\"1130\" height=\"606\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/065\/626\/20f\/06562620f1ba77b9e2b2a4a49adb5ba8.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/065\/626\/20f\/06562620f1ba77b9e2b2a4a49adb5ba8.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>Text Metrics \u0438 Request Token \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 \u0436\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0438\u0445. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0445\u043e\u0434\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043e\u043a\u043e\u043b\u043e 32 800 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0432\u044b\u0445\u043e\u0434\u0430 \u2014 256 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/479\/0d0\/066\/4790d0066da574210502fd10adf9d960.png\" width=\"2048\" height=\"551\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/479\/0d0\/066\/4790d0066da574210502fd10adf9d960.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/479\/0d0\/066\/4790d0066da574210502fd10adf9d960.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041d\u0430 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c 32 784 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0438 256 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0432\u0441\u0435\u0433\u043e 33 040 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/099\/5f6\/347\/0995f6347dfe7c50130f34ece786bfe5.png\" width=\"1968\" height=\"372\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/099\/5f6\/347\/0995f6347dfe7c50130f34ece786bfe5.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/099\/5f6\/347\/0995f6347dfe7c50130f34ece786bfe5.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>Request Sec Mdn \u2014 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 7,7 \u0441. \u043f\u0435\u0440\u0432\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0447\u0435\u0440\u0435\u0437 5,9 \u0441, \u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0430 \u043e\u043a\u043e\u043b\u043e 6,9 \u043c\u0441.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6f2\/bc5\/8db\/6f2bc58db35ce0c97ed5292f1fc3a78b.png\" width=\"1638\" height=\"384\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/6f2\/bc5\/8db\/6f2bc58db35ce0c97ed5292f1fc3a78b.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/6f2\/bc5\/8db\/6f2bc58db35ce0c97ed5292f1fc3a78b.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u043e\u043a\u043e\u043b\u043e 0,1 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 4 403 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441 \u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u043b \u043e\u043a\u043e\u043b\u043e 34,1 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/853\/410\/0d8\/8534100d84e8364e598a0bcac8ef812f.png\" width=\"1604\" height=\"372\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/853\/410\/0d8\/8534100d84e8364e598a0bcac8ef812f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/853\/410\/0d8\/8534100d84e8364e598a0bcac8ef812f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Ollama \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0427\u0442\u043e\u0431\u044b \u0434\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 OLLAMA_NUM_PARALLEL \u0434\u043e 2.<\/p>\n<pre><code>systemctl edit ollama<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0414\u043e\u0431\u0430\u0432\u0438\u043c:<\/p>\n<pre><code>[Service]Environment=\"OLLAMA_NUM_PARALLEL=2\"<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/386\/1ce\/8d8\/3861ce8d892599754279f70173800f24.png\" width=\"2048\" height=\"667\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/386\/1ce\/8d8\/3861ce8d892599754279f70173800f24.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/386\/1ce\/8d8\/3861ce8d892599754279f70173800f24.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Ollama:<\/p>\n<pre><code>systemctl daemon-reloadsystemctl restart ollama<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u043e\u0442 \u0436\u0435 \u0442\u0435\u0441\u0442, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0441 \u0434\u0432\u0443\u043c\u044f \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u043c\u0438:<\/p>\n<pre><code>guidellm run \\ --backend '{\"kind\":\"openai_http\",\"target\":\"http:\/\/localhost:11434\",\"model\":\"gemma4-q4_0-32k\",\"request_format\":\"\/v1\/chat\/completions\",\"validate_backend\":false,\"extras\":{\"body\":{\"max_tokens\":256}}}' \\ --tokenizer kind=huggingface_auto,model=google\/gemma-4-26B-A4B-it \\ --profile kind=concurrent,streams=2 \\ --data kind=synthetic_text,prompt_tokens=32768,output_tokens=256 \\ --constraint kind=max_requests,count=30 \\ --seed kind=static,value=42 \\ --output kind=json,path=ollama-32k-concurrent-2.json \\ --output kind=csv,path=ollama-32k-concurrent-2.csv \\ --output kind=html,path=ollama-32k-concurrent-2.html<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438 \u0434\u0432\u0443\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u0430\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u043e\u043a\u043e\u043b\u043e 14 \u0441\u0435\u043a\u0443\u043d\u0434, TTFT \u2014 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 10,3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/774\/52a\/29d\/77452a29da1a1ce9862a6984ac3ad297.png\" width=\"2048\" height=\"566\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/774\/52a\/29d\/77452a29da1a1ce9862a6984ac3ad297.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/774\/52a\/29d\/77452a29da1a1ce9862a6984ac3ad297.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a4e\/5e6\/3d4\/a4e5e63d4b27cb95fd74d967431224ef.png\" width=\"1888\" height=\"394\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/a4e\/5e6\/3d4\/a4e5e63d4b27cb95fd74d967431224ef.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a4e\/5e6\/3d4\/a4e5e63d4b27cb95fd74d967431224ef.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/380\/3b7\/bc3\/3803b7bc34bd6673057d7cc864638b1d.png\" width=\"1740\" height=\"396\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/380\/3b7\/bc3\/3803b7bc34bd6673057d7cc864638b1d.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/380\/3b7\/bc3\/3803b7bc34bd6673057d7cc864638b1d.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u0449\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438\u00a0 \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u0443\u043c\u0435\u0440\u0435\u043d\u043d\u043e \u2014 \u043e\u043a\u043e\u043b\u043e 37,5 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441 \u0438 4 852 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432\/\u0441. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430 throughput, \u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0443\u0445\u0443\u0434\u0448\u0438\u043b\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 17,4 \u0413\u0411 VRAM.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ec\/cee\/e4d\/8ecceee4d88fea81f8f79a20e6b70647.png\" width=\"1838\" height=\"928\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/8ec\/cee\/e4d\/8ecceee4d88fea81f8f79a20e6b70647.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8ec\/cee\/e4d\/8ecceee4d88fea81f8f79a20e6b70647.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0434\u043b\u044f \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432: \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u0432\u044b\u0440\u043e\u0441\u043b\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0434\u043e 28,3 \u0441, TTFT \u2014 \u0434\u043e 11 \u0441, \u0430 \u043e\u0431\u0449\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 \u043e\u043a\u043e\u043b\u043e 36,8 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e3f\/9c4\/c26\/e3f9c4c26975cee8597388874169bf72.png\" width=\"2048\" height=\"534\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/e3f\/9c4\/c26\/e3f9c4c26975cee8597388874169bf72.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e3f\/9c4\/c26\/e3f9c4c26975cee8597388874169bf72.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/945\/8e7\/2cf\/9458e72cf0fe47757d79ef93811301a0.png\" width=\"1914\" height=\"380\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/945\/8e7\/2cf\/9458e72cf0fe47757d79ef93811301a0.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/945\/8e7\/2cf\/9458e72cf0fe47757d79ef93811301a0.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/845\/c65\/d20\/845c65d20cdc8c2be3e05538b7408e28.png\" width=\"1746\" height=\"418\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/845\/c65\/d20\/845c65d20cdc8c2be3e05538b7408e28.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/845\/c65\/d20\/845c65d20cdc8c2be3e05538b7408e28.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c throughput \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0435\u0440\u0435\u0441\u0442\u0430\u043b \u0440\u0430\u0441\u0442\u0438, \u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043b\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f. \u041f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 19,3 \u0413\u0411.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7bc\/ccd\/dc1\/7bcccddc1ab27eae13061a28794bdb4f.png\" width=\"1840\" height=\"926\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/7bc\/ccd\/dc1\/7bcccddc1ab27eae13061a28794bdb4f.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/7bc\/ccd\/dc1\/7bcccddc1ab27eae13061a28794bdb4f.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0432 Ollama, \u0447\u0442\u043e\u0431\u044b \u043e\u043d\u0430 \u043e\u0441\u0432\u043e\u0431\u043e\u0434\u0438\u043b\u0430 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u044c:<\/p>\n<pre><code>ollama stop gemma4-q4_0-32k<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<h3>llama.cpp<\/h3>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c llama-server \u0441 \u0442\u0435\u043c \u0436\u0435 GGUF \u0438\u00a0 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 32K:<\/p>\n<pre><code>.\/build\/bin\/llama-server \\\u00a0\u00a0-hf ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0 \\\u00a0\u00a0--host 127.0.0.1 \\\u00a0\u00a0--port 8080 \\\u00a0\u00a0--n-gpu-layers all \\\u00a0\u00a0--ctx-size 33792 \\\u00a0\u00a0--parallel 1<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0418 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0442\u0435\u0441\u0442 \u2014 30 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432, 32K \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0438 256 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445:<\/p>\n<pre><code>guidellm run \\\u00a0\u00a0--backend kind=openai_http,target=http:\/\/localhost:8080,request_format=\/v1\/chat\/completions,validate\\_backend=false \\\u00a0\u00a0--tokenizer kind=huggingface_auto,model=google\/gemma-4-26B-A4B-it \\\u00a0\u00a0--profile kind=synchronous \\\u00a0\u00a0--data kind=synthetic_text,prompt_tokens=32768,output_tokens=256 \\\u00a0\u00a0--constraint kind=max_requests,count=30 \\\u00a0\u00a0--seed kind=static,value=42 \\\u00a0\u00a0--output kind=json,path=llamacpp-32k-sync.json \\\u00a0\u00a0--output kind=csv,path=llamacpp-32k-sync.csv \\\u00a0\u00a0--output kind=html,path=llamacpp-32k-sync.html<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 7,5 \u0441, TTFT \u2014 \u043e\u043a\u043e\u043b\u043e 5,7 \u0441, \u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u2014 6,9 \u043c\u0441. \u0421\u0435\u0440\u0432\u0435\u0440 \u0432\u044b\u0434\u0430\u0432\u0430\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 35,2 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441 \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u043e\u043a\u043e\u043b\u043e 4 541 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ca4\/0f8\/2ec\/ca40f82ecc58722d734e4b530ec63fc1.png\" width=\"2048\" height=\"665\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ca4\/0f8\/2ec\/ca40f82ecc58722d734e4b530ec63fc1.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ca4\/0f8\/2ec\/ca40f82ecc58722d734e4b530ec63fc1.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4d3\/7a0\/7e4\/4d37a07e4eac397063738414736b4e83.png\" width=\"1884\" height=\"400\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4d3\/7a0\/7e4\/4d37a07e4eac397063738414736b4e83.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4d3\/7a0\/7e4\/4d37a07e4eac397063738414736b4e83.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ac9\/760\/ddd\/ac9760ddd9f7979cd96d5008a4563fe6.png\" width=\"1784\" height=\"398\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/ac9\/760\/ddd\/ac9760ddd9f7979cd96d5008a4563fe6.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ac9\/760\/ddd\/ac9760ddd9f7979cd96d5008a4563fe6.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u043e \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u2014 16,4 \u0413\u0411 VRAM. \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0430 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432:<\/p>\n<pre><code>.\/build\/bin\/llama-server \\\u00a0\u00a0-hf ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0 \\\u00a0\u00a0--host 127.0.0.1 \\\u00a0\u00a0--port 8080 \\\u00a0\u00a0--n-gpu-layers all \\\u00a0\u00a0--parallel 2 \\\u00a0\u00a0--kv-unified-per-slot 33792<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u0435\u0441\u0442 \u043d\u0430 \u0434\u0432\u0430 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<pre><code>guidellm run \\\u00a0\u00a0--backend kind=openai_http,target=http:\/\/localhost:8080,request_format=\/v1\/chat\/completions,validate_backend=false \\\u00a0\u00a0--tokenizer kind=huggingface_auto,model=google\/gemma-4-26B-A4B-it \\\u00a0\u00a0--profile kind=concurrent,streams=2 \\\u00a0\u00a0--data kind=synthetic_text,prompt_tokens=32768,output_tokens=256 \\\u00a0\u00a0--constraint kind=max_requests,count=30 \\\u00a0\u00a0--seed kind=static,value=42 \\\u00a0\u00a0--output kind=json,path=llamacpp-32k-concurrent-2.json \\\u00a0\u00a0--output kind=csv,path=llamacpp-32k-concurrent-2.csv \\\u00a0\u00a0--output kind=html,path=llamacpp-32k-concurrent-2.html<\/code><div class=\"code-explainer\"><a href=\"https:\/\/sourcecraft.dev\/\" class=\"tm-button code-explainer__link\" style=\"visibility: hidden;\"><img style=\"width:14px;height:14px;object-fit:cover;object-position:left;\"\/><\/a><\/div><\/pre>\n<p>\u041f\u0440\u0438 \u0434\u0432\u0443\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0440\u043e\u0441\u043b\u043e \u0434\u043e 13,9 \u0441, TTFT \u2014 \u0434\u043e 10,3 \u0441, \u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u2014 \u0434\u043e 24,3 \u043c\u0441.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4f6\/e91\/49f\/4f6e9149f43f64cefcd89d8987dcb7d3.png\" width=\"2048\" height=\"496\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/4f6\/e91\/49f\/4f6e9149f43f64cefcd89d8987dcb7d3.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/4f6\/e91\/49f\/4f6e9149f43f64cefcd89d8987dcb7d3.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c50\/313\/38f\/c5031338fcf9a9c30ae91c607679ada7.png\" width=\"1886\" height=\"392\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/c50\/313\/38f\/c5031338fcf9a9c30ae91c607679ada7.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c50\/313\/38f\/c5031338fcf9a9c30ae91c607679ada7.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8a9\/d2b\/6ec\/8a9d2b6ecd918423ab7190f41a0c32e0.png\" width=\"1740\" height=\"392\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/8a9\/d2b\/6ec\/8a9d2b6ecd918423ab7190f41a0c32e0.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8a9\/d2b\/6ec\/8a9d2b6ecd918423ab7190f41a0c32e0.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u0449\u0430\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c \u0434\u043e 38,3 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 4 966 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432\/\u0441. \u0422\u043e \u0435\u0441\u0442\u044c, \u043a\u0430\u043a \u0438 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 Ollama, \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u043e\u0432\u044b\u0441\u0438\u043b\u0430 throughput, \u043d\u043e \u0437\u0430\u043c\u0435\u0442\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043f\u0430\u043c\u044f\u0442\u0438 \u0432\u044b\u0440\u043e\u0441\u043b\u043e \u0434\u043e 17,4 \u0413\u0411 VRAM.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/15f\/466\/064\/15f466064beffb6d81ef9b34691531b1.png\" width=\"1846\" height=\"984\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/15f\/466\/064\/15f466064beffb6d81ef9b34691531b1.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/15f\/466\/064\/15f466064beffb6d81ef9b34691531b1.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0434\u043b\u044f \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432. \u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c llama-server, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432 &#8212;parallel \u0434\u043e 4, \u0430 \u0432 GuideLLM \u0443\u043a\u0430\u0436\u0435\u043c streams=4.<\/p>\n<p>\u041f\u0440\u0438 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u0430\u0445 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u044b\u0440\u043e\u0441\u043b\u043e \u0434\u043e 27 \u0441, TTFT \u2014 \u0434\u043e 11,3 \u0441, \u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u2014 \u0434\u043e 62,2 \u043c\u0441.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b91\/d56\/9a2\/b91d569a2426b17d434388453fa8de36.png\" width=\"1802\" height=\"1752\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/b91\/d56\/9a2\/b91d569a2426b17d434388453fa8de36.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b91\/d56\/9a2\/b91d569a2426b17d434388453fa8de36.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043e\u0431\u0449\u0430\u044f \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043d\u0430\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b\u0430\u0441\u044c \u043b\u0438\u0448\u044c \u0434\u043e 39,6 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441 \u0438 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 5 145 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432\/\u0441. \u0422\u043e \u0435\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u0441 \u0434\u0432\u0443\u0445 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435 \u0434\u0430\u043b \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 throughput, \u043d\u043e \u043f\u043e\u0447\u0442\u0438 \u0432\u0434\u0432\u043e\u0435 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u043b \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0443 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430. \u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 VRAM \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432\u044b\u0440\u043e\u0441\u043b\u043e \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0434\u043e 19,3 \u0413\u0411.<\/p>\n<figure class=\"full-width \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bd1\/9d3\/f86\/bd19d3f860237366532bb8967f58b119.png\" width=\"1846\" height=\"882\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/bd1\/9d3\/f86\/bd19d3f860237366532bb8967f58b119.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/bd1\/9d3\/f86\/bd19d3f860237366532bb8967f58b119.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<h2>\u0412\u044b\u0432\u043e\u0434\u044b<\/h2>\n<div>\n<div class=\"table\">\n<table>\n<tbody>\n<tr>\n<td>\n<p align=\"left\">Backend<\/p>\n<\/td>\n<td>\n<p align=\"left\">Concurrency<\/p>\n<\/td>\n<td>\n<p align=\"left\">Latency<\/p>\n<\/td>\n<td>\n<p align=\"left\">TTFT<\/p>\n<\/td>\n<td>\n<p align=\"left\">ITL<\/p>\n<\/td>\n<td>\n<p align=\"left\">Output tok\/s<\/p>\n<\/td>\n<td>\n<p align=\"left\">Input tok\/s<\/p>\n<\/td>\n<td>\n<p align=\"left\">VRAM<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Ollama<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">7,7 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">5,93 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">6,9 \u043c\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">34,1<\/p>\n<\/td>\n<td>\n<p align=\"left\">4 403<\/p>\n<\/td>\n<td>\n<p align=\"left\">~16,7 \u0413\u0411<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">llama.cpp<\/p>\n<\/td>\n<td>\n<p align=\"left\">1<\/p>\n<\/td>\n<td>\n<p align=\"left\">7,5 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">5,73 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">6,9 \u043c\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">35,2<\/p>\n<\/td>\n<td>\n<p align=\"left\">4 541<\/p>\n<\/td>\n<td>\n<p align=\"left\">~16,5 \u0413\u0411<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Ollama<\/p>\n<\/td>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">14,1 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">10,28 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">27,8 \u043c\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">37,5<\/p>\n<\/td>\n<td>\n<p align=\"left\">4 852<\/p>\n<\/td>\n<td>\n<p align=\"left\">~17,4 \u0413\u0411<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">llama.cpp<\/p>\n<\/td>\n<td>\n<p align=\"left\">2<\/p>\n<\/td>\n<td>\n<p align=\"left\">13,9 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">10,27 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">24,3 \u043c\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">38,3<\/p>\n<\/td>\n<td>\n<p align=\"left\">4 966<\/p>\n<\/td>\n<td>\n<p align=\"left\">~17,4 \u0413\u0411<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">Ollama<\/p>\n<\/td>\n<td>\n<p align=\"left\">4<\/p>\n<\/td>\n<td>\n<p align=\"left\">28,8 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">11,43 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">68,2 \u043c\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">36,8<\/p>\n<\/td>\n<td>\n<p align=\"left\">4 769<\/p>\n<\/td>\n<td>\n<p align=\"left\">~19,3 \u0413\u0411<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td>\n<p align=\"left\">llama.cpp<\/p>\n<\/td>\n<td>\n<p align=\"left\">4<\/p>\n<\/td>\n<td>\n<p align=\"left\">27,0 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">11,30 \u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">62,2 \u043c\u0441<\/p>\n<\/td>\n<td>\n<p align=\"left\">39,6<\/p>\n<\/td>\n<td>\n<p align=\"left\">5 145<\/p>\n<\/td>\n<td>\n<p align=\"left\">~19,3 \u0413\u0411<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<p>Ollama \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u043d\u0430\u043a\u043b\u0430\u0434\u043d\u044b\u0435 \u0440\u0430\u0441\u0445\u043e\u0434\u044b, \u043d\u043e \u0432 \u043d\u0430\u0448\u0438\u0445 \u0442\u0435\u0441\u0442\u0430\u0445 \u043e\u043d\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0435 \u0442\u0430\u043a\u0438\u043c\u0438 \u0434\u0440\u0430\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438. \u041d\u0430 \u043e\u0434\u043d\u043e\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u0430 \u043c\u0435\u0436\u0434\u0443 Ollama \u0438 llama.cpp \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430, \u043d\u043e \u0441 \u0440\u043e\u0441\u0442\u043e\u043c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438 llama.cpp \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043e\u0442\u0440\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e throughput \u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430\u043c \u043f\u0440\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0438 \u0432\u0438\u0434\u0435\u043e\u043f\u0430\u043c\u044f\u0442\u0438.<\/p>\n<p>\u0417\u0430 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 CLI, \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438 \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u043c\u044b \u043f\u043b\u0430\u0442\u0438\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c\u0438 \u043f\u0440\u043e\u0446\u0435\u043d\u0442\u0430\u043c\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435, \u0447\u0442\u043e \u043d\u0430\u043f\u0440\u044f\u0433\u0430\u0435\u0442 \u0432 Ollama \u2014 \u044d\u0442\u043e \u0434\u043e\u043b\u0433\u0438\u0439 \u0445\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0441\u0442\u0430\u0440\u0442 \u043f\u043e\u0441\u043b\u0435 \u0432\u044b\u0433\u0440\u0443\u0437\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0437 \u043f\u0430\u043c\u044f\u0442\u0438, \u043d\u043e \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c. \u0414\u0430, llama.cpp \u043c\u044b \u0442\u043e\u0436\u0435 \u043d\u0438\u043a\u0430\u043a \u043d\u0435 \u0442\u044e\u043d\u0438\u043b\u0438, \u0445\u043e\u0442\u0435\u043b\u043e\u0441\u044c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c, \u0447\u0442\u043e \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f, \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u044b \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c LLM \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043d\u0430 CPU \u0438\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0433\u0438\u0431\u043a\u043e\u0441\u0442\u0438, \u0435\u0441\u0442\u044c \u0441\u043c\u044b\u0441\u043b \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043e\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u0438 \u0432\u044b\u0431\u0440\u0430\u0442\u044c llama.cpp<\/p>\n<div class=\"floating-image\">\n<figure class=\"float \"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dbd\/50d\/bb6\/dbd50dbb6316408a3d20c62b3ced3f3c.gif\" alt=\"\" title=\"\" width=\"200\" height=\"200\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dbd\/50d\/bb6\/dbd50dbb6316408a3d20c62b3ced3f3c.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dbd\/50d\/bb6\/dbd50dbb6316408a3d20c62b3ced3f3c.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><strong>\u0418\u0418\u2011\u0440\u043e\u0443\u0442\u0435\u0440\u00a0\u2014 \u0434\u043e\u0441\u0442\u0443\u043f \u043a 300+ \u043c\u043e\u0434\u0435\u043b\u044f\u043c \u0438\u0437\u00a0\u043e\u0434\u043d\u043e\u0439 \u043f\u0430\u043d\u0435\u043b\u0438<\/strong><\/p>\n<p>\u041f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u0435 OpenAI\u2011\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0448\u043b\u044e\u0437 \u043f\u043e\u00a0\u0435\u0434\u0438\u043d\u043e\u043c\u0443 API\u2011\u043a\u043b\u044e\u0447\u0443. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0439\u0442\u0435 \u0441\u043a\u0432\u043e\u0437\u043d\u0443\u044e \u0430\u043d\u0430\u043b\u0438\u0442\u0438\u043a\u0443, \u043e\u0442\u0441\u043b\u0435\u0436\u0438\u0432\u0430\u0439\u0442\u0435\u00a0\u043b\u0438\u043c\u0438\u0442\u044b \u0438 \u043a\u0432\u043e\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b.<\/p>\n<p><a href=\"https:\/\/promo.selectel.ru\/ai-router\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=airouter_article_gemma4_300926_banner_ord\"><strong>\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0418\u0418\u2011\u0440\u043e\u0443\u0442\u0435\u0440\u00a0\u2192<\/strong><\/a><\/p>\n<\/div>\n<\/div>\n<p>\u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/1088372\/\">https:\/\/habr.com\/ru\/articles\/1088372\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u041e\u0442\u043a\u0440\u043e\u0439\u0442\u0435 \u043b\u044e\u0431\u0443\u044e \u0441\u0442\u0430\u0442\u044c\u044e-\u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044e \u043f\u043e \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0435 LLM, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0444\u0438\u0433\u0443\u0440\u0438\u0440\u0443\u0435\u0442 Ollama. \u0423\u0432\u0435\u0440\u0435\u043d, \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043a \u043d\u0435\u0439 \u0430\u0432\u0442\u043e\u0440\u0443 \u0443\u0436\u0435 \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u043b\u0438, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u043d \u043d\u0435\u043f\u0440\u0430\u0432 \u0438 \u0447\u0442\u043e \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0432\u0435\u0440\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2014 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c llama.cpp.\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c Gemma 4 \u0438 \u0447\u0435\u0440\u0435\u0437 Ollama, \u0438 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0447\u0435\u0440\u0435\u0437 llama.cpp \u2014 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0432\u043e \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e.\u041d\u0435\u043c\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u044b\u0441\u0442\u043e\u0440\u0438\u0438\u0412 2023 \u0433\u043e\u0434\u0443 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c Ollama \u2014 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u043b\u0430 \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0437\u0430\u043f\u0443\u0441\u043a \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430. \u041f\u043e\u0434 \u043a\u0430\u043f\u043e\u0442\u043e\u043c \u043e\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 llama.cpp. \u0414\u0430\u043b\u0435\u0435 \u0432 2025 \u0433\u043e\u0434\u0443 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 Ollama \u043d\u0430\u043f\u0438\u0441\u0430\u043b\u0438 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u0432\u0438\u0436\u043e\u043a, \u0432 \u0442\u043e\u043c \u0447\u0438\u0441\u043b\u0435 \u0434\u043b\u044f \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0439 \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0441 GGML. \u041d\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u043b\u0438 \u043d\u0430 \u043d\u0435\u0433\u043e. \u0410 \u0432 2026 \u0433\u043e\u0434\u0443 Ollama \u0432\u0435\u0440\u043d\u0443\u043b\u0430\u0441\u044c \u043a llama.cpp \u2014 \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0444\u0430\u0439\u043b\u0430\u043c\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0444\u043e\u0440\u043c\u0430\u0442\u0430 GGUF.\u0412\u044b\u0431\u043e\u0440 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0437\u0430\u043f\u0443\u0441\u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0430\u00a0\u0414\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043a\u0432\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0443\u044e Gemma 4 26B A4B. Gemma 4 \u2014 \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0442 Google, \u0432\u044b\u0448\u0435\u0434\u0448\u0430\u044f \u0432\u0435\u0441\u043d\u043e\u0439 \u044d\u0442\u043e\u0433\u043e \u0433\u043e\u0434\u0430, \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0442\u043a\u0440\u044b\u0442\u0430\u044f (Apache 2.0).\u00a0\u0411\u0435\u0440\u0435\u043c MoE-\u0432\u0435\u0440\u0441\u0438\u044e \u2014 \u044d\u0442\u043e \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430, \u0433\u0434\u0435 \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u00ab\u044d\u043a\u0441\u043f\u0435\u0440\u0442\u043e\u0432\u00bb, \u043d\u043e \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u0438\u0437 \u043d\u0438\u0445. \u0417\u0430 \u0441\u0447\u0435\u0442 \u044d\u0442\u043e\u0433\u043e \u0442\u0430\u043a\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0447\u0430\u0441\u0442\u043e \u0434\u0430\u044e\u0442 \u0445\u043e\u0440\u043e\u0448\u0438\u0439 \u0431\u0430\u043b\u0430\u043d\u0441 \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043e\u0442\u0432\u0435\u0442\u0430 \u0438 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u043c \u0440\u0435\u0441\u0443\u0440\u0441\u043e\u0432 \u2014 \u0434\u043b\u044f \u0432\u0435\u0440\u0441\u0438\u0438 26B A4B.\u00a0\u0412 \u043c\u043e\u0434\u0435\u043b\u0438 26 \u043c\u043b\u0440\u0434 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u0434\u043b\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 4 \u043c\u043b\u0440\u0434 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432, \u043e\u0442\u0441\u044e\u0434\u0430 \u0438 A4B \u0432 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0438. \u0412 Q4-\u043a\u0432\u0430\u043d\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u0435\u0441\u0438\u0442 14\u201318 \u0413\u0411, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u0435\u0435 \u043d\u0430 RTX 4090 \u0441 24 \u0413\u0411.\u0417\u0430\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0441\u0435\u0440\u0432\u0435\u0440\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0440\u0430\u0437\u0432\u0435\u0440\u043d\u0435\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u043c\u0430\u0448\u0438\u043d\u0443 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u043f\u0430\u043d\u0435\u043b\u044c \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f, \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u041f\u0440\u043e\u0434\u0443\u043a\u0442\u044b \u2192 \u041e\u0431\u043b\u0430\u0447\u043d\u044b\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u044b.\u0412 \u043f\u043e\u043b\u0435 \u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u043c \u0430\u0432\u0442\u043e\u0432\u044b\u0431\u043e\u0440 \u043e\u0431\u0440\u0430\u0437\u0430, \u0441 \u043d\u0438\u043c \u0432 GPU-\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u044b \u0434\u043b\u044f \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b.\u0412 \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u041a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u0432\u043a\u043b\u0430\u0434\u043a\u0443 GPU.\u0412 \u0444\u0438\u043b\u044c\u0442\u0440\u0435 \u043f\u043e \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0430\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0443\u0436\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c. \u041a\u0430\u043a \u044f \u0443\u0436\u0435 \u0433\u043e\u0432\u043e\u0440\u0438\u043b, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e RTX 4090.\u0412 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u0445 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0432\u043e\u0439 SSH-\u043a\u043b\u044e\u0447 \u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u043c \u043f\u0430\u0440\u043e\u043b\u044c \u0441\u0443\u043f\u0435\u0440\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (root).\u041d\u0430\u0436\u0438\u043c\u0430\u0435\u043c \u0421\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440.\u00a0\u041a\u043e\u0433\u0434\u0430 \u0441\u0442\u0430\u0442\u0443\u0441 \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u0441\u044f \u043d\u0430 \u00ab\u0413\u043e\u0442\u043e\u0432\u00bb, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0430\u0435\u043c\u0441\u044f \u043a \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u043f\u043e SSH \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e\u0441\u0442\u044c \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:nvidia-smi\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u0418\u0418\u2011\u043c\u043e\u0434\u0435\u043b\u0435\u0439\u0421\u0435\u0440\u0432\u0438\u0441 \u0434\u043b\u044f\u00a0\u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u00a0\u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f LLM\u00a0\u0432\u00a0\u043e\u0431\u043b\u0430\u043a\u0435 Selectel. \u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043c\u043e\u0434\u0435\u043b\u044c, \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0438\u00a0\u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u044d\u043d\u0434\u043f\u043e\u0438\u043d\u0442 \u0434\u043b\u044f\u00a0\u0440\u0430\u0431\u043e\u0442\u044b \u0441\u00a0\u043d\u0435\u0439.\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u2192Ollama\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043a\u0430\u0447\u0430\u0435\u043c \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432\u0441\u0435 \u0447\u0435\u0440\u0435\u0437 Ollama. \u041f\u043b\u044e\u0441 \u044d\u0442\u043e\u0433\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d \u043f\u0440\u044f\u0447\u0435\u0442 \u0432\u043d\u0443\u0442\u0440\u044c \u0432\u0441\u044e \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c. \u0412\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0434 \u0438\u043b\u0438 \u0432\u043e\u0437\u0438\u0442\u044c\u0441\u044f \u0441 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044f\u043c\u0438. \u0412\u0435\u0441\u044c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 Docker.\u00a0\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c Ollama\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u043a\u0440\u0438\u043f\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:curl -fsSL https:\/\/ollama.com\/install.sh | sh\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0441\u0442\u0430\u0442\u0443\u0441:systemctl status ollama\u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Ollama \u0431\u0438\u043d\u0434\u0438\u0442\u0441\u044f \u043d\u0430 loopback-\u0430\u0434\u0440\u0435\u0441 127.0.0.1:11434 \u0438 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e \u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f, \u043c\u043e\u0436\u043d\u043e \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:lsof -i :11434\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044cOllama \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 CLI \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0435\u043b\u044f\u043c\u0438:ollama &#8212;help # \u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a\u0438\u0435 \u0435\u0441\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u044bpull, run, rm, ps \u2014 \u043f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043a\u0430\u043a \u0432 Docker.\u0414\u043b\u044f \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043a\u043e\u043c\u0430\u043d\u0434\u0443: ollama pull &lt;model&gt;. \u0415\u0441\u043b\u0438 \u0445\u043e\u0442\u0438\u043c \u0441\u043a\u0430\u0447\u0430\u0442\u044c \u0438 \u0441\u0440\u0430\u0437\u0443 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u2014 ollama run &lt;model&gt;. \u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u0432 \u043e\u0431\u043e\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u043c\u0435\u0441\u0442\u043e &lt;model&gt; \u043f\u0438\u0448\u0435\u043c \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c.\u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 Hugging Face \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439:ollama pull hf.co\/ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c API\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u043a Ollama \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c\u0441\u044f \u043f\u043e HTTP. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439:curl http:\/\/localhost:11434\/api\/tags\u0415\u0441\u043b\u0438 \u0432\u0441\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u043e \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u0432 \u043e\u0442\u0432\u0435\u0442\u0435 \u0431\u0443\u0434\u0435\u0442 JSON \u0441\u043e \u0441\u043f\u0438\u0441\u043a\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0443\u0436\u0435 \u0441\u043a\u0430\u0447\u0430\u043d\u044b \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440:\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u043f\u0440\u0430\u0432\u0438\u043c \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0432 \/api\/chat. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Ollama \u043c\u043e\u0436\u0435\u0442 \u043e\u0442\u0434\u0430\u0432\u0430\u0442\u044c \u043e\u0442\u0432\u0435\u0442 \u0432 streaming-\u0440\u0435\u0436\u0438\u043c\u0435 \u2014 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0447\u0430\u043d\u043a\u0430\u043c\u0438 \u043f\u043e \u043c\u0435\u0440\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438. \u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u0433\u043e\u0442\u043e\u0432\u044b\u0439 \u043e\u0442\u0432\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u0442\u044c &#171;stream&#187;: false.\u00a0\u0412\u043e\u0442 \u043a\u0430\u043a \u044d\u0442\u043e \u0432\u0441\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c:curl http:\/\/localhost:11434\/api\/chat \\\u00a0\u00a0-H &#171;Content-Type: application\/json&#187; \\\u00a0\u00a0-d &#8216;{\u00a0\u00a0\u00a0\u00a0&#171;model&#187;: &#171;hf.co\/ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0&#187;,\u00a0\u00a0\u00a0\u00a0&#171;messages&#187;: [\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#171;role&#187;: &#171;user&#187;,\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#171;content&#187;: &#171;Hello!&#187;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\u00a0\u00a0\u00a0\u00a0],\u00a0\u00a0\u00a0\u00a0&#171;stream&#187;: false\u00a0\u00a0}&#8217;\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0439 \u043e\u0442\u0432\u0435\u0442 \u0432 JSON-\u0444\u043e\u0440\u043c\u0430\u0442\u0435:\u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442, \u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u0434\u0430\u043b\u044c\u0448\u0435.llama.cpp\u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u0443 \u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0447\u0435\u0440\u0435\u0437 llama.cpp, \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438.\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c llama.cpp\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0443\u0442\u0438\u043b\u0438\u0442\u044b \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438:sudo apt updatesudo apt install -y git cmake build-essential libssl-dev\u0421\u043a\u043b\u043e\u043d\u0438\u0440\u0443\u0435\u043c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u043a\u043e\u0434\u043e\u043c:git clone https:\/\/github.com\/ggml-org\/llama.cppcd llama.cpp\/\u0427\u0442\u043e\u0431\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435 \u043c\u043e\u0449\u043d\u043e\u0441\u0442\u0438 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b, \u043d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f CUDA (Compute Unified Device Architecture) \u2014 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0430 \u043e\u0442 NVIDIA, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u043e\u0440 \u0434\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439. \u0410 \u0434\u043b\u044f \u0441\u0431\u043e\u0440\u043a\u0438 \u043f\u043e\u0434 \u043d\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u044b\u0439 nvcc \u2014 (NVIDIA CUDA Compiler) \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u043d\u0430 \u044f\u0437\u044b\u043a\u0435 CUDA C\/C++ \u043f\u043e\u0434 GPU.\u0410\u0432\u0442\u043e\u0432\u044b\u0431\u043e\u0440 \u043e\u0431\u0440\u0430\u0437\u0430 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u0440\u0430\u0439\u0432\u0435\u0440 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u044b, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c, \u0435\u0441\u0442\u044c \u043b\u0438 nvcc:nvcc &#8212;version\u0415\u0441\u043b\u0438 \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430, \u0441\u0442\u0430\u0432\u0438\u043c \u0447\u0435\u0440\u0435\u0437 \u043a\u043e\u043c\u0430\u043d\u0434\u0443:apt install nvidia-cuda-toolkit\u00a0\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0441\u0431\u043e\u0440\u043a\u0443 \u0441 \u0444\u043b\u0430\u0433\u043e\u043c GGML_CUDA=ON \u2014 \u0431\u0435\u0437 \u043d\u0435\u0433\u043e cmake \u0441\u043e\u0431\u0435\u0440\u0435\u0442 CPU-\u0432\u0435\u0440\u0441\u0438\u044e:cmake -B build -DGGML_CUDA=ONcmake &#8212;build build &#8212;config Release -j$(nproc)\u041f\u043e\u0441\u043b\u0435 \u0441\u0431\u043e\u0440\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0447\u0442\u043e llama.cpp \u0432\u0438\u0434\u0438\u0442 \u0432\u0438\u0434\u0435\u043e\u043a\u0430\u0440\u0442\u0443:.\/build\/bin\/llama-server &#8212;list-devices\u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044cllama.cpp, \u043a\u0430\u043a \u0438 Ollama, \u0443\u043c\u0435\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u2014 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439 \u043d\u0430 Hugging Face \u0447\u0435\u0440\u0435\u0437 -hf:.\/build\/bin\/llama-cli -hf ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0\u041f\u043e\u0441\u043b\u0435 \u0441\u043a\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u044f \u043c\u044b \u043f\u043e\u043f\u0430\u0434\u0435\u043c \u0432 CLI-\u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u043f\u043e\u043a\u0430 \u043e\u043d \u043d\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u043f\u0438\u0448\u0435\u043c \/exit \u0438 Ctrl+C \u0434\u043b\u044f \u0432\u044b\u0445\u043e\u0434\u0430.\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c llama-server\u0423 llama.cpp \u0435\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 HTTP API, \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0439 \u0441 OpenAI. \u0414\u043b\u044f \u0447\u0435\u0441\u0442\u043d\u043e\u0433\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 Ollama, \u043f\u043e\u043a\u0430 \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0435\u0433\u043e \u0432 \u0442\u043e\u043c \u0436\u0435 \u0440\u0435\u0436\u0438\u043c\u0435 \u2014 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0430 GPU, \u0431\u0435\u0437 \u0440\u0443\u0447\u043d\u043e\u0439 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438:.\/build\/bin\/llama-server \\\u00a0\u00a0-hf ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0 \\\u00a0\u00a0&#8212;host 0.0.0.0 \\\u00a0\u00a0&#8212;port 8080 \\\u00a0\u00a0&#8212;n-gpu-layers all \\\u00a0\u00a0&#8212;ctx-size 4096 \\\u00a0\u00a0&#8212;parallel 1&#8212;n-gpu-layers all \u2014 \u044d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0440\u0430\u0437\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u043d\u0430 GPU \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043b\u043e\u0435\u0432 \u043c\u043e\u0434\u0435\u043b\u0438. &#8212;ctx-size 4096 \u2014 \u0430 \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u0432 4 096 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.\u00a0\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c APIcurl http:\/\/localhost:8080\/v1\/chat\/completions \\\u00a0\u00a0-H &#171;Content-Type: application\/json&#187; \\\u00a0\u00a0-d &#8216;{\u00a0\u00a0\u00a0\u00a0&#171;model&#187;: &#171;gemma-4-26b-a4b&#187;,\u00a0\u00a0\u00a0\u00a0&#171;messages&#187;: [\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0{\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#171;role&#187;: &#171;user&#187;,\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#171;content&#187;: &#171;Hello!&#187;\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}\u00a0\u00a0\u00a0\u00a0],\u00a0\u00a0\u00a0\u00a0&#171;stream&#187;: false\u00a0\u00a0}&#8217;\u041d\u0430 \u044d\u0442\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u0443 \u043d\u0430\u0441 \u0434\u0432\u0430 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0445 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \u0441 \u043e\u0434\u043d\u043e\u0439 \u0438 \u0442\u043e\u0439 \u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u044c\u044e \u0432 \u043e\u0434\u043d\u043e\u043c \u0438 \u0442\u043e\u043c \u0436\u0435 \u043a\u0432\u0430\u043d\u0442\u0435. \u041c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u044c \u043a \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044e.\u0411\u0435\u043d\u0447\u043c\u0430\u0440\u043a\u0438\u0427\u0442\u043e \u0431\u0443\u0434\u0435\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c:TTFT (Time To First Token) \u2014 \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043e\u0442 \u043e\u0442\u043f\u0440\u0430\u0432\u043a\u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0434\u043e \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u043e\u0442\u0432\u0435\u0442\u0430;ITL (Inter-Token Latency) \u2014 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438;Output tokens\/s \u2014 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438;Request latency \u2014 \u043f\u043e\u043b\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430.\u0420\u0443\u0447\u043d\u044b\u0435 \u0442\u0435\u0441\u0442\u044b \u043e\u0447\u0435\u043d\u044c \u0443\u0442\u043e\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u044b. \u0410 \u0434\u043b\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u0438 \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u0438\u0442\u044c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0440\u0430\u0437, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u043c GuideLLM \u2014 \u0443\u0442\u0438\u043b\u0438\u0442\u043e\u0439 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u0432 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 LLM.\u00a0\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0432 \u043d\u0435\u043c GuideLLM:apt install -y python3.12-venvpython3 -m venv ~\/llm-venvsource ~\/llm-venv\/bin\/activatepip install -U pippip install &#8216;guidellm[recommended]&#8217;\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c, \u0447\u0442\u043e \u0443\u0442\u0438\u043b\u0438\u0442\u0430 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442:guidellm &#8212;version\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0432 \u0441\u0438\u043d\u0445\u0440\u043e\u043d\u043d\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 (\u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443), \u0430 \u043f\u043e\u0442\u043e\u043c \u0442\u043e \u0436\u0435 \u0441\u0430\u043c\u043e\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e.GuideLLM \u0443\u043c\u0435\u0435\u0442 \u0441\u0430\u043c \u0434\u0435\u043b\u0430\u0442\u044c \u0440\u0430\u0437\u043e\u0433\u0440\u0435\u0432\u043e\u0447\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0443\u0436\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u0412 \u043a\u043e\u043c\u0430\u043d\u0434\u0430\u0445 \u043d\u0438\u0436\u0435 \u0432\u044b \u0443\u0432\u0438\u0434\u0438\u0442\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b prompt_tokens \u0438 output_tokens. \u041e\u043d\u0438 \u0437\u0430\u0434\u0430\u044e\u0442 \u0434\u043b\u0438\u043d\u0443 \u0432\u0445\u043e\u0434\u0430 \u0438 \u043e\u0442\u0432\u0435\u0442\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e.\u0412 \u0442\u0435\u0441\u0442\u0430\u0445 \u0431\u0443\u0434\u0435\u0442 32K \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u2192 256 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445.Ollama\u0414\u043b\u044f Ollama \u043d\u0443\u0436\u043d\u043e \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442 33 792, \u0447\u0435\u0440\u0435\u0437 API \u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0430 \u043d\u0435 \u0437\u0430\u0434\u0430\u0435\u0442\u0441\u044f \u2014 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 model alias \u0447\u0435\u0440\u0435\u0437 Modelfile.\u00a0cat &gt; Modelfile.32k &lt;&lt;&#8216;EOF&#8217;\u00a0FROM hf.co\/ggml-org\/gemma-4-26B-A4B-it-GGUF:Q4_0\u00a0PARAMETER num_ctx 33792\u00a0EOF\u0418 \u0441\u0430\u043c alias:ollama create gemma4-q4_0-32k -f Modelfile.32k\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c:ollama show gemma4-q4_0-32k\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d, \u0438\u0434\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435. \u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u0439 \u0431\u0435\u0437 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e\u0439 \u043d\u0430\u0433\u0440\u0443\u0437\u043a\u0438: \u0441\u0435\u0440\u0432\u0435\u0440 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u0437\u0430 \u0440\u0430\u0437. \u041a\u0430\u0436\u0434\u044b\u0439 \u0437\u0430\u043f\u0440\u043e\u0441 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u043a\u043e\u043b\u043e 32K \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0430 \u043e\u0442\u0432\u0435\u0442 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d 256 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438. \u0412\u0441\u0435\u0433\u043e GuideLLM \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442 30 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0445 \u043f\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432.guidellm run \\\u00a0\u00a0&#8212;backend &#8216;{&#171;kind&#187;:&#187;openai_http&#187;,&#187;target&#187;:&#187;http:\/\/localhost:11434&#8243;,&#187;model&#187;:&#187;gemma4-q4_0-32k&#187;,&#187;request_format&#187;:&#187;\/v1\/chat\/completions&#187;,&#187;validate\\_backend&#187;:false,&#187;extras&#187;:{&#171;body&#187;:{&#171;max\\_tokens&#187;:256}}}&#8217; \\\u00a0\u00a0&#8212;tokenizer kind=huggingface_auto,model=google\/gemma-4-26B-A4B-it \\\u00a0\u00a0&#8212;profile kind=synchronous \\\u00a0\u00a0&#8212;data kind=synthetic_text,prompt_tokens=32768,output_tokens=256 \\\u00a0\u00a0&#8212;constraint kind=max_requests,count=30 \\\u00a0\u00a0&#8212;seed kind=static,value=42 \\\u00a0\u00a0&#8212;output kind=json,path=ollama-32k-sync.json \\\u00a0\u00a0&#8212;output kind=csv,path=ollama-32k-sync.csv \\\u00a0\u00a0&#8212;output kind=html,path=ollama-32k-sync.html\u0412\u0441\u0435 30 \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0438\u0441\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e. \u041c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 7,7 \u0441, \u0438\u0437 \u043d\u0438\u0445 \u043e\u043a\u043e\u043b\u043e 5,9 \u0441 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u043d\u0430 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430. \u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0447\u0430\u043b\u0430 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 6,9 \u043c\u0441. \u0421\u0435\u0440\u0432\u0435\u0440 \u0432\u044b\u0434\u0430\u0432\u0430\u043b \u0432 \u0441\u0440\u0435\u0434\u043d\u0435\u043c 34,1 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443.\u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u043e\u043c 32K \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0430 \u043e\u043a\u043e\u043b\u043e 16,7 \u0413\u0411 VRAM.Text Metrics \u0438 Request Token \u0432\u043e \u0432\u0441\u0435\u0445 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0441\u0442\u0430\u043d\u0443\u0442\u0441\u044f \u0442\u0430\u043a\u0438\u043c\u0438 \u0436\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 \u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u043c \u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0438\u0445. \u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u0445\u043e\u0434\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u043e\u043a\u043e\u043b\u043e 32 800 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0432\u044b\u0445\u043e\u0434\u0430 \u2014 256 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.\u041d\u0430 \u043e\u0434\u0438\u043d \u0437\u0430\u043f\u0440\u043e\u0441 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c 32 784 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0438 256 \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0432\u0441\u0435\u0433\u043e 33 040 \u0442\u043e\u043a\u0435\u043d\u043e\u0432.Request Sec Mdn \u2014 \u043c\u0435\u0434\u0438\u0430\u043d\u043d\u043e\u0435 \u043f\u043e\u043b\u043d\u043e\u0435 \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u043e 7,7 \u0441. \u043f\u0435\u0440\u0432\u044b\u0439 \u0442\u043e\u043a\u0435\u043d \u043f\u043e\u044f\u0432\u043b\u044f\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0447\u0435\u0440\u0435\u0437 5,9 \u0441, \u0430 \u0437\u0430\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u0435\u0436\u0434\u0443 \u043f\u043e\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c\u0438 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u043b\u0430 \u043e\u043a\u043e\u043b\u043e 6,9 \u043c\u0441.\u041f\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 \u0441\u0435\u0440\u0432\u0435\u0440 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u043b \u043e\u043a\u043e\u043b\u043e 0,1 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u0435\u043a\u0443\u043d\u0434\u0443, \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 4 403 \u0432\u0445\u043e\u0434\u043d\u044b\u0445 \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441 \u0438 \u0432\u044b\u0434\u0430\u0432\u0430\u043b \u043e\u043a\u043e\u043b\u043e 34,1 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u043e\u043a\u0435\u043d\u0430\/\u0441.\u041f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u044b\u0435 \u0437\u0430\u043f\u0440\u043e\u0441\u044b. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e Ollama \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442 \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e. \u0427\u0442\u043e\u0431\u044b \u0434\u0432\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e, \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 OLLAMA_NUM_PARALLEL \u0434\u043e 2.systemctl edit ollama\u0414\u043e\u0431\u0430\u0432\u0438\u043c:[Service]Environment=&#187;OLLAMA_NUM_PARALLEL=2&#8243;\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c Ollama:systemctl daemon-reloadsystemctl restart ollama\u0417\u0430\u043f\u0443\u0441\u0442\u0438\u043c \u0442\u043e\u0442 \u0436\u0435 \u0442\u0435\u0441\u0442, \u043d\u043e \u0442\u0435\u043f\u0435\u0440\u044c \u0441&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-496671","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/496671","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=496671"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/496671\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=496671"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=496671"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=496671"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}