Blame view

reranker/config.py 476 Bytes
d90e7428   tangwang   补充重排
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  """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()