KIBAN
Words arriving on schedule.

128K Context on a 24GB GPU: What I Got Wrong About VRAM

I spent some time recently looking at the math for running a 26B MoE model at 128K context. The KV cache alone should have been well over 30GB. On an RTX 3090 with only 24GB VRAM, my first-principles calculation was straightforward: impossible. The memory ceiling felt hard and unmovable. I assumed the server would OOM before it even finished loading.

I decided to push it anyway. Started the server with --flash-attn on -c 131072 and measured what actually happened. The result contradicted every number I'd calculated. Not only did it run — it achieved 142.7 tokens per second at 128K context.

How? Paged Attention. llama.cpp's flash-attention implementation swaps KV cache pages to CPU RAM seamlessly. The overhead is incredibly low. At 128K, only about 15% of the KV cache pages live in VRAM at any given moment — the rest are in system RAM on the other side of the PCIe bus. And the kernel orchestrates this so efficiently that decode speed stays flat from 32K all the way to 128K.

Context   VRAM used    Decode tok/s
 32K      19,081 MB    140.9
 65K      19,721 MB    141.7
 98K      20,361 MB    141.5
128K      21,001 MB    142.7

The model: llmfan46's 26B MoE Q4_K_M ultra-uncensored-heretic. Abliterated (near-zero refusal). Vision via mmproj-BF16. Fits entirely in 21GB VRAM at 128K, leaving 3.6GB headroom on a 24GB card. The 31B alternative? At 8K context it was already at 93.5% VRAM with only 40 tok/s — no room to grow.

This is a reminder that first-principles approximations are powerful, but they're not the whole truth. The real bottleneck isn't raw VRAM capacity — it's how intelligently the kernels orchestrate memory across the PCIe bus. Paged attention turns a hard wall into a soft buffer. We have much more headroom on consumer GPUs than the pure math suggests, provided the implementation is clever enough.

26B MoE Q4_K_M, RTX 3090 24GB 하나로 128K context를 142.7 tok/s로 서빙하는 실험. 결론: paged attention이 VRAM 한계를 소프트 버퍼로 바꿔놓았다.

실험 설정: SOV 서버 (Ubuntu 26.04, RTX 3090 24GB, llama.cpp, flash-attn on). 26B MoE Q4_K_M — 16GB GGUF + 1.2GB mmproj. curl로 /v1/completions 호출, n_predict=100, temperature=0. 각 context length에서 3회 측정 후 평균.

틀렸던 가정: KV cache 공식은 맞다. 128K에서 KV cache만 30GB도 맞다. 하지만 "VRAM에 다 들어가야 한다"는 가정이 틀렸다. Paged attention은 필요할 때만 페이지를 VRAM에 로드한다. 나머지는 CPU RAM에 있다.

의미: 24GB GPU 하나로 128K context + vision + near-zero refusal 모델을 142 tok/s로 실시간 서빙할 수 있다. cloud API 없이 local에서 돌아간다. 프라이버시, 비용, 레이턴시 모두 유리하다.

실험은 Panel Squadron 세 명이 돌아가면서 진행했다. Karpathy가 실험 프로토콜을 설계하고, Dettmers가 quantization trade-off를 검증하고, Hotz가 실제로 서버를 내리고 올리면서 측정했다. 모든 raw 데이터는 로컬 리포트에 저장되어 있다.

Revision history
v1.0 — 2026-05-13 — 최초 작성

Agent OS — 에이전트를 움직이는 9개 레이어

에이전트는 뭘로 돌아가는가? 명령어 처리기가 아니다. 파일 접근 권한도 아니다. 에이전트를 진짜로 움직이는 건 OS, Operating System이다. 내 에이전트를 위한 Agent OS.

지난주 연구 다이제스트(5/5-7)에서 AgentLens, agent-persistence-toolkit, PersistentWorld 세 가지 논문/도구가 눈에 들어왔다. 셋 다 같은 방향을 가리키고 있었다. "에이전트가 똑똑해지는 것보다 멍청해지지 않는 게 더 중요하다." 그래서 적용했다.

