Pacific-i64 commited on
Commit
f7446bb
·
verified ·
1 Parent(s): c59cebc

Update paper for TR-HASH MoE 200M multi-hash SFT

Browse files
Files changed (2) hide show
  1. README.md +19 -11
  2. index.html +64 -64
README.md CHANGED
@@ -6,26 +6,34 @@ colorTo: green
6
  sdk: static
7
  app_file: index.html
8
  pinned: false
9
- license: apache-2.0
10
- short_description: Interactive report for the final TR-HASH-0.5B.
11
  ---
12
 
13
- # TR-HASH-0.5B — Interactive Architecture Report
14
 
15
- Interactive companion for the final **TR-HASH-0.5B** research checkpoint.
 
16
 
17
  The Space provides:
18
 
19
- - an architecture explorer for the shared SwiGLU and fixed top-2 residual path;
 
20
  - checkpoint-derived tokenizer IDs and expert assignments for selected tokens;
21
- - the recorded 20B-token pretraining and one-epoch SFT diagnostics;
22
- - live chat generation from `Pacific-i64/TR-HASH-MOE-500M-HF`.
23
 
24
- Its metrics describe only the final 492.1M model. They are training
25
- diagnostics, not a dense-baseline comparison or a general-capability benchmark.
 
 
 
 
 
26
 
27
  ## Sources
28
 
29
- - [TR-HASH-MOE-500M-HF](https://huggingface.co/Pacific-i64/TR-HASH-MOE-500M-HF)
 
30
  - [Training framework](https://github.com/Complexity-ML/complexity-framework)
31
- - [vllm-i64](https://github.com/Complexity-ML/vllm-i64)
 
6
  sdk: static
7
  app_file: index.html
8
  pinned: false
9
+ license: cc-by-nc-4.0
10
+ short_description: Interactive report for the TR-HASH MoE 200M multi-hash SFT.
11
  ---
12
 
13
+ # TR-HASH MoE 200M — Interactive Multi-Hash Report
14
 
15
+ Interactive companion for the **201.2M-parameter TR-HASH MoE full-SFT**
16
+ checkpoint selected from epoch 2 on PIQA.
17
 
18
  The Space provides:
19
 
20
+ - an architecture explorer for the shared SwiGLU and deterministic multi-hash
21
+ top-2 residual path;
22
  - checkpoint-derived tokenizer IDs and expert assignments for selected tokens;
23
+ - the recorded three-epoch full-parameter SFT and PIQA diagnostics;
24
+ - live chat generation from `AETHORIA-AI/TR-HASH-MoE-200M-160B-SFT`.
25
 
26
+ The model has 16 layers, a 32k vocabulary, GQA 14/2, four stored residual
27
+ experts, two independent token-ID hash routes per layer, and a shared dense
28
+ SwiGLU branch. There is no learned expert router and no LoRA adapter.
29
+
30
+ Its metrics describe only this 201.2M model. They are training diagnostics and
31
+ a full PIQA validation measurement, not a dense-baseline comparison or a broad
32
+ general-capability benchmark.
33
 
34
  ## Sources
35
 
36
+ - [TR-HASH MoE 200M full SFT](https://huggingface.co/AETHORIA-AI/TR-HASH-MoE-200M-160B-SFT)
37
+ - [160B-source refinement checkpoint](https://huggingface.co/AETHORIA-AI/TR-HASH-MoE-200M-160B-Refinement)
38
  - [Training framework](https://github.com/Complexity-ML/complexity-framework)
39
+ - [TR-Hash-i64](https://github.com/Complexity-ML/TR-Hash-i64)
index.html CHANGED
@@ -3,8 +3,8 @@
3
  <head>
4
  <meta charset="utf-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <meta name="description" content="Interactive architecture and training report for the final TR-HASH-0.5B checkpoint.">
7
- <title>TR-HASH-0.5B — Interactive Architecture Report</title>
8
  <link rel="stylesheet" href="./visualize.css">
9
  <script defer src="https://unpkg.com/lucide@1.17.0/dist/umd/lucide.js"></script>
10
  <style>
@@ -348,25 +348,25 @@
348
  <span class="tr-mark"><i data-lucide="git-branch" aria-hidden="true"></i></span>
349
  <span class="tr-brand-copy">
350
  <strong>COMPLEXITY</strong>
351
- <span class="text-small">TR-HASH-0.5B companion</span>
352
  </span>
353
  </div>
354
  <nav class="tr-actions" aria-label="Research links">
355
- <a class="btn btn-ghost" href="https://huggingface.co/Pacific-i64/TR-HASH-MOE-500M-HF" target="_blank" rel="noopener noreferrer"><i data-lucide="file-text" aria-hidden="true"></i> Model card</a>
356
  <a class="btn btn-ghost" href="https://github.com/Complexity-ML/complexity-framework" target="_blank" rel="noopener noreferrer"><i data-lucide="package-open" aria-hidden="true"></i> Training code</a>
357
- <a class="btn btn-ghost" href="https://huggingface.co/spaces/Pacific-i64/TR-HASH-0.5B" target="_blank" rel="noopener noreferrer"><i data-lucide="message-square" aria-hidden="true"></i> Live chat</a>
358
  </nav>
359
  </header>
360
 
361
  <section class="tr-hero">
362
  <div class="tr-hero-copy">
363
- <span class="tr-kicker text-small">Final research checkpoint</span>
364
- <h2>TR-HASH-0.5B</h2>
365
- <p>Explore how a balanced token-ID hash selects two narrow residual experts while a shared dense SwiGLU path preserves contextual computation.</p>
366
  <div class="tr-chip-row">
367
- <span class="viz-badge">492.1M parameters</span>
368
- <span class="viz-badge">20B pretraining tokens</span>
369
- <span class="viz-badge">24 layers · fixed top-2</span>
370
  </div>
371
  </div>
372
  <div class="tr-note text-small">
@@ -391,7 +391,7 @@
391
  <button class="btn tr-token-choice" type="button" data-token="shared">shared</button>
392
  </div>
393
 
394
- <div class="tr-architecture" role="img" aria-label="The contextual hidden state enters both a shared SwiGLU branch and two selected residual experts. Token identity controls only the fixed route table.">
395
  <svg class="tr-lines" aria-hidden="true">
396
  <path data-from=".tr-context" data-from-anchor="bottom" data-to=".tr-shared" data-to-anchor="top" fill="none" stroke="currentColor" stroke-width="1.5"/>
397
  <path class="active" data-from=".tr-context" data-from-anchor="bottom" data-to=".tr-experts" data-to-anchor="top" fill="none" stroke="currentColor"/>
@@ -412,23 +412,23 @@
412
  </div>
413
  <div class="tr-node tr-shared">
414
  <strong>Shared SwiGLU</strong>
415
- <span class="text-small">Width 4,864 · all tokens · contextual computation</span>
416
  </div>
417
  <div class="tr-node tr-table route-active">
418
- <strong>Fixed route table <em>r<sub>l</sub>(t)</em></strong>
419
- <span class="text-small">Balanced layer-specific hash · two of four experts</span>
420
  </div>
421
  <div class="tr-node tr-experts route-active">
422
- <strong style="grid-column:1/-1">Residual experts · width 128 each</strong>
423
- <span class="tr-expert" data-expert="0">E0</span>
424
- <span class="tr-expert route-active" data-expert="1">E1</span>
425
  <span class="tr-expert route-active" data-expert="2">E2</span>
426
  <span class="tr-expert" data-expert="3">E3</span>
427
  </div>
428
  <button class="btn tr-sum" type="button" data-tooltip="Element-wise branch sum" aria-label="Add the branch outputs">+</button>
429
  <div class="tr-node tr-output">
430
  <strong>Feed-forward output</strong>
431
- <span class="text-small">Shared + 2 × mean(E<span data-route-a>0</span>, E<span data-route-b>3</span>)</span>
432
  </div>
433
  </div>
434
  </div>
@@ -437,13 +437,13 @@
437
  <div class="tr-metric-grid">
438
  <div class="card viz-stat">
439
  <span class="text-muted text-small">Final model</span>
440
- <span class="viz-stat-value">492.1M</span>
441
  <span class="text-small">trainable parameters</span>
442
  </div>
443
  <div class="card viz-stat">
444
- <span class="text-muted text-small">Pretraining</span>
445
- <span class="viz-stat-value">20B</span>
446
- <span class="text-small">FineWeb-Edu tokens</span>
447
  </div>
448
  </div>
449
  <div class="card tr-route-detail">
@@ -451,11 +451,11 @@
451
  <i data-lucide="route" aria-hidden="true"></i>
452
  <strong>Selected route</strong>
453
  </div>
454
- <p data-route-copy>“routing” selects E0 + E3 in layer 1. Both assignments are read from the final checkpoint route table.</p>
455
  </div>
456
  <div class="card">
457
  <strong>Scope of evidence</strong>
458
- <p class="text-muted">One 492.1M pretraining run and one SFT epoch. The recorded losses are diagnostics, not a dense-baseline or general-capability benchmark.</p>
459
  </div>
460
  </aside>
461
  </section>
@@ -466,7 +466,7 @@
466
  <div class="tr-run-head">
467
  <div>
468
  <strong>Layer-specific deterministic routes</strong>
469
- <div class="text-small text-muted">Checkpoint-derived tokenizer IDs and fixed top-2 assignments.</div>
470
  </div>
471
  </div>
472
  <div class="tr-token-grid" style="margin-top:12px">
@@ -483,11 +483,11 @@
483
  <div class="card">
484
  <div class="tr-route-matrix" aria-label="Expert assignment matrix">
485
  <span></span><span class="text-small text-center">E0</span><span class="text-small text-center">E1</span><span class="text-small text-center">E2</span><span class="text-small text-center">E3</span>
486
- <span class="text-small">Layer 1</span><span class="tr-route-cell is-on" data-cell="1-0">0.5</span><span class="tr-route-cell" data-cell="1-1">—</span><span class="tr-route-cell" data-cell="1-2">—</span><span class="tr-route-cell is-on" data-cell="1-3">0.5</span>
487
- <span class="text-small">Layer 6</span><span class="tr-route-cell is-on" data-cell="6-0">0.5</span><span class="tr-route-cell" data-cell="6-1">—</span><span class="tr-route-cell is-on" data-cell="6-2">0.5</span><span class="tr-route-cell" data-cell="6-3">—</span>
 
488
  <span class="text-small">Layer 12</span><span class="tr-route-cell" data-cell="12-0">—</span><span class="tr-route-cell" data-cell="12-1">—</span><span class="tr-route-cell is-on" data-cell="12-2">0.5</span><span class="tr-route-cell is-on" data-cell="12-3">0.5</span>
489
- <span class="text-small">Layer 18</span><span class="tr-route-cell is-on" data-cell="18-0">0.5</span><span class="tr-route-cell" data-cell="18-1">—</span><span class="tr-route-cell is-on" data-cell="18-2">0.5</span><span class="tr-route-cell" data-cell="18-3">—</span>
490
- <span class="text-small">Layer 24</span><span class="tr-route-cell" data-cell="24-0">—</span><span class="tr-route-cell is-on" data-cell="24-1">0.5</span><span class="tr-route-cell is-on" data-cell="24-2">0.5</span><span class="tr-route-cell" data-cell="24-3">—</span>
491
  </div>
492
  </div>
493
  </div>
@@ -503,16 +503,16 @@
503
  <div class="text-small text-muted">Initial and final scheduled evaluations · NLL, lower is better</div>
504
  </div>
505
  </div>
506
- <div class="tr-result-chart" role="img" aria-label="Pretraining NLL decreased from 4.8554 to 2.6615. Matched SFT diagnostic NLL decreased from 3.4805 to 2.9669.">
507
  <div class="tr-bar-group">
508
- <div class="tr-bar" style="height:96%"><span>4.8554</span></div>
509
- <div class="tr-bar routed" style="height:53%"><span>2.6615</span></div>
510
- <div class="tr-bar-label text-small">Pretraining held-out</div>
511
  </div>
512
  <div class="tr-bar-group">
513
- <div class="tr-bar" style="height:69%"><span>3.4805</span></div>
514
- <div class="tr-bar routed" style="height:59%"><span>2.9669</span></div>
515
- <div class="tr-bar-label text-small">Matched SFT diagnostic</div>
516
  </div>
517
  </div>
518
  <div class="tr-legend text-small" style="margin-top:30px">
@@ -526,14 +526,14 @@
526
  <tr><th>Measurement</th><th class="text-end">Initial</th><th class="text-end">Final</th></tr>
527
  </thead>
528
  <tbody>
529
- <tr><td>Pretraining held-out NLL</td><td class="text-end">4.8554 @ 1k</td><td class="text-end">2.6615 @ 76k</td></tr>
530
- <tr><td>Pretraining held-out PPL</td><td class="text-end">128.43</td><td class="text-end">14.32</td></tr>
531
- <tr><td>Matched SFT NLL</td><td class="text-end">3.4805</td><td class="text-end">2.9669</td></tr>
532
- <tr><td>Natural-gold SFT NLL</td><td class="text-end">3.0644</td><td class="text-end">2.6866</td></tr>
533
- <tr><td>Training coverage</td><td class="text-end">20B pretrain</td><td class="text-end">31.37M supervised</td></tr>
534
  </tbody>
535
  </table>
536
- <p class="text-small text-muted">Pretraining evaluation is held out. SFT diagnostics use a 672-example matched set and a 28-example natural-gold set; the latter is too small for a stable capability claim.</p>
537
  </div>
538
  </div>
539
  </section>
@@ -551,18 +551,18 @@
551
  <div class="tr-compare-grid">
552
  <div class="card">
553
  <div class="tr-run-head">
554
- <strong>TR-HASH-0.5B</strong>
555
  <span class="viz-badge" data-routed-state>ready</span>
556
  </div>
557
  <p class="tr-generation" data-routed-output aria-live="polite">The model response will stream here token by token.</p>
558
  </div>
559
  <div class="card">
560
  <strong>Decode configuration</strong>
561
- <p class="text-muted">Chat endpoint · temperature 0.7 · top-k 40 · top-p 0.9 · repetition penalty 1.1 · maximum 128 new tokens.</p>
562
  <p class="text-small text-muted">This is a qualitative demonstration of the released SFT checkpoint, not an evaluation result.</p>
563
  </div>
564
  </div>
565
- <div class="tr-status text-small" data-status>TR-HASH-0.5B · live qualitative generation</div>
566
  </section>
567
  </div>
568
 
@@ -572,14 +572,14 @@
572
  if (!root) return;
573
 
574
  const routes = {
575
- routing: { id: 22447, layers: [[0, 3], [2, 0], [2, 3], [0, 2], [2, 1]] },
576
- context: { id: 4057, layers: [[0, 3], [3, 2], [1, 0], [2, 1], [1, 0]] },
577
- expert: { id: 5217, layers: [[2, 1], [1, 3], [2, 1], [2, 0], [3, 0]] },
578
- shared: { id: 5586, layers: [[1, 0], [1, 0], [0, 1], [1, 2], [0, 1]] },
579
- token: { id: 23394, layers: [[2, 3], [1, 0], [0, 1], [0, 2], [0, 3]] },
580
- model: { id: 2181, layers: [[3, 2], [2, 0], [1, 2], [1, 3], [0, 1]] },
581
- dense: { id: 8581, layers: [[0, 3], [3, 1], [2, 1], [2, 0], [0, 1]] },
582
- learned: { id: 4273, layers: [[2, 1], [1, 0], [0, 1], [1, 2], [1, 0]] }
583
  };
584
 
585
  const tabs = [...root.querySelectorAll(".tr-tab")];
@@ -650,7 +650,7 @@
650
  root.querySelector("[data-route-a]").textContent = String(pair[0]);
651
  root.querySelector("[data-route-b]").textContent = String(pair[1]);
652
  root.querySelector("[data-route-copy]").textContent =
653
- `“${token}” selects E${pair[0]} + E${pair[1]} in layer 1. Both assignments are read from the final checkpoint route table.`;
654
  root.querySelectorAll("[data-expert]").forEach((expert) => {
655
  expert.classList.toggle("route-active", pair.includes(Number(expert.dataset.expert)));
656
  });
@@ -666,7 +666,7 @@
666
  const updateMatrix = (token) => {
667
  const route = routes[token];
668
  if (!route) return;
669
- const layers = [1, 6, 12, 18, 24];
670
  layers.forEach((layer, layerIndex) => {
671
  const [a, b] = route.layers[layerIndex];
672
  for (let expert = 0; expert < 4; expert += 1) {
@@ -680,14 +680,14 @@
680
  button.classList.toggle("is-selected", button.dataset.labToken === token);
681
  });
682
  root.querySelector("[data-lab-detail]").textContent =
683
- `Token “${token}” (ID ${route.id}) follows these persisted layer-specific routes in the final checkpoint.`;
684
  };
685
 
686
  root.querySelectorAll(".tr-token-btn").forEach((button) => {
687
  button.addEventListener("click", () => updateMatrix(button.dataset.labToken));
688
  });
689
 
690
- const CHAT_ENDPOINT = "https://pacific-i64-tr-hash-0-5b.hf.space/v1/chat/completions";
691
  let activeController = null;
692
 
693
  const consumeSSE = async (response, onEvent) => {
@@ -741,7 +741,7 @@
741
  routedOutput.textContent = "";
742
  routedState.textContent = "connecting";
743
  runButton.textContent = "Stop generation";
744
- status.textContent = "Connecting to the TR-HASH-0.5B chat endpoint…";
745
  status.classList.add("is-live");
746
 
747
  try {
@@ -749,12 +749,12 @@
749
  method: "POST",
750
  headers: { "Content-Type": "application/json" },
751
  body: JSON.stringify({
752
- model: "tr-hash-moe-500m",
753
  messages: [{ role: "user", content: prompt }],
754
- max_tokens: 128,
755
- temperature: 0.7,
756
- top_k: 40,
757
- top_p: 0.9,
758
  repetition_penalty: 1.1,
759
  stream: true
760
  }),
 
3
  <head>
4
  <meta charset="utf-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <meta name="description" content="Interactive architecture, multi-hash routing and evaluation report for TR-HASH MoE 200M full SFT.">
7
+ <title>TR-HASH MoE 200M — Interactive Multi-Hash Report</title>
8
  <link rel="stylesheet" href="./visualize.css">
9
  <script defer src="https://unpkg.com/lucide@1.17.0/dist/umd/lucide.js"></script>
10
  <style>
 
348
  <span class="tr-mark"><i data-lucide="git-branch" aria-hidden="true"></i></span>
349
  <span class="tr-brand-copy">
350
  <strong>COMPLEXITY</strong>
351
+ <span class="text-small">TR-HASH MoE 200M companion</span>
352
  </span>
353
  </div>
354
  <nav class="tr-actions" aria-label="Research links">
355
+ <a class="btn btn-ghost" href="https://huggingface.co/AETHORIA-AI/TR-HASH-MoE-200M-160B-SFT" target="_blank" rel="noopener noreferrer"><i data-lucide="file-text" aria-hidden="true"></i> Model card</a>
356
  <a class="btn btn-ghost" href="https://github.com/Complexity-ML/complexity-framework" target="_blank" rel="noopener noreferrer"><i data-lucide="package-open" aria-hidden="true"></i> Training code</a>
357
+ <a class="btn btn-ghost" href="https://huggingface.co/spaces/Pacific-i64/TR-hash-tiny" target="_blank" rel="noopener noreferrer"><i data-lucide="message-square" aria-hidden="true"></i> Live chat</a>
358
  </nav>
359
  </header>
360
 
361
  <section class="tr-hero">
362
  <div class="tr-hero-copy">
363
+ <span class="tr-kicker text-small">PIQA-selected full-SFT checkpoint</span>
364
+ <h2>TR-HASH MoE 200M</h2>
365
+ <p>Explore how two deterministic, layer-specific token-ID hashes select a top-2 pair of residual experts while a shared dense SwiGLU path preserves contextual computation.</p>
366
  <div class="tr-chip-row">
367
+ <span class="viz-badge">201.2M parameters</span>
368
+ <span class="viz-badge">≈162B source-token exposure</span>
369
+ <span class="viz-badge">16 layers · multi-hash top-2</span>
370
  </div>
371
  </div>
372
  <div class="tr-note text-small">
 
391
  <button class="btn tr-token-choice" type="button" data-token="shared">shared</button>
392
  </div>
393
 
394
+ <div class="tr-architecture" role="img" aria-label="The contextual hidden state enters both a shared SwiGLU branch and two residual experts selected by two deterministic token-ID hash channels. Token identity controls only the fixed route table.">
395
  <svg class="tr-lines" aria-hidden="true">
396
  <path data-from=".tr-context" data-from-anchor="bottom" data-to=".tr-shared" data-to-anchor="top" fill="none" stroke="currentColor" stroke-width="1.5"/>
397
  <path class="active" data-from=".tr-context" data-from-anchor="bottom" data-to=".tr-experts" data-to-anchor="top" fill="none" stroke="currentColor"/>
 
412
  </div>
413
  <div class="tr-node tr-shared">
414
  <strong>Shared SwiGLU</strong>
415
+ <span class="text-small">Width 3,072 · all tokens · contextual computation</span>
416
  </div>
417
  <div class="tr-node tr-table route-active">
418
+ <strong>Multi-hash route table <em>r<sub>l,1:2</sub>(t)</em></strong>
419
+ <span class="text-small">Two deterministic hashes per layer · two of four experts</span>
420
  </div>
421
  <div class="tr-node tr-experts route-active">
422
+ <strong style="grid-column:1/-1">Residual experts · width 256 each</strong>
423
+ <span class="tr-expert route-active" data-expert="0">E0</span>
424
+ <span class="tr-expert" data-expert="1">E1</span>
425
  <span class="tr-expert route-active" data-expert="2">E2</span>
426
  <span class="tr-expert" data-expert="3">E3</span>
427
  </div>
428
  <button class="btn tr-sum" type="button" data-tooltip="Element-wise branch sum" aria-label="Add the branch outputs">+</button>
429
  <div class="tr-node tr-output">
430
  <strong>Feed-forward output</strong>
431
+ <span class="text-small">Shared + 2 × mean(E<span data-route-a>0</span>, E<span data-route-b>2</span>)</span>
432
  </div>
433
  </div>
434
  </div>
 
437
  <div class="tr-metric-grid">
438
  <div class="card viz-stat">
439
  <span class="text-muted text-small">Final model</span>
440
+ <span class="viz-stat-value">201.2M</span>
441
  <span class="text-small">trainable parameters</span>
442
  </div>
443
  <div class="card viz-stat">
444
+ <span class="text-muted text-small">Source exposure</span>
445
+ <span class="viz-stat-value">≈162B</span>
446
+ <span class="text-small">130B base + 32.07B refinement</span>
447
  </div>
448
  </div>
449
  <div class="card tr-route-detail">
 
451
  <i data-lucide="route" aria-hidden="true"></i>
452
  <strong>Selected route</strong>
453
  </div>
454
+ <p data-route-copy>“routing” selects E0 + E2 in layer 1. Both assignments are read from the checkpoint's two-channel multi-hash route table.</p>
455
  </div>
456
  <div class="card">
457
  <strong>Scope of evidence</strong>
458
+ <p class="text-muted">One 201.2M base/refinement trajectory followed by three epochs of full-parameter SFT. This is not LoRA and the model has no learned expert router.</p>
459
  </div>
460
  </aside>
461
  </section>
 
466
  <div class="tr-run-head">
467
  <div>
468
  <strong>Layer-specific deterministic routes</strong>
469
+ <div class="text-small text-muted">Checkpoint-derived tokenizer IDs and deterministic two-hash top-2 assignments.</div>
470
  </div>
471
  </div>
472
  <div class="tr-token-grid" style="margin-top:12px">
 
483
  <div class="card">
484
  <div class="tr-route-matrix" aria-label="Expert assignment matrix">
485
  <span></span><span class="text-small text-center">E0</span><span class="text-small text-center">E1</span><span class="text-small text-center">E2</span><span class="text-small text-center">E3</span>
486
+ <span class="text-small">Layer 1</span><span class="tr-route-cell is-on" data-cell="1-0">0.5</span><span class="tr-route-cell" data-cell="1-1">—</span><span class="tr-route-cell is-on" data-cell="1-2">0.5</span><span class="tr-route-cell" data-cell="1-3">—</span>
487
+ <span class="text-small">Layer 4</span><span class="tr-route-cell" data-cell="4-0">—</span><span class="tr-route-cell is-on" data-cell="4-1">0.5</span><span class="tr-route-cell is-on" data-cell="4-2">0.5</span><span class="tr-route-cell" data-cell="4-3">—</span>
488
+ <span class="text-small">Layer 8</span><span class="tr-route-cell" data-cell="8-0">—</span><span class="tr-route-cell is-on" data-cell="8-1">0.5</span><span class="tr-route-cell is-on" data-cell="8-2">0.5</span><span class="tr-route-cell" data-cell="8-3">—</span>
489
  <span class="text-small">Layer 12</span><span class="tr-route-cell" data-cell="12-0">—</span><span class="tr-route-cell" data-cell="12-1">—</span><span class="tr-route-cell is-on" data-cell="12-2">0.5</span><span class="tr-route-cell is-on" data-cell="12-3">0.5</span>
490
+ <span class="text-small">Layer 16</span><span class="tr-route-cell" data-cell="16-0">—</span><span class="tr-route-cell" data-cell="16-1">—</span><span class="tr-route-cell is-on" data-cell="16-2">0.5</span><span class="tr-route-cell is-on" data-cell="16-3">0.5</span>
 
491
  </div>
492
  </div>
493
  </div>
 
503
  <div class="text-small text-muted">Initial and final scheduled evaluations · NLL, lower is better</div>
504
  </div>
505
  </div>
506
+ <div class="tr-result-chart" role="img" aria-label="Held-out SFT NLL decreased from 1.7628 to 1.2209. PIQA normalized accuracy increased from 68.39 percent at the refinement source to 69.31 percent at selected SFT epoch 2.">
507
  <div class="tr-bar-group">
508
+ <div class="tr-bar" style="height:88%"><span>1.7628</span></div>
509
+ <div class="tr-bar routed" style="height:61%"><span>1.2209</span></div>
510
+ <div class="tr-bar-label text-small">Held-out SFT NLL</div>
511
  </div>
512
  <div class="tr-bar-group">
513
+ <div class="tr-bar" style="height:68.39%"><span>68.39%</span></div>
514
+ <div class="tr-bar routed" style="height:69.31%"><span>69.31%</span></div>
515
+ <div class="tr-bar-label text-small">PIQA acc_norm</div>
516
  </div>
517
  </div>
518
  <div class="tr-legend text-small" style="margin-top:30px">
 
526
  <tr><th>Measurement</th><th class="text-end">Initial</th><th class="text-end">Final</th></tr>
527
  </thead>
528
  <tbody>
529
+ <tr><td>Held-out SFT NLL</td><td class="text-end">1.7628 @ source</td><td class="text-end">1.2209 @ epoch 3</td></tr>
530
+ <tr><td>Held-out SFT PPL</td><td class="text-end">5.83</td><td class="text-end">3.39</td></tr>
531
+ <tr><td>PIQA accuracy</td><td class="text-end">68.66% refinement</td><td class="text-end">68.82% epoch 2</td></tr>
532
+ <tr><td>PIQA acc_norm</td><td class="text-end">68.39% refinement</td><td class="text-end">69.31% epoch 2</td></tr>
533
+ <tr><td>SFT coverage</td><td class="text-end">209k records</td><td class="text-end">3 epochs · 238.9M tokens</td></tr>
534
  </tbody>
535
  </table>
536
+ <p class="text-small text-muted">SFT loss uses the fixed 2,100-example held-out split. PIQA uses all 1,838 validation examples, zero-shot causal continuation likelihood, no chat template, and FP16 eager evaluation.</p>
537
  </div>
538
  </div>
539
  </section>
 
551
  <div class="tr-compare-grid">
552
  <div class="card">
553
  <div class="tr-run-head">
554
+ <strong>TR-HASH MoE 200M · Full SFT</strong>
555
  <span class="viz-badge" data-routed-state>ready</span>
556
  </div>
557
  <p class="tr-generation" data-routed-output aria-live="polite">The model response will stream here token by token.</p>
558
  </div>
559
  <div class="card">
560
  <strong>Decode configuration</strong>
561
+ <p class="text-muted">Chat endpoint · temperature 0.4 · top-k 30 · top-p 0.85 · repetition penalty 1.1 · maximum 384 new tokens.</p>
562
  <p class="text-small text-muted">This is a qualitative demonstration of the released SFT checkpoint, not an evaluation result.</p>
563
  </div>
564
  </div>
565
+ <div class="tr-status text-small" data-status>TR-HASH MoE 200M · live qualitative generation</div>
566
  </section>
567
  </div>
568
 
 
572
  if (!root) return;
573
 
574
  const routes = {
575
+ routing: { id: 22447, layers: [[0, 2], [1, 2], [2, 1], [2, 3], [3, 2]] },
576
+ context: { id: 4057, layers: [[2, 1], [2, 0], [3, 1], [2, 3], [1, 3]] },
577
+ expert: { id: 5217, layers: [[2, 3], [3, 0], [2, 0], [1, 3], [0, 1]] },
578
+ shared: { id: 5586, layers: [[2, 1], [2, 0], [3, 1], [1, 2], [2, 1]] },
579
+ token: { id: 23394, layers: [[1, 0], [1, 2], [0, 3], [1, 3], [0, 3]] },
580
+ model: { id: 2181, layers: [[2, 1], [3, 2], [3, 1], [1, 3], [1, 0]] },
581
+ dense: { id: 8581, layers: [[3, 1], [1, 2], [2, 3], [2, 0], [1, 2]] },
582
+ learned: { id: 4273, layers: [[1, 0], [2, 0], [3, 2], [0, 3], [3, 2]] }
583
  };
584
 
585
  const tabs = [...root.querySelectorAll(".tr-tab")];
 
650
  root.querySelector("[data-route-a]").textContent = String(pair[0]);
651
  root.querySelector("[data-route-b]").textContent = String(pair[1]);
652
  root.querySelector("[data-route-copy]").textContent =
653
+ `“${token}” selects E${pair[0]} + E${pair[1]} in layer 1. The pair comes from the two deterministic hash channels stored in the 200M checkpoint.`;
654
  root.querySelectorAll("[data-expert]").forEach((expert) => {
655
  expert.classList.toggle("route-active", pair.includes(Number(expert.dataset.expert)));
656
  });
 
666
  const updateMatrix = (token) => {
667
  const route = routes[token];
668
  if (!route) return;
669
+ const layers = [1, 4, 8, 12, 16];
670
  layers.forEach((layer, layerIndex) => {
671
  const [a, b] = route.layers[layerIndex];
672
  for (let expert = 0; expert < 4; expert += 1) {
 
680
  button.classList.toggle("is-selected", button.dataset.labToken === token);
681
  });
682
  root.querySelector("[data-lab-detail]").textContent =
683
+ `Token “${token}” (ID ${route.id}) follows these persisted two-channel, layer-specific multi-hash routes in the 200M checkpoint.`;
684
  };
685
 
686
  root.querySelectorAll(".tr-token-btn").forEach((button) => {
687
  button.addEventListener("click", () => updateMatrix(button.dataset.labToken));
688
  });
689
 
690
+ const CHAT_ENDPOINT = "https://pacific-i64-tr-hash-tiny.hf.space/v1/chat/completions";
691
  let activeController = null;
692
 
693
  const consumeSSE = async (response, onEvent) => {
 
741
  routedOutput.textContent = "";
742
  routedState.textContent = "connecting";
743
  runButton.textContent = "Stop generation";
744
+ status.textContent = "Connecting to the TR-HASH MoE 200M chat endpoint…";
745
  status.classList.add("is-live");
746
 
747
  try {
 
749
  method: "POST",
750
  headers: { "Content-Type": "application/json" },
751
  body: JSON.stringify({
752
+ model: "tr-hash-moe-200m",
753
  messages: [{ role: "user", content: prompt }],
754
+ max_tokens: 384,
755
+ temperature: 0.4,
756
+ top_k: 30,
757
+ top_p: 0.85,
758
  repetition_penalty: 1.1,
759
  stream: true
760
  }),