메뉴
HN
Hacker News 42일 전

이제 로컬 모델도 쓸 만해졌다

IMP
8/10
핵심 요약

최근 공개된 오픈소스 AI 모델들을 개인 PC에서 직접 구동하는 환경이 비약적으로 발전하여, 코딩 등의 실무 작업에서 유의미한 결과를 내고 있습니다. 저자는 최신 Gemma 4 모델을 활용해 클라우드 API 모델의 75% 수준의 성능과 속도를 보여주는 에이전틱 코딩(agentic coding)을 로컬로 성공적으로 수행하고 있다고 강조합니다. 이는 고성능 AI를 로컬 환경에서 자율적으로 활용할 수 있는 새로운 이정표를 제시한다는 점에서 매우 중요합니다.

번역된 본문

이제 로컬 모델도 쓸 만해졌다 (2026년 6월 15일)

로컬 모델이 처음 나왔을 때부터 계속 사용해 왔는데, 드디어 놀라울 정도로 쓸 만해졌습니다. 저는 64GB RAM과 1TB 저장 공간이 있는 2022년형 M2 Mac을 사용하고 있습니다. 다양한 시스템 환경(raw llama.cpp with Open WebUI, llama-cpp-python, Ollama, llamafiles, LM Studio 등)에서 Mistral 7B, Gemma 3, OpenAI OSS-20B, Qwen 3 MOE, 그리고 Qwen 2.5 Coder 같은 다양한 Qwen 변형 모델들을 사용해 왔습니다.

그렇다면 지금 로컬 모델의 수준은 어느 정도일까요? 초창기 모델들은 속도가 느리고 사용하기 어려웠으며, 대부분의 프로그래밍 작업에서 그다지 정확하지 않았습니다. 로컬 모델이 크게 뒤처져 있다는 평가는 적어도 GPT-OSS가 출시되기 전까지는 대체로 사실이었습니다. 제가 '모델이 충분히 좋은가?'를 판단하는 구체적이고 과학적인 기준은 없지만, 'API 기반 모델과 교차 검사해야 하는가?'라는 개인적인 직관을 기준으로 삼았을 때, GPT-OSS는 제가 그 교차 검사를 훨씬 덜 하게 만든 최초의 모델이었습니다.

결과적으로 저는 최신 정보가 필요 없는 개발 관련 질문에 대해 빠르고 맞춤화된 Google처럼 로컬 모델을 주로 사용했습니다. 하지만 최근 Google의 Gemma 4 제품군이 출시되면서 드디어 로컬 환경에서 에이전틱 코딩(agentic coding)을 수행할 수 있게 되었습니다. 이 작업 루프는 최신 API 모델 대비 약 75% 수준의 정확도와 속도를 보여주는데, 이는 정말 놀라운 일입니다. 지금까지 저는 LM Studio에 구현된 gemma-4-26b-a4b를 기본 로컬 모델로 사용하고 있습니다.

지금까지 로컬 환경을 사용하여 다음과 같은 작업들을 수행했습니다: 주피터 노트북 형태의 Python 스크립트를 5~6개의 모듈로 구성된 저장소(repo)로 리팩토링하고, 제네릭을 위한 올바른 타입 힌트(type hints)를 사용하도록 해당 모듈을 린트(lint)했습니다(최신 API 모델들은 이제 이 작업을 자동으로 처리하지만 항상 그런 것은 아닙니다). 또한, 블로그 포스트를 교정하고, 단위 테스트를 작성하고, 추천 시스템을 위한 투타워 모델(two-tower model)을 구축하는 저장소를 부트스트래핑(초기 설정)하여 빈 화면에서 에이전트가 어떻게 작동하는지 확인해 보았습니다. 에이전트가 생성한 코드는 꽤 기본적이었지만, 작년에는 가능할 것이라고 생각지도 못했던 수준이었습니다. 참고로 모든 에이전트 워크플로우는 실행 권한이 제한된 Docker 컨테이너에서 실행되기 때문에 환경이 통제됩니다.

저는 또한 Arxiv 논문에서 트렌딩 주제를 보여주는 앱을 개발하고 있습니다. 호기심에 Pi에게 과거 LM Studio 세션 로그를 분석하여 제가 LM Studio로 무엇을 했는지 파악해 보라고 했습니다.

놀랍지 않게도 제가 Rijksearch를 개발하고 있었기 때문에 대부분 관련 작업들이었습니다. 이 작업들 중 획기적인 것은 없습니다 (다시 말하지만, 개인화된 구글/문서 조회가 많습니다). 이런 작업들을 수행하면 GPU와 RAM이 풀가동되며 K-V 캐시가 64GB RAM까지 증가합니다. 하지만 저에게 있어 더 큰 의미는, 이렇게 단순한 작업조차 불과 6개월 전만 해도 로컬 모델에게는 불가능한 일이었다는 점입니다.

