Spaces:
Running
Running
Fix explicit experiment entry paths for static hosting
#4
by alphabell-research - opened
- README.md +6 -6
- experiments/articles/01-one-word-routing.md +2 -2
- experiments/articles/02-blind-quantization.md +2 -2
- experiments/articles/03-activation-surgery.md +2 -2
- experiments/articles/04-correction-detective.md +2 -2
- experiments/lab.js +1 -1
- experiments/sound.html +1 -1
- index.html +1 -1
- tests/experiment-links.test.cjs +27 -0
- verify-experiments.py +1 -1
README.md
CHANGED
|
@@ -37,17 +37,17 @@ Explore two different architectures with real Q8_0 tensor captures: Flint's spar
|
|
| 37 |
|
| 38 |
## Five measured experiments
|
| 39 |
|
| 40 |
-
[**Open all five experiments**](https://alphabell-model-observatory.static.hf.space/experiments/)
|
| 41 |
|
| 42 |
-
1. [One word changed](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=reroute): twelve captures from three controlled prompt pairs on both models.
|
| 43 |
-
2. [Spot the 4-bit model](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=quant): twelve blinded Q4_1/Q8_0 answer pairs, with measured timing, process memory and exact checks.
|
| 44 |
-
3. [Activation surgery](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=surgery): scale one Flint feed-forward branch to one, half or zero and inspect the downstream effects.
|
| 45 |
-
4. [The correction detective](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=memory): predict answers to current-fact and original-fact questions, then reveal the actual runs.
|
| 46 |
5. [Model music](https://alphabell-model-observatory.static.hf.space/experiments/sound.html): hear deterministic sonification of real routing and recurrent-head values, with synchronized replay and WAV downloads.
|
| 47 |
|
| 48 |
The experiments contain 60 new model generations. Eleven of twelve quantization pairs returned identical text; the differing arithmetic pair was wrong at both precisions. The activation study retains all six cases and every measured frame. Both models passed all six short memory tasks. These are small, fixed demonstrations, with one greedy generation per condition.
|
| 49 |
|
| 50 |
-
[Results and provenance](experiments/data/results.json) · [Capture manifest](experiments/data/traces.json) · [Reproduction source](experiments/reproduce
|
| 51 |
|
| 52 |
## Try it
|
| 53 |
|
|
|
|
| 37 |
|
| 38 |
## Five measured experiments
|
| 39 |
|
| 40 |
+
[**Open all five experiments**](https://alphabell-model-observatory.static.hf.space/experiments/index.html)
|
| 41 |
|
| 42 |
+
1. [One word changed](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=reroute): twelve captures from three controlled prompt pairs on both models.
|
| 43 |
+
2. [Spot the 4-bit model](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=quant): twelve blinded Q4_1/Q8_0 answer pairs, with measured timing, process memory and exact checks.
|
| 44 |
+
3. [Activation surgery](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=surgery): scale one Flint feed-forward branch to one, half or zero and inspect the downstream effects.
|
| 45 |
+
4. [The correction detective](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=memory): predict answers to current-fact and original-fact questions, then reveal the actual runs.
|
| 46 |
5. [Model music](https://alphabell-model-observatory.static.hf.space/experiments/sound.html): hear deterministic sonification of real routing and recurrent-head values, with synchronized replay and WAV downloads.
|
| 47 |
|
| 48 |
The experiments contain 60 new model generations. Eleven of twelve quantization pairs returned identical text; the differing arithmetic pair was wrong at both precisions. The activation study retains all six cases and every measured frame. Both models passed all six short memory tasks. These are small, fixed demonstrations, with one greedy generation per condition.
|
| 49 |
|
| 50 |
+
[Results and provenance](experiments/data/results.json) · [Capture manifest](experiments/data/traces.json) · [Reproduction source](https://huggingface.co/spaces/alphabell/Model-Observatory/tree/main/experiments/reproduce) · [Technical articles](https://huggingface.co/spaces/alphabell/Model-Observatory/tree/main/experiments/articles)
|
| 51 |
|
| 52 |
## Try it
|
| 53 |
|
experiments/articles/01-one-word-routing.md
CHANGED
|
@@ -6,7 +6,7 @@ Changing `blue` to `red` changed Flint's answer. At the first captured generatio
|
|
| 6 |
|
| 7 |
That is a useful starting point for looking inside a mixture-of-experts model. A different answer does not require a completely different expert set at every block. The weights, ordering, other blocks and later generation steps can change too.
|
| 8 |
|
| 9 |
-
We built [One word changed](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=reroute), a small interactive experiment in alphaBell Model Observatory. Pick a prompt pair, step through the captured output and inspect the measurements next to the answers.
|
| 10 |
|
| 11 |
The three prompt edits are deliberately easy to understand:
|
| 12 |
|
|
@@ -26,7 +26,7 @@ Both checkpoints use Q8_0 here. The captures used a CPU runtime based on llama.c
|
|
| 26 |
|
| 27 |
There is no “red expert” claim hiding in the visualization. An expert ID is an index, not an interpretation of its role. An observed selection difference is not sufficient evidence that one expert caused an answer.
|
| 28 |
|
| 29 |
-
[Open the experiment](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=reroute), then [download the results and provenance](https://alphabell-model-observatory.static.hf.space/experiments/data/results.json). The experiment includes links to the measured traces and prompt downloads.
|
| 30 |
|
| 31 |
A useful next case would change one negation while keeping the requested output format fixed. Share the exact pair and the behavior you expect, so the result can be checked rather than explained after the fact.
|
| 32 |
|
|
|
|
| 6 |
|
| 7 |
That is a useful starting point for looking inside a mixture-of-experts model. A different answer does not require a completely different expert set at every block. The weights, ordering, other blocks and later generation steps can change too.
|
| 8 |
|
| 9 |
+
We built [One word changed](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=reroute), a small interactive experiment in alphaBell Model Observatory. Pick a prompt pair, step through the captured output and inspect the measurements next to the answers.
|
| 10 |
|
| 11 |
The three prompt edits are deliberately easy to understand:
|
| 12 |
|
|
|
|
| 26 |
|
| 27 |
There is no “red expert” claim hiding in the visualization. An expert ID is an index, not an interpretation of its role. An observed selection difference is not sufficient evidence that one expert caused an answer.
|
| 28 |
|
| 29 |
+
[Open the experiment](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=reroute), then [download the results and provenance](https://alphabell-model-observatory.static.hf.space/experiments/data/results.json). The experiment includes links to the measured traces and prompt downloads.
|
| 30 |
|
| 31 |
A useful next case would change one negation while keeping the requested output format fixed. Share the exact pair and the behavior you expect, so the result can be checked rather than explained after the fact.
|
| 32 |
|
experiments/articles/02-blind-quantization.md
CHANGED
|
@@ -6,7 +6,7 @@ We hid the precision labels and compared Q4_1 with Q8_0. In 11 of 12 prompt/mode
|
|
| 6 |
|
| 7 |
The one different pair did not produce a winner. Asked to calculate `(17 * 23) - 19`, Flint answered `374` at Q8_0 and `352` at Q4_1. The correct answer is `372`.
|
| 8 |
|
| 9 |
-
The blind test retains all twelve pairs, including identical answers and shared errors. [Spot the 4-bit model](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=quant) asks you to guess before revealing the precision, outputs, timings and checks. Answer order is deterministic for each case. Guesses stay in your browser, and the displayed tally is local rather than a community vote count.
|
| 10 |
|
| 11 |
We tested six prompts on each of two checkpoints: Flint and the alphaBell Qwen Open 27B derivative. The tasks cover arithmetic, exact JSON, a factual symbol, an in-context correction, a Python expression and a sentence with required words. Each prompt was run at Q8_0 and Q4_1.
|
| 12 |
|
|
@@ -20,7 +20,7 @@ Smaller also did not mean uniformly faster in this run. For the gold-symbol prom
|
|
| 20 |
|
| 21 |
The controls were eight CPU threads, context 2,048, temperature zero, seed 42, reasoning disabled and a 64-token output limit. Flash Attention was disabled. The attention KV cache used the runtime's default F16 representation. No quality conclusion about an entire precision format follows from these twelve short pairs.
|
| 22 |
|
| 23 |
-
[Try the blind comparison](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=quant), then [inspect every result and its provenance](https://alphabell-model-observatory.static.hf.space/experiments/data/results.json).
|
| 24 |
|
| 25 |
Suggest an exact, short prompt where you expect Q4_1 and Q8_0 to diverge. Include the scoring rule before seeing the answers. We can add submitted cases to the same reproducible comparison.
|
| 26 |
|
|
|
|
| 6 |
|
| 7 |
The one different pair did not produce a winner. Asked to calculate `(17 * 23) - 19`, Flint answered `374` at Q8_0 and `352` at Q4_1. The correct answer is `372`.
|
| 8 |
|
| 9 |
+
The blind test retains all twelve pairs, including identical answers and shared errors. [Spot the 4-bit model](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=quant) asks you to guess before revealing the precision, outputs, timings and checks. Answer order is deterministic for each case. Guesses stay in your browser, and the displayed tally is local rather than a community vote count.
|
| 10 |
|
| 11 |
We tested six prompts on each of two checkpoints: Flint and the alphaBell Qwen Open 27B derivative. The tasks cover arithmetic, exact JSON, a factual symbol, an in-context correction, a Python expression and a sentence with required words. Each prompt was run at Q8_0 and Q4_1.
|
| 12 |
|
|
|
|
| 20 |
|
| 21 |
The controls were eight CPU threads, context 2,048, temperature zero, seed 42, reasoning disabled and a 64-token output limit. Flash Attention was disabled. The attention KV cache used the runtime's default F16 representation. No quality conclusion about an entire precision format follows from these twelve short pairs.
|
| 22 |
|
| 23 |
+
[Try the blind comparison](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=quant), then [inspect every result and its provenance](https://alphabell-model-observatory.static.hf.space/experiments/data/results.json).
|
| 24 |
|
| 25 |
Suggest an exact, short prompt where you expect Q4_1 and Q8_0 to diverge. Include the scoring rule before seeing the answers. We can add submitted cases to the same reproducible comparison.
|
| 26 |
|
experiments/articles/03-activation-surgery.md
CHANGED
|
@@ -6,7 +6,7 @@ The answers changed. The tiny test score did not.
|
|
| 6 |
|
| 7 |
We scaled the computed feed-forward output of Flint decoder block 12 by 1, 0.5 and 0. Across six short checks, every condition passed four and failed two. That does not make the intervention harmless. It shows how much a single summary score can hide.
|
| 8 |
|
| 9 |
-
[What else broke?](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=surgery) puts the baseline, half-scale and zero-scale outputs side by side. It exposes the intervention and check rules instead of calling the result a new fine-tune.
|
| 10 |
|
| 11 |
The operation is precise: scale `ffn_out-12`, using zero-based decoder-block indexing, before residual addition. The intervention applies to all prompt and generated positions on each forward pass. Model weights are unchanged. There is no training stage, adapter, prompt-only simulation or released “surgery model” implied by this experiment.
|
| 12 |
|
|
@@ -22,7 +22,7 @@ The checkpoint was Flint Q8_0. The run used eight CPU threads, context 2,048, te
|
|
| 22 |
|
| 23 |
Six short prompts cannot establish whether this block is broadly dispensable, identify a capability localized to it, or predict the effect of editing other blocks. The useful result is narrower: this particular activation intervention changed some outputs without changing the aggregate pass count.
|
| 24 |
|
| 25 |
-
[Inspect the three conditions](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=surgery) and [download the results, checks and provenance](https://alphabell-model-observatory.static.hf.space/experiments/data/results.json).
|
| 26 |
|
| 27 |
A good follow-up contribution is a matched pair: one task that should change and one nearby task that should survive. State both expectations before running the intervention. That gives a behavior-edit claim a regression test.
|
| 28 |
|
|
|
|
| 6 |
|
| 7 |
We scaled the computed feed-forward output of Flint decoder block 12 by 1, 0.5 and 0. Across six short checks, every condition passed four and failed two. That does not make the intervention harmless. It shows how much a single summary score can hide.
|
| 8 |
|
| 9 |
+
[What else broke?](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=surgery) puts the baseline, half-scale and zero-scale outputs side by side. It exposes the intervention and check rules instead of calling the result a new fine-tune.
|
| 10 |
|
| 11 |
The operation is precise: scale `ffn_out-12`, using zero-based decoder-block indexing, before residual addition. The intervention applies to all prompt and generated positions on each forward pass. Model weights are unchanged. There is no training stage, adapter, prompt-only simulation or released “surgery model” implied by this experiment.
|
| 12 |
|
|
|
|
| 22 |
|
| 23 |
Six short prompts cannot establish whether this block is broadly dispensable, identify a capability localized to it, or predict the effect of editing other blocks. The useful result is narrower: this particular activation intervention changed some outputs without changing the aggregate pass count.
|
| 24 |
|
| 25 |
+
[Inspect the three conditions](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=surgery) and [download the results, checks and provenance](https://alphabell-model-observatory.static.hf.space/experiments/data/results.json).
|
| 26 |
|
| 27 |
A good follow-up contribution is a matched pair: one task that should change and one nearby task that should survive. State both expectations before running the intervention. That gives a behavior-edit claim a regression test.
|
| 28 |
|
experiments/articles/04-correction-detective.md
CHANGED
|
@@ -6,7 +6,7 @@ A museum access code starts at `4319`. It changes to `8624`. In another log, it
|
|
| 6 |
|
| 7 |
Ask for the current code and the last update should win. Ask for the original code and the first value should survive. Those are different requirements, and a model can satisfy one while failing the other.
|
| 8 |
|
| 9 |
-
We made [Remembered, but outdated](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=memory), a short prediction game built around that distinction. Read the fictional log, choose the answer the model should give, and reveal the captured answers afterward. Your prediction stays in your browser.
|
| 10 |
|
| 11 |
The initial batch contains six cases. There are current-value and original-value questions for a single correction, two corrections, and a correction with unrelated sentences in the log. Each case was run on Flint and the alphaBell Qwen Open 27B derivative, both at Q8_0.
|
| 12 |
|
|
@@ -22,7 +22,7 @@ The models received the relevant log in the current input. Updating a fact withi
|
|
| 22 |
|
| 23 |
The captures used a CPU runtime based on llama.cpp, context 2,048, temperature zero, seed 42, reasoning disabled and a 16-token generation limit. The expected answer is defined by the fictional log, so scoring does not depend on a changing real-world fact. Both the exact prompt and captured output are included with each condition.
|
| 24 |
|
| 25 |
-
[Play the correction detective](https://alphabell-model-observatory.static.hf.space/experiments/?experiment=memory), then [download all cases and provenance](https://alphabell-model-observatory.static.hf.space/experiments/data/results.json).
|
| 26 |
|
| 27 |
For the next batch, contribute a log with two entities, several dated updates and separate original/current questions. Keep a clear answer key. A harder case should preserve an unambiguous target rather than make the wording confusing and count confusion as a memory failure.
|
| 28 |
|
|
|
|
| 6 |
|
| 7 |
Ask for the current code and the last update should win. Ask for the original code and the first value should survive. Those are different requirements, and a model can satisfy one while failing the other.
|
| 8 |
|
| 9 |
+
We made [Remembered, but outdated](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=memory), a short prediction game built around that distinction. Read the fictional log, choose the answer the model should give, and reveal the captured answers afterward. Your prediction stays in your browser.
|
| 10 |
|
| 11 |
The initial batch contains six cases. There are current-value and original-value questions for a single correction, two corrections, and a correction with unrelated sentences in the log. Each case was run on Flint and the alphaBell Qwen Open 27B derivative, both at Q8_0.
|
| 12 |
|
|
|
|
| 22 |
|
| 23 |
The captures used a CPU runtime based on llama.cpp, context 2,048, temperature zero, seed 42, reasoning disabled and a 16-token generation limit. The expected answer is defined by the fictional log, so scoring does not depend on a changing real-world fact. Both the exact prompt and captured output are included with each condition.
|
| 24 |
|
| 25 |
+
[Play the correction detective](https://alphabell-model-observatory.static.hf.space/experiments/index.html?experiment=memory), then [download all cases and provenance](https://alphabell-model-observatory.static.hf.space/experiments/data/results.json).
|
| 26 |
|
| 27 |
For the next batch, contribute a log with two entities, several dated updates and separate original/current questions. Keep a clear answer key. A harder case should preserve an unambiguous target rather than make the wording confusing and count confusion as a memory failure.
|
| 28 |
|
experiments/lab.js
CHANGED
|
@@ -121,7 +121,7 @@
|
|
| 121 |
function setupNav() {
|
| 122 |
$('experimentNav').replaceChildren();
|
| 123 |
for (const [key, def] of Object.entries(DEFINITIONS)) {
|
| 124 |
-
const anchor = node('a', 'experiment-card'); anchor.href = key === 'sound' ? 'sound.html' : '?experiment=' + key;
|
| 125 |
anchor.dataset.experiment = key;
|
| 126 |
append(anchor, node('span', 'card-number', def.number), node('strong', '', def.title), node('small', '', def.short), node('span', 'card-arrow', '↗'));
|
| 127 |
if (key !== 'sound') anchor.addEventListener('click', event => { event.preventDefault(); selectExperiment(key, null, true); });
|
|
|
|
| 121 |
function setupNav() {
|
| 122 |
$('experimentNav').replaceChildren();
|
| 123 |
for (const [key, def] of Object.entries(DEFINITIONS)) {
|
| 124 |
+
const anchor = node('a', 'experiment-card'); anchor.href = key === 'sound' ? 'sound.html' : 'index.html?experiment=' + key;
|
| 125 |
anchor.dataset.experiment = key;
|
| 126 |
append(anchor, node('span', 'card-number', def.number), node('strong', '', def.title), node('small', '', def.short), node('span', 'card-arrow', '↗'));
|
| 127 |
if (key !== 'sound') anchor.addEventListener('click', event => { event.preventDefault(); selectExperiment(key, null, true); });
|
experiments/sound.html
CHANGED
|
@@ -13,7 +13,7 @@
|
|
| 13 |
<script src="sound.js" defer></script>
|
| 14 |
</head>
|
| 15 |
<body>
|
| 16 |
-
<header><a class="brand" href="../">α <span>alphaBell</span></a><a href=".
|
| 17 |
<main>
|
| 18 |
<div class="intro"><p class="eyebrow">MODEL OBSERVATORY / EXPERIMENT 05</p><h1>What does a<br>model sound like?</h1><p class="lede">Turn measured expert routing and recurrent head activity into a small, strange piece of music. Same capture. Same mapping. Same notes.</p><p class="honest">This is a musical mapping of real numbers, not a recording of a model's voice or thoughts.</p></div>
|
| 19 |
<section class="studio" aria-label="Capture sonification player">
|
|
|
|
| 13 |
<script src="sound.js" defer></script>
|
| 14 |
</head>
|
| 15 |
<body>
|
| 16 |
+
<header><a class="brand" href="../">α <span>alphaBell</span></a><a href="index.html">All experiments ↗</a></header>
|
| 17 |
<main>
|
| 18 |
<div class="intro"><p class="eyebrow">MODEL OBSERVATORY / EXPERIMENT 05</p><h1>What does a<br>model sound like?</h1><p class="lede">Turn measured expert routing and recurrent head activity into a small, strange piece of music. Same capture. Same mapping. Same notes.</p><p class="honest">This is a musical mapping of real numbers, not a recording of a model's voice or thoughts.</p></div>
|
| 19 |
<section class="studio" aria-label="Capture sonification player">
|
index.html
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Flint & Qwen Model Observatory | alphaBell</title><meta name="description" content="Explore Flint expert routing and Qwen recurrent memory with real Q8 tensor captures. Replay every token, inspect every block and import your own trace."><meta property="og:title" content="Model Observatory by alphaBell"><meta property="og:description" content="Two architectures. Real tensor captures. Every token."><meta property="og:image" content="https://huggingface.co/spaces/alphabell/Model-Observatory/resolve/main/cover.png"><meta name="theme-color" content="#176b59"><link rel="icon" href="favicon.svg"><link rel="stylesheet" href="style.css"></head>
|
| 4 |
<body>
|
| 5 |
<header class="models-header"><div class="header-start"><a class="brand" href="./"><span class="brand-icon">α</span><span>alphaBell<span class="brand-divider">/</span><b>observatory</b></span></a><label class="model-control"><span>MODEL</span><select id="modelSelect" aria-label="Model" disabled><option>Recursive Flint</option></select></label></div><div class="header-end"><span class="engine-status" id="engineStatus"><i></i>Loading capture</span><button class="icon-button" id="aboutButton" title="How to read the model" aria-label="How to read the model">?</button></div></header>
|
| 6 |
-
<section class="overview"><div><div class="eyebrow" id="modelEyebrow">MODEL OBSERVATORY</div><h1>Inside Flint & Qwen.</h1><a class="experiment-entry" href="experiments/">Try the five experiments ↗</a></div><div class="stats" id="modelStats"></div></section>
|
| 7 |
<main>
|
| 8 |
<aside class="input-panel">
|
| 9 |
<section class="prompt-section"><div class="section-heading"><h2>01 <span>Measured capture</span></h2><span class="small-tag" id="quantization">Q8_0</span></div><p id="traceOrigin" class="trace-origin">Opening example capture…</p><label class="sr-only" for="prompt" id="promptLabel">Captured prompt</label><textarea id="prompt" readonly spellcheck="false">Explain why the sky is blue in two sentences.</textarea><p class="capture-settings" id="captureSettings"></p><button id="runButton" class="primary" disabled>Loading capture…</button><p id="runNote" class="run-note" role="status">Structure is ready while the capture loads.</p><details class="capture-help"><summary>Use your own capture</summary><p>Import a compatible Flint or Qwen trace JSON. It stays in your browser. This public viewer replays measured captures; new prompts need a separate capture engine.</p><a href="https://huggingface.co/spaces/alphabell/Model-Observatory/blob/main/TRACE-FORMAT.md" target="_blank" rel="noreferrer">Trace format ↗</a></details></section>
|
|
|
|
| 3 |
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Flint & Qwen Model Observatory | alphaBell</title><meta name="description" content="Explore Flint expert routing and Qwen recurrent memory with real Q8 tensor captures. Replay every token, inspect every block and import your own trace."><meta property="og:title" content="Model Observatory by alphaBell"><meta property="og:description" content="Two architectures. Real tensor captures. Every token."><meta property="og:image" content="https://huggingface.co/spaces/alphabell/Model-Observatory/resolve/main/cover.png"><meta name="theme-color" content="#176b59"><link rel="icon" href="favicon.svg"><link rel="stylesheet" href="style.css"></head>
|
| 4 |
<body>
|
| 5 |
<header class="models-header"><div class="header-start"><a class="brand" href="./"><span class="brand-icon">α</span><span>alphaBell<span class="brand-divider">/</span><b>observatory</b></span></a><label class="model-control"><span>MODEL</span><select id="modelSelect" aria-label="Model" disabled><option>Recursive Flint</option></select></label></div><div class="header-end"><span class="engine-status" id="engineStatus"><i></i>Loading capture</span><button class="icon-button" id="aboutButton" title="How to read the model" aria-label="How to read the model">?</button></div></header>
|
| 6 |
+
<section class="overview"><div><div class="eyebrow" id="modelEyebrow">MODEL OBSERVATORY</div><h1>Inside Flint & Qwen.</h1><a class="experiment-entry" href="experiments/index.html">Try the five experiments ↗</a></div><div class="stats" id="modelStats"></div></section>
|
| 7 |
<main>
|
| 8 |
<aside class="input-panel">
|
| 9 |
<section class="prompt-section"><div class="section-heading"><h2>01 <span>Measured capture</span></h2><span class="small-tag" id="quantization">Q8_0</span></div><p id="traceOrigin" class="trace-origin">Opening example capture…</p><label class="sr-only" for="prompt" id="promptLabel">Captured prompt</label><textarea id="prompt" readonly spellcheck="false">Explain why the sky is blue in two sentences.</textarea><p class="capture-settings" id="captureSettings"></p><button id="runButton" class="primary" disabled>Loading capture…</button><p id="runNote" class="run-note" role="status">Structure is ready while the capture loads.</p><details class="capture-help"><summary>Use your own capture</summary><p>Import a compatible Flint or Qwen trace JSON. It stays in your browser. This public viewer replays measured captures; new prompts need a separate capture engine.</p><a href="https://huggingface.co/spaces/alphabell/Model-Observatory/blob/main/TRACE-FORMAT.md" target="_blank" rel="noreferrer">Trace format ↗</a></details></section>
|
tests/experiment-links.test.cjs
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
'use strict';
|
| 2 |
+
const test = require('node:test');
|
| 3 |
+
const assert = require('node:assert/strict');
|
| 4 |
+
const fs = require('node:fs');
|
| 5 |
+
const path = require('node:path');
|
| 6 |
+
const root = path.join(__dirname, '..');
|
| 7 |
+
function publicTextFiles(directory) {
|
| 8 |
+
return fs.readdirSync(directory, { withFileTypes: true }).flatMap(entry => {
|
| 9 |
+
if (entry.name.startsWith('.')) return [];
|
| 10 |
+
const file = path.join(directory, entry.name);
|
| 11 |
+
return entry.isDirectory() ? publicTextFiles(file) : /\.(?:html|md|js)$/.test(entry.name) ? [file] : [];
|
| 12 |
+
});
|
| 13 |
+
}
|
| 14 |
+
test('published experiment links use an explicit HTML entry on Hugging Face static hosting', () => {
|
| 15 |
+
const files = [path.join(root, 'index.html'), path.join(root, 'README.md'), ...publicTextFiles(path.join(root, 'experiments'))];
|
| 16 |
+
for (const file of files) {
|
| 17 |
+
const text = fs.readFileSync(file, 'utf8');
|
| 18 |
+
assert.doesNotMatch(text, /https:\/\/alphabell-model-observatory\.static\.hf\.space\/experiments\/(?=[?#)\s"'<>]|$)/, path.relative(root, file));
|
| 19 |
+
assert.doesNotMatch(text, /href=["'](?:\.\/)?experiments\/(?:[?#][^"']*)?["']/, path.relative(root, file));
|
| 20 |
+
}
|
| 21 |
+
assert.match(fs.readFileSync(path.join(root, 'index.html'), 'utf8'), /href="experiments\/index\.html"/);
|
| 22 |
+
assert.match(fs.readFileSync(path.join(root, 'experiments/sound.html'), 'utf8'), /href="index\.html">All experiments/);
|
| 23 |
+
assert.match(fs.readFileSync(path.join(root, 'experiments/lab.js'), 'utf8'), /'index\.html\?experiment='/);
|
| 24 |
+
});
|
| 25 |
+
test('hosted browser checks open the same explicit experiment entry', () => {
|
| 26 |
+
assert.match(fs.readFileSync(path.join(root, 'verify-experiments.py'), 'utf8'), /lab_url = urljoin\(base, 'experiments\/index\.html'\)/);
|
| 27 |
+
});
|
verify-experiments.py
CHANGED
|
@@ -22,7 +22,7 @@ def main():
|
|
| 22 |
parser.add_argument('--out', default='reports-experiments')
|
| 23 |
args = parser.parse_args()
|
| 24 |
base = args.base.rstrip('/') + '/'
|
| 25 |
-
lab_url = urljoin(base, 'experiments/')
|
| 26 |
out = pathlib.Path(args.out)
|
| 27 |
out.mkdir(parents=True, exist_ok=True)
|
| 28 |
checks, errors, failed_requests = [], [], []
|
|
|
|
| 22 |
parser.add_argument('--out', default='reports-experiments')
|
| 23 |
args = parser.parse_args()
|
| 24 |
base = args.base.rstrip('/') + '/'
|
| 25 |
+
lab_url = urljoin(base, 'experiments/index.html')
|
| 26 |
out = pathlib.Path(args.out)
|
| 27 |
out.mkdir(parents=True, exist_ok=True)
|
| 28 |
checks, errors, failed_requests = [], [], []
|