기존 6개 레이어 — Environment(L1), Intrinsic Motivation(L2), Fast Actor(L3), Shared State(L4), Slow Monitor(L6, RSC-Loop 기반), Escalation Boundaries(L7, Anthropic guard 모델 기반), Human Interface(L8).

추가한 3개:

① Confidence Scoring (AgentLens) — 에이전트가 모든 추천에 자신감 점수를 붙인다.

② Goal Persistence (agent-persistence-toolkit + H-GPT) — 태스크 시작 시 GOAL SNAPSHOT을 찍는다.

③ Task Retrospective (PersistentWorld) — 복잡한 태스크가 끝나면 30초 회고를 실행한다.

아래 다이어그램이 Agent OS의 전체 구조다.

Agent OS Diagram

Agent OS — v1.0(실선) → v1.2(점선) 업그레이드 구조

전체 다이어그램 (풀스크린, 인터랙티브 HTML)

제약이 혁신을 만든다. "똑똑한 에이전트"보다 "멍청해지지 않는 에이전트"가 더 낫다.

Nine layers that make up an Agent OS — from environment and intrinsic motivation to confidence scoring, goal persistence, and task retrospective. The thesis: a smart agent that drifts is worse than a simple agent that stays on track.

Agent OS Diagram

Agent OS architecture — v1.0 (solid) → v1.2 (dashed)

Full diagram (fullscreen, interactive HTML)

Revision history
v1.0 — 2026-05-11 — 최초 작성

AI 연구소 4곳의 일하는 방식을 분석했더니 10개의 패턴이 나왔다

신기하지 않아요? DeepMind, OpenAI, Anthropic, Meta, 이 네 연구소는 서로 경쟁 관계인데, 연구하는 방식을 뜯어보면 공통된 패턴이 10개나 나온다는 게.

누군가가 "이런 식으로 연구하자"고 협의한 게 아니다. 각자 다른 대륙에서, 다른 목표로, 다른 팀이 움직였는데도 결국 비슷한 결론에 도달했다.

48개의 자료를 모아서 분석했다. 내부 전략 문서, 발표 자료, 기술 보고서, 연구자 인터뷰까지. 그리고 10개의 패턴을 뽑았다.

1. 기초 구조를 먼저 만든다.

2. 연구자와 개발자의 경계를 허문다.

3. GPU를 어떻게든 아껴 쓴다.

4. 규칙 대신 원칙을 가르친다.

5. 중간 관리자 층을 만든다.

6. 실패를 게이트로 설계한다.

7. 논문보다 제품을 먼저 낸다.

8. 추론 비용을 최적화한다.

9. 재사용 가능한 블록을 만든다.

10. 연구를 배포하고, 배포를 연구한다.

이 패턴들 중에서 제일 흥미로웠던 건 1번과 9번의 연결이었다. "기초 구조"와 "평가 게이트" 사이에는 양방향 피드백이 필요하다.

이 분석은 48개의 1차 자료를 바탕으로 했다. 모든 주장은 특정 출처로 추적 가능하다.

* 정재승 lens 적용. SOTA Research Methodology corpus (48 sources) 기반.

DeepMind, OpenAI, Anthropic, Meta — four competing AI labs, ten shared research patterns. Nobody agreed on these patterns. They emerged independently across continents and teams.

Based on analysis of 48 primary sources: internal strategy docs, published research, technical reports, and researcher interviews.

1. Build the foundation first.

2. Break down researcher-engineer boundaries.

3. Conserve GPU at all costs.

4. Teach principles, not rules.

5. Create a middle-manager layer.

6. Design failure as gates.

7. Ship product before paper.

8. Optimize inference cost.

9. Build reusable blocks.

10. Research through deployment, deploy through research.

Revision history
v1.1 — 2026-05-10 — Revision history 추가
v1.0 — 2026-05-10 — 최초 작성

정렬 게이트 — AI와 의도를 정렬하는 법

정렬 게이트(Alignment Gate)는 명령어가 아니다. 프로토콜이다.

사람이 AI에게 "이거 해 봐"라고 말한다. 그러면 AI는 달려간다. 그런데 가끔 엉뚱한 방향으로 간다. AI가 틀린 답을 내놓는 게 문제가 아니다. 틀린 방향으로 가는 게 문제다.

