From ae7fce7d105661b4dcb700ea3711bda8d3c2c2f8 Mon Sep 17 00:00:00 2001 From: OwnerSunshine530 Date: Tue, 16 Jun 2026 18:35:33 +0800 Subject: [PATCH] =?UTF-8?q?final:=20precompute=5Frep=20=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=85=B3(=E8=AF=84=E6=B5=8B=E7=AB=AF=E4=B8=89=E8=BF=9E?= =?UTF-8?q?=E5=9B=9E=E9=80=80,=E6=97=A0=E6=97=A5=E5=BF=97=E9=9A=BE?= =?UTF-8?q?=E8=AF=8A=E6=96=AD)=20=E2=80=94=20=E9=94=81=E5=AE=9A=E5=B9=B2?= =?UTF-8?q?=E5=87=80=20~68?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.8 --- 代码/code/infer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/代码/code/infer.py b/代码/code/infer.py index 0fb79a6..410a0be 100644 --- a/代码/code/infer.py +++ b/代码/code/infer.py @@ -55,8 +55,8 @@ CONFIG = { "dedup_embedding": True, # True=查表前对sign去重(只查唯一值再展开),本地7.80->6.49s,AUC逐位等价 "sparse_pool": False, # True=用(段×唯一)稀疏矩阵乘做池化,避免materialize整个[M,512](段内高重复时省) "compile": False, # 是否 torch.compile(实测慢5×,勿开) - # 预计算改为"捕获评测端 item_dict"(不猜路径/不重载/max_feasign必一致/gather必命中),根治回退。 - "precompute_rep": True, # True=load_model预计算RepEncoder向量跳过embedding层(灰区,评测真生效) + # 预计算三种实现在评测端均回退(无日志难诊断,推测评测调用顺序让load_model拿不到数据)。默认关。 + "precompute_rep": False, # True=load_model预计算RepEncoder向量(评测端三连回退,本地可跑见RISKS.md) }