Skip to content

refactor : Bloom Local LLM Runtime 전환 - #92

Open
sunwoo162 wants to merge 14 commits into
developfrom
refactor/bloom-local-llm-runtime
Open

refactor : Bloom Local LLM Runtime 전환#92
sunwoo162 wants to merge 14 commits into
developfrom
refactor/bloom-local-llm-runtime

Conversation

@sunwoo162

Copy link
Copy Markdown
Owner

✨ PR 내용

📝 코드 변경 사항

  • Codex/OpenAI 호출 없이 llama.cpp 기반 Local LLM을 사용하는 Bloom 호환 Runtime을 추가했습니다.
  • Qwen2.5-Coder-1.5B-Instruct Q4_K_M 단일 모델 실행 스크립트와 서버 프로비저닝 스크립트를 추가했습니다.
  • 기존 Codex exec/app-server 프로토콜을 Local LLM shim으로 호환하여 Intake, PM, Agent 실행 경로를 유지했습니다.
  • Local Agent tool loop에 repository read/search/write, 제한된 build/test/Git/GitHub PR 도구를 추가했습니다.
  • 전체 Local Agent session을 1개로 직렬화하고 RAM/CPU Resource Guard를 추가했습니다.
  • Local Runtime 정책 테스트와 환경변수 예시를 추가했습니다.

💡 변경 이유

  • Codex 사용량 제한과 외부 모델 API 비용 없이 Bloom Agent를 지속적으로 운영하기 위해 필요합니다.
  • 4 vCPU / 6GB RAM 서버에서 30 Agent identity를 유지하면서 실제 AI 추론과 build 부하를 제한하기 위해 필요합니다.

🛠️ 구현 방법

  • llama.cpp의 로컬 OpenAI-compatible endpoint를 Node compatibility runtime에서 호출합니다.
  • 기존 Rust Runtime이 기대하는 codex exec/app-server JSONL 계약을 로컬 shim에서 구현해 기존 orchestration을 재사용했습니다.
  • 모델 세션은 파일 lock으로 한 번에 하나만 허용하고 /proc/meminfo 및 load average를 확인해 서버 여유가 있을 때만 시작합니다.
  • Repository writer가 완료될 때 dirty worktree를 자동 commit/push하고 develop 대상 PR을 보장하도록 delivery finalization을 추가했습니다.

📌 영향 범위

  • bloom-worker Local Agent Runtime
  • Bloom Intake/PM/Agent 실행 경로
  • 서버 Local LLM 프로비저닝
  • Bloom worker build 및 환경변수 설정

✅ 테스트

  • Local LLM JSON parsing 및 report normalization 정책 테스트를 추가했습니다.
  • fake OpenAI-compatible HTTP server를 사용해 Local completion 호출을 검증합니다.
  • bloom-worker build에서 Local Runtime syntax 및 정책 테스트를 실행하도록 연결했습니다.

테스트 결과 / 참고 사항

  • 실제 Qwen 모델 다운로드와 6GB production 서버 실측은 PR Harness 통과 후 서버 배포 단계에서 검증합니다.
  • 모델 추론 API 비용은 없지만 기존 서버 운영 비용은 별도입니다.

🌿 반영 브랜치

  • develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant