tfrere HF Staff Cursor commited on
Commit
812b476
·
1 Parent(s): 39a61da

Apply section--two-col to all Demo-tab sections (§1-§7)

Browse files

§5 Folding has been running on section--two-col since the rebuild and
the layout works: narrative + takeaway live in a sticky 248px rail on
the left, demo claims the rest. With every demo card surrounded by a
much-smaller block of words, the visitor was constantly scrolling
between "what is this" copy and "what to interact with" demo content.
Folding it back into a single grid keeps both visible at once and
turns the takeaway into a live margin note instead of a postscript.

Sections converted:
§1 Autocomplete (id=completion)
§2 Variant effect (id=vep)
§3 Structure (id=track)
§4 Species (id=species)
§5 Folding (id=folding) — already done
§6 Embedding space (id=umap)
§7 Species tree (id=speciesTree)

For each: added section--two-col on <section>, wrapped section-num +
section-title + lede + takeaway in a new <div class="section-narrative">,
and removed the takeaway from its old position after the demo card.

Recipe-tab sections (§7-§10 tokenizer/loss/data/architecture) stay
single-column on purpose: their narratives are short, demos are
compact, the case for sticky narration is weak, and the page rhythm
already works.

The §5-specific comment about "2-column prototype" inside <section
id="folding"> is removed now that the pattern is the default.

Co-authored-by: Cursor <cursoragent@cursor.com>

Files changed (1) hide show
  1. demo.html +128 -120
demo.html CHANGED
@@ -121,15 +121,27 @@
121
  <!-- ============================================================ -->
122
  <!-- §1 — GENE COMPLETION + ANNOTATION OVERLAY -->
123
  <!-- ============================================================ -->
124
- <section id="completion">
125
- <div class="section-num">§1 · Autocomplete</div>
126
- <div class="section-title">Autocomplete for the genome</div>
127
- <p class="lede">
128
- Like GPT can complete the start of a sentence, Carbon completes the start of a gene.
129
- Pick a famous one we feed the first <code>200 bp</code>, the model streams a continuation,
130
- and we overlay the <em>real</em> exon/intron annotations on top so you can see where the model
131
- decided structure should change.
132
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
133
 
134
  <div class="demo" id="demo1">
135
  <div class="demo-toolbar">
@@ -198,30 +210,35 @@
198
  <div class="stat-pair"><span class="stat-pair-label">perplexity</span><span class="stat-pair-val muted" id="d1-ppl">—</span></div>
199
  </div>
200
  </div>
201
-
202
- <div class="takeaway">
203
- <strong>What to look for</strong>
204
- Try dragging the prompt window so the green generated region lands on an exon (the dark
205
- green blocks) and see how many green underlines you get — exons are under selection
206
- pressure, so getting them right takes real biological understanding, not just DNA
207
- statistics. Then try the same length over an intron and compare. Boundaries between
208
- high- and low-confidence stretches in Carbon's output also tend to fall near real
209
- exon/intron edges, even though the model has never seen a single annotation.
210
- </div>
211
  </section>
212
 
213
  <!-- ============================================================ -->
214
  <!-- §2 — VEP: ref vs alt likelihood -->
215
  <!-- ============================================================ -->
216
- <section id="vep">
217
- <div class="section-num">§2 · Variant effect</div>
218
- <div class="section-title">It knows what's broken</div>
219
- <p class="lede">
220
- For a real ClinVar variant, the alternate allele lives at one specific base in the genome.
221
- We score the exact same 60-bp window two ways once with the reference base, once with the alt —
222
- and compare the model's likelihood. The strongest loss-of-function variants stand out clearly;
223
- others show smaller signals. Raw likelihood is a partial proxy for pathogenicity, not a perfect one.
224
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
 
226
  <div class="demo" id="demo2">
227
  <div class="demo-toolbar">
@@ -248,33 +265,29 @@
248
  <span style="color:#888">dot = ClinVar label · bar = model signal</span>
249
  </div>
250
  </div>
251
-
252
- <div class="takeaway">
253
- <strong>What to look for</strong>
254
- Read each row two ways: the <em>dot color</em> is what ClinVar says
255
- (red = pathogenic, orange = risk, green = benign); the <em>bar color and direction</em> is
256
- what Carbon says (red bar pointing left = surprised by the alt; charcoal bar pointing right
257
- = alt looks fine). When the dot and bar agree on "left of zero" — like HBB c.20A>T sickle
258
- cell — Carbon has independently picked up the pathogenicity signal. When they disagree, the
259
- likely culprit is allele frequency: alt alleles common enough in human populations look
260
- perfectly normal to a model trained on natural sequence. For sharper variant effect
261
- prediction, Carbon can be fine-tuned (see the
262
- <a href="https://huggingface.co/spaces/hf-carbon/dna-vep-explainer" style="color:#317f3f">dna-vep-explainer</a>).
263
- </div>
264
  </section>
265
 
266
  <!-- ============================================================ -->
267
  <!-- §3 — LIKELIHOOD TRACK ACROSS A REAL GENE -->
268
  <!-- ============================================================ -->
269
- <section id="track">
270
- <div class="section-num">§3 · Structure</div>
271
- <div class="section-title">It sees structure without being told</div>
272
- <p class="lede">
273
- For each token (a 6-base chunk), Carbon emits a log-probability under the surrounding context.
274
- Plot that along a real gene and the curve dips and rises. We overlay the exon/intron map on top —
275
- confidence rises in coding regions and falls in repetitive or unconstrained stretches, even
276
- though the model never saw a single exon label.
277
- </p>
 
 
 
 
 
 
 
 
 
278
 
279
  <div class="demo" id="demo3">
280
  <div class="demo-toolbar">
@@ -302,26 +315,28 @@
302
  <div class="stat-pair"><span class="stat-pair-label">mean (overall)</span><span class="stat-pair-val muted" id="d3-mean">—</span></div>
303
  </div>
304
  </div>
305
-
306
- <div class="takeaway">
307
- <strong>What to look for</strong>
308
- Exons, especially the protein-coding portions, tend to score noticeably higher than introns —
309
- because exons are evolutionarily conserved and full of constrained patterns the model has learned
310
- to predict. The Δ tells you how strongly Carbon "noticed" the difference for this gene.
311
- </div>
312
  </section>
313
 
314
  <!-- ============================================================ -->
315
  <!-- §4 — SAME GENE, DIFFERENT SPECIES -->
316
  <!-- ============================================================ -->
317
- <section id="species">
318
- <div class="section-num">§4 · Species</div>
319
- <div class="section-title">It knows who's who</div>
320
- <p class="lede">
321
- Feed the first few bases of a homologous gene from human, mouse, and zebrafish.
322
- Each continuation diverges along its species' lineage and matches that species' real
323
- reference sequence more closely than the others'.
324
- </p>
 
 
 
 
 
 
 
 
 
325
 
326
  <div class="demo" id="demo4">
327
  <div class="demo-toolbar">
@@ -353,23 +368,12 @@
353
  <span style="color:#b00020">mismatches in reference highlighted</span>
354
  </div>
355
  </div>
356
-
357
- <div class="takeaway">
358
- <strong>What to look for</strong>
359
- Each species' generation should match its own reference better than another species' would.
360
- Identity drops dramatically on mouse/zebrafish/chicken when the prompt is from a different
361
- lineage — the model conditions on species context from just a few bases.
362
- </div>
363
  </section>
364
 
365
  <!-- ============================================================ -->
366
  <!-- §5 — FOLDING (DNA → protein → 3D structure via ESMFold) -->
367
  <!-- ============================================================ -->
368
  <section id="folding" class="section--two-col">
369
- <!-- 2-column prototype: narrative (eyebrow + title + lede + takeaway)
370
- sits in a sticky rail on the left, demo claims the full main
371
- column on the right. Below 900px the rail unsticks and stacks
372
- above the demo (see .section--two-col rules in the head). -->
373
  <div class="section-narrative">
374
  <div class="section-num">§5 · Folding</div>
375
  <div class="section-title">From sequence to structure</div>
@@ -462,16 +466,29 @@
462
  <!-- ============================================================ -->
463
  <!-- §6 — UMAP (interactive scatter) -->
464
  <!-- ============================================================ -->
465
- <section id="umap">
466
- <div class="section-num">§6 · Embedding space</div>
467
- <div class="section-title">The genome, organized</div>
468
- <p class="lede">
469
- Embed 571,810 sequences from 27 species across six kingdoms — vertebrates,
470
- invertebrates, plants, fungi, bacteria, viruses with Carbon, project to 2D
471
- with UMAP, color by anything. Switch the coloring and a completely different
472
- organization emerges from the same points the model's embedding space
473
- carries multiple axes of biology at once, none of which were ever labeled.
474
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
475
 
476
  <div class="demo" id="demoUmap">
477
  <div class="demo-toolbar">
