Quazim0t0 commited on
Commit
445aa36
·
verified ·
1 Parent(s): 728ce28

Upload web/public/app.js with huggingface_hub

Browse files
Files changed (1) hide show
  1. web/public/app.js +10 -0
web/public/app.js CHANGED
@@ -601,7 +601,17 @@ const gemmAudit = {
601
  due: () => true, // measured at <0.01% of a step
602
  fail: (msg) => { if (!auditFailure) { auditFailure = msg; log(`KERNEL AUDIT FAILED: ${msg}`); } },
603
  };
 
 
 
 
 
 
604
  async function refreshProbe() {
 
 
 
 
605
  try { probeHash = await Compute.kernelProbe(compute, L); }
606
  catch (e) { log(`kernel probe failed to run: ${e.message}`); }
607
  return probeHash;
 
601
  due: () => true, // measured at <0.01% of a step
602
  fail: (msg) => { if (!auditFailure) { auditFailure = msg; log(`KERNEL AUDIT FAILED: ${msg}`); } },
603
  };
604
+ // Logged once so a probe mismatch is diagnosable: the probe folds the kernel
605
+ // hash and the JS-transcendental hash together, and this says which library
606
+ // this browser has. Peers whose math hash differs have a different JS engine
607
+ // math implementation, which forks weight INIT (Box-Muller) even when every
608
+ // kernel is perfect.
609
+ let mathHash = 0;
610
  async function refreshProbe() {
611
+ if (!mathHash) {
612
+ mathHash = Compute.mathProbe();
613
+ log(`JS math library hash: ${mathHash.toString(16)} (peers must match; ECMA-262 does not require exp/log/cos/sin to be correctly rounded)`);
614
+ }
615
  try { probeHash = await Compute.kernelProbe(compute, L); }
616
  catch (e) { log(`kernel probe failed to run: ${e.message}`); }
617
  return probeHash;