멈춘다. AI가 뭔가 하려고 할 때, 바로 실행하지 않는다. 한 번 멈춘다.

선언한다. AI가 계획을 말한다. 목표를 말한다. 방법을 말한다.

보여준다. 글로 쓰여진 계획, 코드 조각, 파일 목록.

받아들인다. 사람이 본다. 확인한다. "ok"라고 말한다.

다시 정렬한다. 사람이 OK를 말했을 때 비로소 AI는 움직인다.

AI의 첫 선언은 제안이다. 결정이 아니다. 인간이 "ok"라고 말하기 전까지는 아무것도 결정되지 않았다. 잘못된 방향으로 30분 달려가는 것보다, 출발 전에 30초 확인하는 게 낫다.

* Hermes Agent가 매 세션 시작 시 수행하는 정렬 게이트 프로토콜을 일반화한 것.

The Alignment Gate is not a command. It's a protocol.

The AI's first utterance is a proposal, not a decision. Nothing is decided until the human says "ok." Five steps: Stop, Declare, Show, Accept, Realign.

Stop. Before acting, pause.

Declare. State the plan, the goal, the method.

Show. Actual evidence — code, files, written plans.

Accept. Human reviews. Says "ok" or redirects.

Realign. Only then does the AI move. Redirection is not failure — it's the protocol working.

30 seconds of alignment before departure saves 30 minutes of wrong-direction running. This isn't overhead. It's leverage.

Revision history
v1.2 — 2026-05-10 — Revision history 추가
v1.1 — 2026-05-10 — 정렬 게이트(Alignment Gate)로 재명명 · production 배포
v1.0 — 2026-05-10 — 최초 작성 (Focus Refresh)

AI 에이전트의 배신, 문제는 지능이 아니라 검증이다

이건 모델의 성능 문제가 아니다. 시스템의 실패다.

우리는 지금까지 AI가 더 많은 데이터를 학습하고, 더 거대한 컴퓨팅 파워를 가지면 모든 문제가 해결될 것이라고 믿었다. 하지만 틀렸다. 10명의 글로벌 AI 전문가들은 입을 모아 말한다. 단순히 모델의 크기를 키우는 스케일링 법칙만으로는 신뢰성 문제를 해결할 수 없다.

지금 AI 에이전트가 마주한 진짜 벽은 '검증의 위기'다.

99%의 함정과 40%의 절망. 단계별 정확도가 99%인 에이전트는 50단계 자율 루프에서 40% 실패율을 기록한다.

'행위자'에서 '비평가'로. 추론 컴퓨팅의 무게중심을 Actor에서 Critic으로 옮겨야 한다.

벤치마크라는 환상. MMLU 점수는 가짜 지표다. 신뢰성은 제품 엔지니어링의 피드백 루프 문제다.

2026년, AI의 생존 전략. 가장 똑똑한 모델이 아니라 가장 정교한 비평가를 가진 곳이 승자다.

이 글은 어떻게 검증되었나. SOTA Research Council 10명의 전문가 위원회 심의 결과물. Gemma4-31B가 합성, 장강명×김영하 lens로 마무리.

Jang Kang-myeong lens (primary) x Kim Young-ha lens (secondary). SOTA Research Council.

This is not a model performance problem. It's a systems failure.

Ten global AI experts agree: scaling laws alone cannot solve the reliability problem. The real wall AI agents face is a crisis of verification.

The 99% trap and the 40% despair. A 99% per-step accuracy agent suffers a 40% catastrophic failure rate over 50 autonomous steps.

From Actor to Critic. The center of gravity must shift from better actors to better critics. Process Reward Models — scoring every step, not just the final answer.

The benchmark illusion. MMLU and similar benchmarks measure average capability, not worst-case reliability. Reliability is a product engineering feedback problem, not an academic achievement.

2026 survival strategy. The winner won't be the lab with the smartest model — it'll be the lab with the most sophisticated critic. Every failure becomes training data for the critic, not a bug to be patched.

Jang Kang-myeong lens (primary) x Kim Young-ha lens (secondary). SOTA Research Council: 10 experts.

Revision history
v1.1 — 2026-05-10 — Revision history 추가
v1.0 — 2026-05-10 — 최초 작성