gemma-4-12b-qat가 방금 출시되었지만, 이미 그 크기 대비 성능에 깊은 인상을 받았습니다. 이 모델 아키텍처 자체는 매우 흥미로우며, "성능과 가격에 제약이 있다면 우리는 어떤 아키텍처적 트레이드오프를 해야 하는가?"와 같은 흥미로운 질문을 던집니다. 이는 지금까지의 맹목적인 토큰 경쟁에서는 정말 제기되지 않았던 질문입니다.

오늘날 로컬에서 에이전트 모델 구동하기

하지만 제 말만 맹신하지 마시고 직접 사용해 보세요! 로컬 에이전트 흐름을 실행해 보려면 로컬 모델 추론 엔진, 에이전트 하네스(harness), 그리고 로컬 모델 아티팩트가 필요합니다. 추론 엔진을 통해 다운로드한 모델 아티팩트를 제공하고, 에이전트 하네스가 해당 로컬 추론 엔드포인트를 가리키도록 설정해야 합니다.

제 현재 로컬 설정에서는 에이전트 하네스로 Pi를 사용하고 추론 서버로 LM Studio를 사용하고 있습니다. 비록 llama.cpp를 직접 사용하는 것이 더 빠를 수 있지만 말입니다(이는 향후 실험 방향이 될 수 있습니다). Pi와 LM Studio를 사용하여 에이전틱 코딩을 설정하는 것은 해당 가이드를 따라가기 매우 쉬웠지만, 설정을 약간 수정하기도 했습니다.

모델: 게시물에서는 Gemma 26B A4B를 추천하지만, gemma-4-12b-qat가 더 최신 모델이며...

