feat: 임베딩 모델 변경 — nomic-embed-text → bge-m3 (1024차원, 다국어)

- config.yaml: embedding model → bge-m3
- document.py: Vector(768) → Vector(1024)
- embed_worker.py: 모델 버전 업데이트
- migration 011: 벡터 컬럼 재생성 (기존 임베딩 초기화)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-04-06 12:49:45 +09:00
parent 204c5ca99f
commit bf8efd1cd3
4 changed files with 12 additions and 5 deletions

View File

@@ -1,4 +1,4 @@
"""벡터 임베딩 워커 — GPU 서버 nomic-embed-text 호출"""
"""벡터 임베딩 워커 — GPU 서버 bge-m3 호출"""
from datetime import datetime, timezone
@@ -10,9 +10,9 @@ from models.document import Document
logger = setup_logger("embed_worker")
# 임베딩용 텍스트 최대 길이 (nomic-embed-text: 8192 토큰)
# 임베딩용 텍스트 최대 길이 (bge-m3: 8192 토큰)
MAX_EMBED_TEXT = 6000
EMBED_MODEL_VERSION = "nomic-embed-text-v1.5"
EMBED_MODEL_VERSION = "bge-m3"
async def process(document_id: int, session: AsyncSession) -> None: