Quazim0t0 commited on
Commit
e6a09ae
Β·
verified Β·
1 Parent(s): ba8ee3a

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. .gitignore +2 -0
  2. README.md +1 -0
  3. app.py +31 -0
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ __pycache__/
2
+ *.pyc
README.md CHANGED
@@ -5,6 +5,7 @@ colorFrom: purple
5
  colorTo: green
6
  sdk: gradio
7
  sdk_version: 4.44.0
 
8
  app_file: app.py
9
  pinned: true
10
  license: apache-2.0
 
5
  colorTo: green
6
  sdk: gradio
7
  sdk_version: 4.44.0
8
+ python_version: "3.12"
9
  app_file: app.py
10
  pinned: true
11
  license: apache-2.0
app.py CHANGED
@@ -74,6 +74,14 @@ _CSS = """<style>
74
  .dcx .caret{display:inline-block;width:9px;height:17px;border-radius:2px;background:#7ad1ff;margin-left:2px;vertical-align:text-bottom;animation:dcxb .8s steps(1) infinite}
75
  @keyframes dcxb{50%{opacity:0}}
76
  .dcx .sub{color:#889;font-size:12px;line-height:1.5;margin-top:8px}
 
 
 
 
 
 
 
 
77
  </style>"""
78
 
79
 
@@ -168,6 +176,28 @@ def route_run(seq, n_bases, do_gen):
168
  yield _wrap(head + f"<div class='sub'>{FOOTER}</div>")
169
 
170
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  HERO = """# 🌼 DaisyChain β€” a modular genomic mind
172
  **Four ~74M DNA/RNA specialists (β‰ˆ295M total, under Carbon-500M)** β€” 🧬 Eukaryote, 🦠 Prokaryote,
173
  πŸ“œ mRNA, βœ‚οΈ mRNA-splice β€” each **distilled per-domain from Carbon-500M**. A learned router reads how
@@ -198,6 +228,7 @@ def build():
198
  label="Example sequences (one per domain)")
199
  except Exception:
200
  pass
 
201
  return demo
202
 
203
 
 
74
  .dcx .caret{display:inline-block;width:9px;height:17px;border-radius:2px;background:#7ad1ff;margin-left:2px;vertical-align:text-bottom;animation:dcxb .8s steps(1) infinite}
75
  @keyframes dcxb{50%{opacity:0}}
76
  .dcx .sub{color:#889;font-size:12px;line-height:1.5;margin-top:8px}
77
+ .dcx .stats{display:flex;gap:10px;flex-wrap:wrap;margin:10px 0}
78
+ .dcx .stat{flex:1;min-width:130px;text-align:center;background:#14141c;border:1px solid #2a2a35;border-radius:12px;padding:13px 8px}
79
+ .dcx .stat .v{font-size:28px;font-weight:800;line-height:1}
80
+ .dcx .stat .l{font-size:11px;color:#99a;margin-top:6px}
81
+ .dcx table{border-collapse:collapse;width:100%;margin:8px 0;font-size:13.5px}
82
+ .dcx th,.dcx td{border:1px solid #2a2a35;padding:7px 10px;text-align:left}
83
+ .dcx th{background:#14141c;color:#bcd}
84
+ .dcx td.n{text-align:right;font-variant-numeric:tabular-nums}
85
  </style>"""
86
 
87
 
 
176
  yield _wrap(head + f"<div class='sub'>{FOOTER}</div>")
177
 
178
 
179
+ STATS_HTML = _wrap(
180
+ "<div class='h'>πŸ“Š DaisyChain vs Carbon-500M β€” the fair baseline</div>"
181
+ "<div class='stats'>"
182
+ "<div class='stat'><div class='v' style='color:#37b24d'>94.8%</div>"
183
+ "<div class='l'>routing accuracy<br>(held-out)</div></div>"
184
+ "<div class='stat'><div class='v' style='color:#7c5cff'>β‰ˆ295M</div>"
185
+ "<div class='l'>total params<br>(4 Γ— ~74M) &lt; Carbon-500M</div></div>"
186
+ "<div class='stat'><div class='v' style='color:#22b8cf'>~7Γ—</div>"
187
+ "<div class='l'>cheaper per query<br>(one 74M specialist active)</div></div>"
188
+ "</div>"
189
+ "<table><tr><th>metric</th><th>DaisyChain</th><th>Carbon-500M</th></tr>"
190
+ "<tr><td>Likelihood β€” bits/base (↓ better)</td><td class='n'>1.86</td><td class='n'>1.75</td></tr>"
191
+ "<tr><td>Seq-recovery, eukaryote (↑ better)</td><td class='n'>31.8%</td><td class='n'>42.2%</td></tr>"
192
+ "<tr><td>Seq-recovery, bacteria (↑ better)</td><td class='n'>34.0%</td><td class='n'>49.5%</td></tr>"
193
+ "</table>"
194
+ "<div class='sub'>Four ~74M specialists (β‰ˆ295M total, <b>under Carbon-500M</b>); only one runs per "
195
+ "query, so it's ~7Γ— cheaper per token. Behind the 500M / 1T-token monolith but within striking "
196
+ "distance β€” the gap is concentrated in the structured domains (mRNA, bacteria) and keeps closing "
197
+ "with more per-domain training. Same protocols as Carbon's eval suite (sequence recovery; per-base "
198
+ "likelihood). Carbon-500M is the right yardstick for a sub-500M modular set, not the 3B flagship.</div>")
199
+
200
+
201
  HERO = """# 🌼 DaisyChain β€” a modular genomic mind
202
  **Four ~74M DNA/RNA specialists (β‰ˆ295M total, under Carbon-500M)** β€” 🧬 Eukaryote, 🦠 Prokaryote,
203
  πŸ“œ mRNA, βœ‚οΈ mRNA-splice β€” each **distilled per-domain from Carbon-500M**. A learned router reads how
 
228
  label="Example sequences (one per domain)")
229
  except Exception:
230
  pass
231
+ gr.HTML(STATS_HTML)
232
  return demo
233
 
234