원문 보기
원문 보기 (영어)
Running local models is good now Jun 15 2026 I’ve been working with local models since they came out, and finally, they’re surprisingly good now. I have a 2022 M2 Mac with 64 GB RAM and 1TB storage and I’ve used Mistral 7B Gemma 3 OpenAI OSS-20B Qwen 3 MOE , as well as a number of other Qwen variants like Qwen 2.5 Coder across a lot of different system setups like raw llama.cpp with Open WebUI llama-cpp-python Ollama llamafiles and LM Studio Where are local models now? Early on, models were slow, hard to use, and just not that accurate for most programming tasks. The idea that local models were severely lagging behind was largely true until, for me, the release of GPT-OSS. I have no concrete scientific evidence of this - my own personal vibe metric of “is a model good enough” is, “do I have to double-check it against an API model”, and GPT-OSS was the first one where I started doing that a lot less often. As a result, I’ve mostly been using local models as fast, personalized Google for development questions that don’t require recency. But with the most recent releases from Google in the Gemma 4 , family, I’ve finally been able to do agentic coding locally and have loops work at about ~75% the accuracy/speed of frontier models, which is incredible. I’ve so far been using gemma-4-26b-a4b LM Studio implementation as my default local model. I’ve used the local setup so far to: Refactor a Python script that was a notebook into a repo of 5-6 modules, lint that module to use correct type hints for generics (most frontier models now do this automatically, but not always). I’ve also used it to proofread some blog posts, write unit tests, and to bootstrap a repo that stands up a two-tower model for recommendations just to see what the agent would do with a blank slate. Here’s what it generated, which was pretty basic but still beyond the scope of anything I would have thought possible last year: Note that the environment is restricted because I run all my agentic workflows in a Docker container with limited access to execution. I’m also building an app that surfaces trending topics from Arxiv papers. Out of curiosity, I had Pi go through my past LM Studio session logs and figure out what I was using LM Studio for: Unsurprisingly, since I’ve been working on Rijksearch, None of these are groundbreaking tasks (again, a lot of personalized Google/docs lookups), and working on them does give my GPUs and RAM a workout and the K-V cache grows to 64 GB RAM. But, the larger story for me is that these kinds of tasks, even as simple as they are, used to be impossible for local models as recently as 6 months ago. Gemma-4-12b-qat just came out but I’ve already also really been impressed with its performance relative to its size. The model architecture itself is really interesting and proposes a bunch of interesting questions like, “if we are constrained by performance and price, what architectural tradeoffs do we need to make?” a question that so far has not really been asked in the mad token gold rush. Running agentic models locally today But don’t take my word for any of this, try it out for yourself! You’ll need a local model inference engine, an agentic harness, and the local model artifact if you want to try to run local agentic flows. You’ll need to set up the harness to point at your local inference endpoint, the downloaded model artifact served via the inference engine. For my local setup, I’m currently using Pi as the agent harness and LM Studio as the inference server, although it would likely be faster if I just used llama.cpp directly - a potential direction for a future experiment. This post was very easy to follow to set up agentic coding with Pi and LM Studio, although I did make a few tweaks to the post’s setup. Model: The post recommends Gemma 26B A4B , but gemma-4-12b-qat is more recent and smaller and faster, without much sacrifice in accuracy. Security: I run every Pi session in a Docker container and give it permissions only to bash so that it can’t run Python code or do web browsing, although I do plan to allow curl in a different image for some research work I’m doing. Agent Harness Config: Since I run everything in Docker, I edited Pi’s models.json in order to get Pi to talk to the model. "lmstudio" : { "baseUrl" : "http://host.docker.internal:1234/v1" , "api" : "openai-completions" , "apiKey" : "not-needed" , "models" : [ { "id" : "google/gemma-4-12b-qat" , "input" : [ "text" , "image" ] } ] } Here’s my Docker Compose config: services: pi: build: context: . dockerfile: Dockerfile image: pi-agent:0.74.0 init: true stdin_open: true tty: true extra_hosts: - "host.docker.internal:host-gateway" environment: ANTHROPIC_API_KEY: ${ ANTHROPIC_API_KEY :- } OPENAI_API_KEY: ${ OPENAI_API_KEY :- not-needed } GEMINI_API_KEY: ${ GEMINI_API_KEY :- } OPENAI_API_BASE: ${ OPENAI_API_BASE :- http://host.docker.internal:1234/v1 } # note that you'll need to specify a base if you also use OpenAI to access OpenAI's actual completions endpoint WHATEVER_API_KEY: ${ WHATEVER_API_KEY :- } volumes: - ${ HOME } /.pi/agent/models.json:/config/models.json - ${ WORKSPACE :- . } :/workspace - pi-config:/config - pi-sessions:/sessions working_dir: /workspace volumes: pi-config: pi-sessions: and here’s the bash script that runs pi . #!/usr/bin/env bash # Pi — Start the containerized Pi agent. # Directory containing this script and the compose files. SCRIPT_DIR = " $( cd -- " $( dirname " ${ BASH_SOURCE[0] } " ) " && pwd ) " # Workspace to mount into the container. WORKSPACE_DIR = " ${ WORKSPACE :-$( pwd ) } " case " $WORKSPACE_DIR " in /* ) ;; * ) WORKSPACE_DIR = " $( cd -- " $WORKSPACE_DIR " && pwd ) " ;; esac export WORKSPACE = " $WORKSPACE_DIR " sandbox = " ${ PI_SANDBOX :- 0 } " pi_args =() while (( $# )) ; do case " $1 " in --sandbox ) sandbox = 1 ;; --no-sandbox ) sandbox = 0 ;; * ) pi_args +=( " $1 " ) ;; esac shift done compose_files =( -f " $SCRIPT_DIR /docker-compose.yml" ) if [[ " $sandbox " == "1" ]] ; then # an even more secure sandbox compose_files +=( -f " $SCRIPT_DIR /docker-compose.sandbox.yml" ) fi # Derive a container name from the workspace directory's basename. # Sanitize to characters Docker accepts: [a-zA-Z0-9][a-zA-Z0-9_.-]* repo_slug = " $( basename -- " $WORKSPACE_DIR " | tr -c 'a-zA-Z0-9_.-' '-' | sed 's/^-*//' ) " [[ -z " $repo_slug " ]] && repo_slug = "workspace" container_name = "pi- ${ repo_slug } - $$ " api_key_args =( -e OPENAI_API_KEY -e DEEPSEEK_API_KEY -e ANTHROPIC_API_KEY -e GEMINI_API_KEY ) cmd =( docker compose --project-directory " $SCRIPT_DIR " " ${ compose_files[@] } " run --rm --name " $container_name " " ${ api_key_args[@] } " pi ) if (( ${# pi_args[@] } )) ; then cmd +=( " ${ pi_args[@] } " ) fi exec " ${ cmd[@] } " I build the Docker container and make changes to the files in its own repo. Then, I run Pi in the repo I’m working in, which spins up Docker so that Pi can’t wipe files or directories by acting on my physical hard drive. This also enables Pi running in the container to see my custom model json config by shipping it into the container. All of this has been working fairly well for my experiments. There are still issues with local models: inference can be slow, context windows are small and limited to your own hardware, and the ecosystem, although it’s made a ton easier by tooling like LM Studio and HuggingFace’s Use This Model button . Early releases suffer from prompt template mismatches . But, these are usually patche