@@ -505,33 +522,36 @@
505
  <div class="stat-pair"><span class="stat-pair-label">render</span><span class="stat-pair-val muted" id="dumap-fps">—</span></div>
506
  </div>
507
  </div>
508
-
509
- <div class="takeaway">
510
- <strong>What to look for</strong>
511
- Switch coloring from <em>species</em> to <em>biotype</em>: same points, completely
512
- different organization emerges. The macro-clusters trace six kingdoms — vertebrates,
513
- invertebrates, plants, fungi, bacteria, viruses — discovered from raw sequence alone.
514
- Switch again to <em>gc content</em> and a perpendicular axis appears: AT-rich (cool
515
- blue) vs GC-rich (warm amber) regions cut across the species clusters, revealing the
516
- composition gradient the model has internalised. <em>Points: 571,810 real Carbon 3B
517
- embeddings, projected to 2D via UMAP.</em>
518
- </div>
519
  </section>
520
 
521
  <!-- ============================================================ -->
522
  <!-- §7 — SPECIES TREE (Carbon-derived phylogeny) -->
523
  <!-- ============================================================ -->
524
- <section id="speciesTree">
525
- <div class="section-num">§7 · Species tree</div>
526
- <div class="section-title">Did Carbon learn the tree of life on its own?</div>
527
- <p class="lede">
528
- Take the same 571,810 sequences from §6, average each species' embeddings into a
529
- single 3072-dim vector, then cluster those 27 centroids with hierarchical clustering.
530
- Carbon was never told what an "organism" is. Yet the resulting tree groups vertebrates
531
- together, separates bacteria from fungi, and pairs sister clades primates with
532
- primates, rodents with rodents, monocots with monocotswithout ever being shown a
533
- single taxonomic label.
534
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
 
536
  <div class="demo" id="demoSpeciesTree">
537
  <div class="tree-toolbar">
@@ -585,18 +605,6 @@
585
  <div class="stat-pair"><span class="stat-pair-label">distance</span><span class="stat-pair-val">cosine</span></div>
586
  </div>
587
  </div>
588
-
589
- <div class="takeaway">
590
- <strong>What to look for</strong>
591
- Toggle <em>kingdom-level</em> vs <em>sister-level</em>: at the kingdom scale the
592
- embedding is nearly perfect — vertebrates cluster with vertebrates, bacteria with
593
- bacteria. At the sister scale (primate-with-primate, etc.) it's lower because
594
- distances inside a kingdom are extremely tight (~0.0001) and the strict nearest
595
- neighbour bounces around — the model nails the broad strokes but blurs the fine
596
- branches at this resolution. Switch <em>linkage</em> from Ward to UPGMA to see how
597
- much of the structure is method-independent. <em>Tree built from species centroids
598
- of mean-pooled Carbon-3B embeddings.</em>
599
- </div>
600
  </section>
601
 
602
  </div>
 
121
  <!-- ============================================================ -->
122
  <!-- §1 — GENE COMPLETION + ANNOTATION OVERLAY -->
123
  <!-- ============================================================ -->
124
+ <section id="completion" class="section--two-col">
125
+ <div class="section-narrative">
126
+ <div class="section-num">§1 · Autocomplete</div>
127
+ <div class="section-title">Autocomplete for the genome</div>
128
+ <p class="lede">
129
+ Like GPT can complete the start of a sentence, Carbon completes the start of a gene.
130
+ Pick a famous one — we feed the first <code>200 bp</code>, the model streams a continuation,
131
+ and we overlay the <em>real</em> exon/intron annotations on top so you can see where the model
132
+ decided structure should change.
133
+ </p>
134
+
135
+ <div class="takeaway">
136
+ <strong>What to look for</strong>
137
+ Try dragging the prompt window so the green generated region lands on an exon (the dark
138
+ green blocks) and see how many green underlines you get — exons are under selection
139
+ pressure, so getting them right takes real biological understanding, not just DNA
140
+ statistics. Then try the same length over an intron and compare. Boundaries between
141
+ high- and low-confidence stretches in Carbon's output also tend to fall near real
142
+ exon/intron edges, even though the model has never seen a single annotation.
143
+ </div>
144
+ </div>
145
 
146
  <div class="demo" id="demo1">
147
  <div class="demo-toolbar">
 
210
  <div class="stat-pair"><span class="stat-pair-label">perplexity</span><span class="stat-pair-val muted" id="d1-ppl">—</span></div>
211
  </div>
212
  </div>
 
 
 
 
 
 
 
 
 
 
213
  </section>
