perf+exp: gm_groups 只算特征 8 组(数值一致,features 10.4→7.1ms);混合节奏负结论(执行反馈无提升);浏览器部署 dag2 ONNX + fbGain/commit 参数(bench 刹车 47% 待调);实时口径改为异步规划+tick

This commit is contained in:
cbb
2026-10-20 12:38:56 +08:00
parent 3b748c811c
commit 79519b042c
7 changed files with 65 additions and 7 deletions
+3 -1
View File
@@ -55,7 +55,9 @@ async function boot() {
}
if (!sess) sess = await ort.InferenceSession.create(MODEL, { executionProviders: ep, graphOptimizationLevel: 'all' });
const infer = ArmPolicy.ortInfer(ort, sess, { encOnce: !!meta.enc_once, featDyn: !!meta.feat_dyn });
runner = new ArmPolicy.Runner(S, infer, { actScale: meta.act_scale || 1 }); // 2026-10-19:动作尺度随模型(旧模型无此字段 = 1)
const FB = qs.get('fb') === null ? 1.8 : +qs.get('fb'); // 2026-10-20:全程目标反馈(fb=0 关闭)
const COMMIT = qs.get('commit') === null ? 3 : Math.max(1, +qs.get('commit')); // 部署节奏:commit=1 每步规划
runner = new ArmPolicy.Runner(S, infer, { actScale: meta.act_scale || 1, fbGain: FB, commit: COMMIT }); // 2026-10-19:动作尺度随模型(旧模型无此字段 = 1)
/* 预热:首次推理有编译开销 */
await infer(new Float32Array(8 * ArmPolicy.F_DIM), new Float32Array(8 * ArmPolicy.H * 6), 8);
const tick = URL.createObjectURL(new Blob(['let h=null;onmessage=e=>{clearInterval(h);if(e.data>0)h=setInterval(()=>postMessage(0),e.data)}'], { type: 'text/javascript' }));