{"id":1114,"date":"2026-07-13T16:34:51","date_gmt":"2026-07-13T23:34:51","guid":{"rendered":"https:\/\/blog.portnumber53.com\/?p=1114"},"modified":"2026-07-13T16:41:51","modified_gmt":"2026-07-13T23:41:51","slug":"run-pi-dev-with-gemma4-using-local-llama-cpp","status":"publish","type":"post","link":"https:\/\/blog.portnumber53.com\/index.php\/2026\/07\/13\/run-pi-dev-with-gemma4-using-local-llama-cpp\/","title":{"rendered":"Run pi.dev with Gemma4 using local Llama.cpp"},"content":{"rendered":"\n<ol class=\"wp-block-list\">\n<li>Install Llama.ccp<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>OSX<\/td><td><\/td><td><\/td><\/tr><tr><td><code>brew install llama.cpp<\/code><\/td><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">2. Start the server<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>OSX<\/td><td><\/td><td><\/td><\/tr><tr><td><code>llama-server -hf ggml-org\/gemma-4-E2B-it-GGUF<\/code><\/td><td><\/td><td><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">3. Install pi.dev<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>curl -fsSL https:\/\/pi.dev\/install.sh | sh<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">4. Create the config files:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>.pi\/agent\/models.json<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"providers\": {\n    \"local-llama\": {\n      \"baseUrl\": \"http:\/\/localhost:8080\/v1\",\n      \"api\": \"openai-completions\",\n      \"apiKey\": \"local-bypass\",\n      \"models\": &#91;\n        {\n          \"id\": \"gemma-4\",\n          \"name\": \"Gemma 4 Local\",\n          \"input\": &#91;\"text\"],\n          \"contextWindow\": 128000,\n          \"maxTokens\": 4096\n        }\n      ]\n    }\n  }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>~\/.pi\/agent\/settings.json<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{\n  \"lastChangelogVersion\": \"0.80.6\",\n  \"theme\": \"dark\",\n  \"defaultProvider\": \"local-llama\",\n  \"defaultModel\": \"gemma-4\",\n  \"defaultThinkingLevel\": \"medium\"\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">References:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/ai.google.dev\/gemma\/docs\/integrations\/llamacpp\">https:\/\/ai.google.dev\/gemma\/docs\/integrations\/llamacpp<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.com\/ggml-org\/llama.cpp\/blob\/master\/docs\/install.md\">https:\/\/github.com\/ggml-org\/llama.cpp\/blob\/master\/docs\/install.md<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>OSX brew install llama.cpp 2. Start the server OSX llama-server -hf ggml-org\/gemma-4-E2B-it-GGUF 3. Install pi.dev curl -fsSL https:\/\/pi.dev\/install.sh | sh 4. Create the config files: .pi\/agent\/models.json ~\/.pi\/agent\/settings.json References: https:\/\/ai.google.dev\/gemma\/docs\/integrations\/llamacpp https:\/\/github.com\/ggml-org\/llama.cpp\/blob\/master\/docs\/install.md<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[390],"tags":[387,389,386,388],"class_list":["post-1114","post","type-post","status-publish","format-standard","hentry","category-llm","tag-gemma4","tag-llama-cpp","tag-llm","tag-pi-dev"],"_links":{"self":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/1114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/comments?post=1114"}],"version-history":[{"count":1,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/1114\/revisions"}],"predecessor-version":[{"id":1115,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/posts\/1114\/revisions\/1115"}],"wp:attachment":[{"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/media?parent=1114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/categories?post=1114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.portnumber53.com\/index.php\/wp-json\/wp\/v2\/tags?post=1114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}