214
 
215
  <!-- ============================================================ -->
216
  <!-- §2 — VEP: ref vs alt likelihood -->
217
  <!-- ============================================================ -->
218
+ <section id="vep" class="section--two-col">
219
+ <div class="section-narrative">
220
+ <div class="section-num">§2 · Variant effect</div>
221
+ <div class="section-title">It knows what's broken</div>
222
+ <p class="lede">
223
+ For a real ClinVar variant, the alternate allele lives at one specific base in the genome.
224
+ We score the exact same 60-bp window two ways once with the reference base, once with the alt —
225
+ and compare the model's likelihood. The strongest loss-of-function variants stand out clearly;
226
+ others show smaller signals. Raw likelihood is a partial proxy for pathogenicity, not a perfect one.
227
+ </p>
228
+
229
+ <div class="takeaway">
230
+ <strong>What to look for</strong>
231
+ Read each row two ways: the <em>dot color</em> is what ClinVar says
232
+ (red = pathogenic, orange = risk, green = benign); the <em>bar color and direction</em> is
233
+ what Carbon says (red bar pointing left = surprised by the alt; charcoal bar pointing right
234
+ = alt looks fine). When the dot and bar agree on "left of zero" — like HBB c.20A>T sickle
235
+ cell — Carbon has independently picked up the pathogenicity signal. When they disagree, the
236
+ likely culprit is allele frequency: alt alleles common enough in human populations look
237
+ perfectly normal to a model trained on natural sequence. For sharper variant effect
238
+ prediction, Carbon can be fine-tuned (see the
239
+ <a href="https://huggingface.co/spaces/hf-carbon/dna-vep-explainer" style="color:#317f3f">dna-vep-explainer</a>).
240
+ </div>
241
+ </div>
242
 
243
  <div class="demo" id="demo2">
244
  <div class="demo-toolbar">
 
265
  <span style="color:#888">dot = ClinVar label · bar = model signal</span>
266
  </div>
267
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
268
  </section>
269
 
270
  <!-- ============================================================ -->
271
  <!-- §3 — LIKELIHOOD TRACK ACROSS A REAL GENE -->
272
  <!-- ============================================================ -->
273
+ <section id="track" class="section--two-col">
274
+ <div class="section-narrative">
275
+ <div class="section-num">§3 · Structure</div>
276
+ <div class="section-title">It sees structure without being told</div>
277
+ <p class="lede">
278
+ For each token (a 6-base chunk), Carbon emits a log-probability under the surrounding context.
279
+ Plot that along a real gene and the curve dips and rises. We overlay the exon/intron map on top —
280
+ confidence rises in coding regions and falls in repetitive or unconstrained stretches, even
281
+ though the model never saw a single exon label.
282
+ </p>
283
+
284
+ <div class="takeaway">
285
+ <strong>What to look for</strong>
286
+ Exons, especially the protein-coding portions, tend to score noticeably higher than introns —
287
+ because exons are evolutionarily conserved and full of constrained patterns the model has learned
288
+ to predict. The Δ tells you how strongly Carbon "noticed" the difference for this gene.
289
+ </div>
290
+ </div>
291
 
292
  <div class="demo" id="demo3">
293
  <div class="demo-toolbar">
 
315
  <div class="stat-pair"><span class="stat-pair-label">mean (overall)</span><span class="stat-pair-val muted" id="d3-mean">—</span></div>
316
  </div>
317
  </div>
 
 
 
 
 
 
 
318
  </section>
319
 
320
  <!-- ============================================================ -->
321
  <!-- §4 — SAME GENE, DIFFERENT SPECIES -->
322
  <!-- ============================================================ -->
323
+ <section id="species" class="section--two-col">
324
+ <div class="section-narrative">
325
+ <div class="section-num">§4 · Species</div>
326
+ <div class="section-title">It knows who's who</div>
327
+ <p class="lede">
328
+ Feed the first few bases of a homologous gene from human, mouse, and zebrafish.
329
+ Each continuation diverges along its species' lineage — and matches that species' real
330
+ reference sequence more closely than the others'.
331
+ </p>
332
+
333
+ <div class="takeaway">
334
+ <strong>What to look for</strong>
335
+ Each species' generation should match its own reference better than another species' would.
336
+ Identity drops dramatically on mouse/zebrafish/chicken when the prompt is from a different
337
+ lineage — the model conditions on species context from just a few bases.
338
+ </div>
339
+ </div>
340
 
341
  <div class="demo" id="demo4">
