ollama gemma4 모델 로딩 에러, Gemma4Assistant requires ctx_other to be set 해결
FastAPI 서비스와 로컬 Ollama서비스를 띄워서 LLM서비스를 가동하다가 코드 수정 후 재부팅하는데 다음과 같은 오류가 발생했다. llama-server process has terminated: llama_init_from_model: failed to initialize the context: Gemma4Assistant requires ctx_other to be set (this warning is normal during memory fitting): 1. vram 부족? 첫번째 원인으로 vram 부족을 예상했으나, 다음과 같은 이유로 기각했다. - vram을 그렇게 많이 점유하는 모델이 아니다. 사전에 최대 context를 사용할 때 차지하는 vram 크기를 조사했었고 넉넉했다. 그리고 이전에도 멀쩡하게 vram에 올라가던 모델이었다. 2. ctx_other 파라미터 두번째 원인으로 로그에서 보여주듯이 ctx_other? 파라미터 미지정을 예상했으나, - ollama run command에는 ctx_other 라는 파라미터를 지정할 수 없었고 - num_ctx를 ollama 패키지의 AsyncClient의 옵션에 부여했지만 달라지는 건 없었다. from ollama import AsyncClient async def ask_ollama ( self , messages : List [ dict ]) -> str : client = AsyncClient () response = await client .chat( model = self . model , messages = messages , format =...