-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yml
More file actions
123 lines (112 loc) · 3.82 KB
/
Copy pathconfig.yml
File metadata and controls
123 lines (112 loc) · 3.82 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# 可调用 POST /admin/reload-config 立即强制重载。
gpu:
# 主开关:false = 单卡模式(GPU 0),适用于单卡机器或调试
multi_gpu_enabled: false
# ESM2 编码使用的设备:"auto"(选显存最多的 GPU)| "cuda:0" | "cpu"
encoding_device: "auto"
# FAISS 使用的 GPU 列表:"auto"(所有可用 GPU)| [0, 1, 2]
faiss_devices: "auto"
# FAISS StandardGpuResources 临时显存限制(MB)
faiss_temp_memory_mb: 1500
# GPU 显存预留(MB),低于此值时不选该 GPU
memory_reserve_mb: 500
# IVF-PQ 检索时使用 FP16 查找表(LUT):降低显存占用,在支持 FP16 的 GPU 上可提速
# 代价是轻微精度损失;仅对 IVF-PQ 索引有效,Flat/HNSW 忽略此项
fp16_lut: true
search:
faiss_search_workers: 8
max_concurrent_encodings: 3
threadpool_workers: 32
faiss_nprobe: 8
# 闲时自动释放显存:检索完成后等待此秒数再卸载该用户的 FAISS index(0 = 禁用)
time_release_vram: 30
build:
encoding_batch_size: 32
max_per_shard: 500000
db_batch_size: 500
# IVF-PQ 参数
ivfpq_nlist: 256
ivfpq_m: 48 # 5080极限
ivfpq_nbits: 8
# HNSW 参数
hnsw_m: 32
hnsw_ef_construction: 200
# 每次向 GPU 索引 add 的向量数(避免 OOM)
add_batch_size: 200000
scheduler:
# 系统 GPU 总 slot 数(逻辑限流,可小于物理 GPU 数)
total_gpu_slots: 1
# 默认用户 GPU 配额(超管可修改)
default_user_gpu_quota: 1
# 调度循环间隔(秒)
poll_interval: 0.5
# search 任务 GPU 占用超时(秒)
search_gpu_timeout: 60
# build 任务 GPU 占用超时(秒)
build_gpu_timeout: 86400
# fair-share 每日衰减因子
decay_factor: 0.95
# search 基础优先级(越小越优先)
search_base_priority: 10
# build 基础优先级
build_base_priority: 100
# 同时驻留 GPU 的数据集 FAISS 缓存数
max_cached_datasets: 4
daemon:
# IPC TCP server address (127.0.0.1 for local dev; 0.0.0.0 in K8s/cluster)
ipc_host: "0.0.0.0"
# IPC TCP port (Windows 动态保留范围 9788-9887)
ipc_port: 9002
# PID file directory
pid_dir: "~/.protfaiss"
api:
# HTTP server bind address
host: "0.0.0.0"
# HTTP server port
port: 8000
# Number of persistent IPC connections to the daemon
ipc_pool_size: 4
# PostgreSQL database connection
database:
host: "localhost"
port: 5432
dbname: "protein_db"
user: "postgres"
# 生产环境推荐通过 DB_PASSWORD 环境变量传入,避免明文写入配置文件
password: "0909"
max_connections: 20
# Redis — shared task state store (required in cluster mode)
redis:
host: "localhost"
port: 6379
db: 0
password: ""
# Shared storage — must be NFS-mounted on all nodes in cluster mode
storage:
# Overrides DATASETS_ROOT from core.config if set (leave empty for legacy path)
datasets_root: ""
# Overrides ESM2_MODEL_DIR from core.config if set (leave empty for legacy path)
models_root: ""
# Distributed cluster configuration
cluster:
# false = single-node legacy mode; true = multi-node worker dispatch mode
enabled: true
# Control plane IPC address that workers connect to for registration/heartbeats
# (same as daemon.ipc_host/ipc_port — listed here for clarity)
control_plane_host: "127.0.0.1"
control_plane_port: 9002
# Task result TTL in Redis (seconds)
task_ttl: 600
# Worker heartbeat interval (seconds)
heartbeat_interval: 5
# Worker considered dead after this many seconds without a heartbeat
heartbeat_timeout: 15
# Retries when control plane fails to reach a worker before deregistering it
retry_num: 5
# GPU Worker node configuration (used when running app.worker)
worker:
# Address this worker listens on for task dispatch from the control plane
host: "0.0.0.0"
port: 9100
# Human-readable node identifier (defaults to hostname if empty)
node_id: "win"