Commit 418b6a4a5e62dce57b02b9c13b7b66b8ba6d0dbc

Authored by tangwang
1 parent f8219b5e

调参

Showing 2 changed files with 8 additions and 8 deletions   Show diff stats
config/config.yaml
@@ -248,8 +248,8 @@ coarse_rank: @@ -248,8 +248,8 @@ coarse_rank:
248 248
249 # 精排配置(轻量 reranker) 249 # 精排配置(轻量 reranker)
250 fine_rank: 250 fine_rank:
251 - enabled: true  
252 - input_window: 240 251 + enabled: false
  252 + input_window: 160
253 output_window: 80 253 output_window: 80
254 timeout_sec: 10.0 254 timeout_sec: 10.0
255 rerank_query_template: "{query}" 255 rerank_query_template: "{query}"
@@ -259,7 +259,7 @@ fine_rank: @@ -259,7 +259,7 @@ fine_rank:
259 # 重排配置(provider/URL 在 services.rerank) 259 # 重排配置(provider/URL 在 services.rerank)
260 rerank: 260 rerank:
261 enabled: true 261 enabled: true
262 - rerank_window: 80 262 + rerank_window: 160
263 timeout_sec: 15.0 263 timeout_sec: 15.0
264 weight_es: 0.4 264 weight_es: 0.4
265 weight_ai: 0.6 265 weight_ai: 0.6
@@ -457,7 +457,7 @@ services: @@ -457,7 +457,7 @@ services:
457 model_name: "BAAI/bge-reranker-v2-m3" 457 model_name: "BAAI/bge-reranker-v2-m3"
458 device: null 458 device: null
459 use_fp16: true 459 use_fp16: true
460 - batch_size: 64 460 + batch_size: 80
461 max_length: 160 461 max_length: 160
462 cache_dir: "./model_cache" 462 cache_dir: "./model_cache"
463 enable_warmup: true 463 enable_warmup: true
search/es_query_builder.py
@@ -38,9 +38,9 @@ class ESQueryBuilder: @@ -38,9 +38,9 @@ class ESQueryBuilder:
38 knn_text_num_candidates_long: int = 500, 38 knn_text_num_candidates_long: int = 500,
39 knn_image_k: int = 120, 39 knn_image_k: int = 120,
40 knn_image_num_candidates: int = 400, 40 knn_image_num_candidates: int = 400,
41 - base_minimum_should_match: str = "70%",  
42 - translation_minimum_should_match: str = "70%",  
43 - keywords_minimum_should_match: str = "50%", 41 + base_minimum_should_match: str = "66%",
  42 + translation_minimum_should_match: str = "66%",
  43 + keywords_minimum_should_match: str = "60%",
44 translation_boost: float = 0.4, 44 translation_boost: float = 0.4,
45 tie_breaker_base_query: float = 0.9, 45 tie_breaker_base_query: float = 0.9,
46 best_fields_boosts: Optional[Dict[str, float]] = None, 46 best_fields_boosts: Optional[Dict[str, float]] = None,
@@ -549,7 +549,7 @@ class ESQueryBuilder: @@ -549,7 +549,7 @@ class ESQueryBuilder:
549 "query": kw, 549 "query": kw,
550 "fields": combined_fields, 550 "fields": combined_fields,
551 "minimum_should_match": self.keywords_minimum_should_match, 551 "minimum_should_match": self.keywords_minimum_should_match,
552 - "boost": 0.6, 552 + "boost": 0.8,
553 } 553 }
554 } 554 }
555 ) 555 )