342
  <div class="demo-toolbar">
 
368
  <span style="color:#b00020">mismatches in reference highlighted</span>
369
  </div>
370
  </div>
 
 
 
 
 
 
 
371
  </section>
372
 
373
  <!-- ============================================================ -->
374
  <!-- §5 — FOLDING (DNA → protein → 3D structure via ESMFold) -->
375
  <!-- ============================================================ -->
376
  <section id="folding" class="section--two-col">
 
 
 
 
377
  <div class="section-narrative">
378
  <div class="section-num">§5 · Folding</div>
379
  <div class="section-title">From sequence to structure</div>
 
466
  <!-- ============================================================ -->
467
  <!-- §6 — UMAP (interactive scatter) -->
468
  <!-- ============================================================ -->
469
+ <section id="umap" class="section--two-col">
470
+ <div class="section-narrative">
471
+ <div class="section-num">§6 · Embedding space</div>
472
+ <div class="section-title">The genome, organized</div>
473
+ <p class="lede">
474
+ Embed 571,810 sequences from 27 species across six kingdoms vertebrates,
475
+ invertebrates, plants, fungi, bacteria, viruses with Carbon, project to 2D
476
+ with UMAP, color by anything. Switch the coloring and a completely different
477
+ organization emerges from the same points the model's embedding space
478
+ carries multiple axes of biology at once, none of which were ever labeled.
479
+ </p>
480
+
481
+ <div class="takeaway">
482
+ <strong>What to look for</strong>
483
+ Switch coloring from <em>species</em> to <em>biotype</em>: same points, completely
484
+ different organization emerges. The macro-clusters trace six kingdoms — vertebrates,
485
+ invertebrates, plants, fungi, bacteria, viruses — discovered from raw sequence alone.
486
+ Switch again to <em>gc content</em> and a perpendicular axis appears: AT-rich (cool
487
+ blue) vs GC-rich (warm amber) regions cut across the species clusters, revealing the
488
+ composition gradient the model has internalised. <em>Points: 571,810 real Carbon 3B
489
+ embeddings, projected to 2D via UMAP.</em>
490
+ </div>
491
+ </div>
492
 
493
  <div class="demo" id="demoUmap">
494
  <div class="demo-toolbar">
 
522
  <div class="stat-pair"><span class="stat-pair-label">render</span><span class="stat-pair-val muted" id="dumap-fps">—</span></div>
523
  </div>
524
  </div>
 
 
 
 
 
 
 
 
 
 
 
525
  </section>
526
 
527
  <!-- ============================================================ -->
528
  <!-- §7 — SPECIES TREE (Carbon-derived phylogeny) -->
529
  <!-- ============================================================ -->
530
+ <section id="speciesTree" class="section--two-col">
531
+ <div class="section-narrative">
532
+ <div class="section-num">§7 · Species tree</div>
533
+ <div class="section-title">Did Carbon learn the tree of life on its own?</div>
534
+ <p class="lede">
535
+ Take the same 571,810 sequences from §6, average each species' embeddings into a
536
+ single 3072-dim vector, then cluster those 27 centroids with hierarchical clustering.
537
+ Carbon was never told what an "organism" is. Yet the resulting tree groups vertebrates
538
+ together, separates bacteria from fungi, and pairs sister clades primates with
539
+ primates, rodents with rodents, monocots with monocots — without ever being shown a
540
+ single taxonomic label.
541
+ </p>
542
+
543
+ <div class="takeaway">
544
+ <strong>What to look for</strong>
545
+ Toggle <em>kingdom-level</em> vs <em>sister-level</em>: at the kingdom scale the
546
+ embedding is nearly perfect — vertebrates cluster with vertebrates, bacteria with
547
+ bacteria. At the sister scale (primate-with-primate, etc.) it's lower because
548
+ distances inside a kingdom are extremely tight (~0.0001) and the strict nearest
549
+ neighbour bounces around — the model nails the broad strokes but blurs the fine
550
+ branches at this resolution. Switch <em>linkage</em> from Ward to UPGMA to see how
551
+ much of the structure is method-independent. <em>Tree built from species centroids
552
+ of mean-pooled Carbon-3B embeddings.</em>
553
+ </div>
554
+ </div>
555
 
556
  <div class="demo" id="demoSpeciesTree">
557
  <div class="tree-toolbar">
 
605
  <div class="stat-pair"><span class="stat-pair-label">distance</span><span class="stat-pair-val">cosine</span></div>
606
  </div>
607
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
608
  </section>
609
 
610
  </div>