config.py
476 Bytes
"""Reranker service configuration (simple Python config)."""
class RerankerConfig(object):
# Server
HOST = "0.0.0.0"
PORT = 6007
# Model
MODEL_NAME = "BAAI/bge-reranker-v2-m3"
DEVICE = None # None -> auto (cuda if available)
USE_FP16 = True
BATCH_SIZE = 64
MAX_LENGTH = 512
CACHE_DIR = "./model_cache"
ENABLE_WARMUP = True
# Request limits
MAX_DOCS = 1000
# Output
NORMALIZE = True
CONFIG = RerankerConfig()