Awni Hannun (@awnihannun)

짧은 언급으로 M5 Max에서 LLM의 prefill(사전 채우기) 작업이 실행되고 있음을 알리고 있습니다. M5 Max 기반 환경에서 LLM 관련 초기화/프리패치 작업이 실사용 가능해졌음을 시사합니다.

https://x.com/awnihannun/status/2028855394492391901

#m5max #llm #prefill

Awni Hannun (@awnihannun) on X

LLM prefill on M5 Max

X (formerly Twitter)

Tarjei Mandt (@kernelpool)

스파스 어텐션(sparse attention)이 prefill 단계에서 처리 속도를 저하시킨다는 기술적 관찰을 공유하며, 해당 문제는 해결 가능하다는 언급입니다. LLM 추론 파이프라인(특히 prefill)과 어텐션 최적화 관점에서 중요한 성능 이슈와 개선 여지를 제기합니다.

https://x.com/kernelpool/status/2022691285312901537

#sparseattention #prefill #performance #modeloptimization

Tarjei Mandt (@kernelpool) on X

@ivanfioravanti The sparse attention is slowing down the prefill, however, it can be fixed

X (formerly Twitter)

Claude Code가 모델이 하지도 않은 말을 했다고 하는 이유.

https://hackers.pub/@jasonkim/2025/claude-code-prefill

Claude Code가 모델이 하지도 않은 말을 했다고 하는 이유.

Claude Code에서 첫 번째 요청을 입력하면 가장 먼저 다음과 같은 JSON을 API로 보낸다. 이 요청은 실제 작업에 앞서 대화 주제를 파악하고 제목을 생성하기 위한 보조 요청이다. { "model": "claude-haiku-4-5-20251001", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Request Body의 구조를 분석하고 분류별로 묶어서 표현한다. ultrathink" } ] }, { "role": "assistant", "content": [ { "type": "text", "text": "{" } ] } ], "system": [ { "type": "text", "text": "You are Claude Code, Anthropic's official CLI for Claude." }, { "type": "text", "text": "Analyze if this message indicates a new conversation topic. If it does, extract a 2-3 word title that captures the new topic. Format your response as a JSON object with two fields: 'isNewTopic' (boolean) and 'title' (string, or null if isNewTopic is false). Only include these fields, no other text. ONLY generate the JSON object, no other text (eg. no markdown)." } ], "tools": [], "metadata": { "user_id": "user-id" }, "max_tokens": 32000, "stream": true} 시스템 프롬프트를 보면 이 요청이 신규 대화인지 판단하고, 신규 대화라면 2-3 단어의 제목을 추출하여 isNewTopic과 title 필드로 구성된 JSON만 반환하라고 지시하고 있다. 여기서 내 눈에 띈 것은 첫 번째 요청임에도 불구하고 마치 멀티턴 대화가 진행된 것처럼 messages의 마지막 role이 assistant라는 점이었다. 게다가 Claude가 { 한 글자만 응답한 것처럼 구성되어 있다. 이 요청에 대한 응답은 다음과 같다. { "id": "msg_id", "type": "message", "role": "assistant", "model": "claude-haiku-4-5-20251001", "content": [ { "type": "text", "text": "\n \"isNewTopic\": true,\n \"title\": \"Request Body Formatting\"\n}" } ], "stop_reason": "end_turn", "stop_sequence": null, "usage": { "input_tokens": 187, "output_tokens": 26, "cache_creation_input_tokens": 0, "cache_read_input_tokens": 0 }} content.text를 보기좋게 정리해서 적으면 다음과 같다. "isNewTopic": true, "title": "Request Body Formatting"} 완전한 JSON에서 맨 앞의 {가 빠진 형태다. 알고 보니 이것은 prefill 기법이라 불리는 것으로, 모델이 응답의 앞부분을 이미 출력한 것처럼 설정하여 이어지는 응답을 원하는 형식으로 유도하는 방법이다. Claude Code는 이 기법을 활용해 모델이 JSON 형식으로 응답하도록 강제하고 있다. 단순히 "JSON으로 응답해줘"라고 요청하는 것보다 훨씬 확실한 방법이다. 모델 입장에서는 이미 {로 시작했으니 자연스럽게 JSON을 완성할 수밖에 없기 때문이다. Prefill은 JSON 외에도 다양하게 활용할 수 있다. 예를 들어 ```python으로 시작하면 모델이 파이썬 코드 블록을 완성하게 되고, <analysis>로 시작하면 XML 형식의 응답을 유도할 수 있다.

Hackers' Pub
UK's largest grocery retailers set sights on #Prefill to take more #SingleUse packaging off shelf https://share.google/XNk5T1ITG9vkqY48A
#Reuse
#WRAP #Aldi #Asda #CoOp #Lidl #Morrisons #Ocado #Sainsbury #Tesco #Waitrose