lewtun HF staff commited on
Commit
d3a775f
1 Parent(s): 4ed7662

Format markdown

Browse files
Files changed (2) hide show
  1. app.ipynb +208 -20
  2. app.py +16 -6
app.ipynb CHANGED
@@ -13,7 +13,7 @@
13
  },
14
  {
15
  "cell_type": "code",
16
- "execution_count": 2,
17
  "metadata": {},
18
  "outputs": [],
19
  "source": [
@@ -26,7 +26,7 @@
26
  },
27
  {
28
  "cell_type": "code",
29
- "execution_count": 3,
30
  "metadata": {},
31
  "outputs": [],
32
  "source": [
@@ -37,7 +37,7 @@
37
  },
38
  {
39
  "cell_type": "code",
40
- "execution_count": 4,
41
  "metadata": {},
42
  "outputs": [],
43
  "source": [
@@ -48,7 +48,7 @@
48
  },
49
  {
50
  "cell_type": "code",
51
- "execution_count": 5,
52
  "metadata": {},
53
  "outputs": [
54
  {
@@ -210,7 +210,7 @@
210
  "7 ‘Control’ means instruction tuned "
211
  ]
212
  },
213
- "execution_count": 5,
214
  "metadata": {},
215
  "output_type": "execute_result"
216
  }
@@ -221,7 +221,7 @@
221
  },
222
  {
223
  "cell_type": "code",
224
- "execution_count": 6,
225
  "metadata": {},
226
  "outputs": [
227
  {
@@ -376,7 +376,7 @@
376
  "96 NaN "
377
  ]
378
  },
379
- "execution_count": 6,
380
  "metadata": {},
381
  "output_type": "execute_result"
382
  }
@@ -387,28 +387,206 @@
387
  },
388
  {
389
  "cell_type": "code",
390
- "execution_count": 9,
391
  "metadata": {},
392
  "outputs": [],
393
  "source": [
394
  "# |export\n",
395
  "def make_clickable_cell(cell):\n",
396
- " return f'<a target=\"_blank\" href=\"{cell}\">{cell}</a>'\n"
 
 
 
397
  ]
398
  },
399
  {
400
  "cell_type": "code",
401
- "execution_count": 11,
402
  "metadata": {},
403
  "outputs": [],
404
  "source": [
405
  "# |export\n",
406
- "df[\"Paper / Repo\"] = df[\"Paper / Repo\"].apply(make_clickable_cell)"
 
 
407
  ]
408
  },
409
  {
410
  "cell_type": "code",
411
- "execution_count": 12,
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
412
  "metadata": {},
413
  "outputs": [],
414
  "source": [
@@ -420,14 +598,24 @@
420
  },
421
  {
422
  "cell_type": "code",
423
- "execution_count": 16,
 
 
 
 
 
 
 
 
 
 
424
  "metadata": {},
425
  "outputs": [
426
  {
427
  "name": "stdout",
428
  "output_type": "stream",
429
  "text": [
430
- "Running on local URL: http://127.0.0.1:7862\n",
431
  "\n",
432
  "To create a public link, set `share=True` in `launch()`.\n"
433
  ]
@@ -435,7 +623,7 @@
435
  {
436
  "data": {
437
  "text/html": [
438
- "<div><iframe src=\"http://127.0.0.1:7862/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
439
  ],
440
  "text/plain": [
441
  "<IPython.core.display.HTML object>"
@@ -448,7 +636,7 @@
448
  "data": {
449
  "text/plain": []
450
  },
451
- "execution_count": 16,
452
  "metadata": {},
453
  "output_type": "execute_result"
454
  }
@@ -462,21 +650,21 @@
462
  "with gr.Blocks() as demo:\n",
463
  " gr.Markdown(title)\n",
464
  " gr.Markdown(description)\n",
465
- " gr.components.DataFrame(value=value_func)\n",
466
  "\n",
467
  "demo.launch()\n"
468
  ]
469
  },
470
  {
471
  "cell_type": "code",
472
- "execution_count": 14,
473
  "metadata": {},
474
  "outputs": [
475
  {
476
  "name": "stdout",
477
  "output_type": "stream",
478
  "text": [
479
- "Closing server running on port: 7861\n"
480
  ]
481
  }
482
  ],
@@ -486,7 +674,7 @@
486
  },
487
  {
488
  "cell_type": "code",
489
- "execution_count": 35,
490
  "metadata": {},
491
  "outputs": [],
492
  "source": [
 
13
  },
14
  {
15
  "cell_type": "code",
16
+ "execution_count": 59,
17
  "metadata": {},
18
  "outputs": [],
19
  "source": [
 
26
  },
27
  {
28
  "cell_type": "code",
29
+ "execution_count": 60,
30
  "metadata": {},
31
  "outputs": [],
32
  "source": [
 
37
  },
38
  {
39
  "cell_type": "code",
40
+ "execution_count": 61,
41
  "metadata": {},
42
  "outputs": [],
43
  "source": [
 
48
  },
49
  {
50
  "cell_type": "code",
51
+ "execution_count": 62,
52
  "metadata": {},
53
  "outputs": [
54
  {
 
210
  "7 ‘Control’ means instruction tuned "
211
  ]
212
  },
213
+ "execution_count": 62,
214
  "metadata": {},
215
  "output_type": "execute_result"
216
  }
 
221
  },
222
  {
223
  "cell_type": "code",
224
+ "execution_count": 63,
225
  "metadata": {},
226
  "outputs": [
227
  {
 
376
  "96 NaN "
377
  ]
378
  },
379
+ "execution_count": 63,
380
  "metadata": {},
381
  "output_type": "execute_result"
382
  }
 
387
  },
388
  {
389
  "cell_type": "code",
390
+ "execution_count": 64,
391
  "metadata": {},
392
  "outputs": [],
393
  "source": [
394
  "# |export\n",
395
  "def make_clickable_cell(cell):\n",
396
+ " if pd.isnull(cell):\n",
397
+ " return \"\"\n",
398
+ " else:\n",
399
+ " return f'<a target=\"_blank\" href=\"{cell}\">{cell}</a>'\n"
400
  ]
401
  },
402
  {
403
  "cell_type": "code",
404
+ "execution_count": 65,
405
  "metadata": {},
406
  "outputs": [],
407
  "source": [
408
  "# |export\n",
409
+ "columns_to_click = [\"Paper / Repo\", \"Selected \\nplaygrounds\"]\n",
410
+ "for col in columns_to_click:\n",
411
+ " df[col] = df[col].apply(make_clickable_cell)\n"
412
  ]
413
  },
414
  {
415
  "cell_type": "code",
416
+ "execution_count": 66,
417
+ "metadata": {},
418
+ "outputs": [
419
+ {
420
+ "data": {
421
+ "text/html": [
422
+ "<div>\n",
423
+ "<style scoped>\n",
424
+ " .dataframe tbody tr th:only-of-type {\n",
425
+ " vertical-align: middle;\n",
426
+ " }\n",
427
+ "\n",
428
+ " .dataframe tbody tr th {\n",
429
+ " vertical-align: top;\n",
430
+ " }\n",
431
+ "\n",
432
+ " .dataframe thead th {\n",
433
+ " text-align: right;\n",
434
+ " }\n",
435
+ "</style>\n",
436
+ "<table border=\"1\" class=\"dataframe\">\n",
437
+ " <thead>\n",
438
+ " <tr style=\"text-align: right;\">\n",
439
+ " <th></th>\n",
440
+ " <th>Model</th>\n",
441
+ " <th>Lab</th>\n",
442
+ " <th>Selected \\nplaygrounds</th>\n",
443
+ " <th>Parameters \\n(B)</th>\n",
444
+ " <th>Tokens \\ntrained (B)</th>\n",
445
+ " <th>Ratio T:P\\n(Chinchilla scaling)</th>\n",
446
+ " <th>Training dataset</th>\n",
447
+ " <th>Announced\\n▼</th>\n",
448
+ " <th>Public?</th>\n",
449
+ " <th>Released</th>\n",
450
+ " <th>Paper / Repo</th>\n",
451
+ " <th>Notes</th>\n",
452
+ " </tr>\n",
453
+ " </thead>\n",
454
+ " <tbody>\n",
455
+ " <tr>\n",
456
+ " <th>3</th>\n",
457
+ " <td>Kosmos-1</td>\n",
458
+ " <td>Microsoft</td>\n",
459
+ " <td></td>\n",
460
+ " <td>1.6</td>\n",
461
+ " <td>360</td>\n",
462
+ " <td>225:1</td>\n",
463
+ " <td>🆆 📚⬆ 🕸 🌋</td>\n",
464
+ " <td>Feb/2023</td>\n",
465
+ " <td>🔴</td>\n",
466
+ " <td>Feb/2023</td>\n",
467
+ " <td>&lt;a target=\"_blank\" href=\"https://arxiv.org/ab...</td>\n",
468
+ " <td>Multimodal large language model (MLLM). Raven’...</td>\n",
469
+ " </tr>\n",
470
+ " <tr>\n",
471
+ " <th>4</th>\n",
472
+ " <td>LLaMA-65B</td>\n",
473
+ " <td>Meta AI</td>\n",
474
+ " <td>&lt;a target=\"_blank\" href=\"Weights leaked: http...</td>\n",
475
+ " <td>65</td>\n",
476
+ " <td>1400</td>\n",
477
+ " <td>22:1</td>\n",
478
+ " <td>🆆 📚⬆ 🕸 🌋</td>\n",
479
+ " <td>Feb/2023</td>\n",
480
+ " <td>🟡</td>\n",
481
+ " <td>Feb/2023</td>\n",
482
+ " <td>&lt;a target=\"_blank\" href=\"https://research.fac...</td>\n",
483
+ " <td>Researchers only, noncommercial only. 'LLaMA-6...</td>\n",
484
+ " </tr>\n",
485
+ " <tr>\n",
486
+ " <th>5</th>\n",
487
+ " <td>MOSS</td>\n",
488
+ " <td>Fudan University</td>\n",
489
+ " <td>&lt;a target=\"_blank\" href=\"https://moss.fastnlp...</td>\n",
490
+ " <td>20</td>\n",
491
+ " <td>430</td>\n",
492
+ " <td>22:1</td>\n",
493
+ " <td>🕸 🌋</td>\n",
494
+ " <td>Feb/2023</td>\n",
495
+ " <td>����</td>\n",
496
+ " <td>Feb/2023</td>\n",
497
+ " <td>&lt;a target=\"_blank\" href=\"https://txsun1997.gi...</td>\n",
498
+ " <td>Major bandwidth issues: https://www.reuters.co...</td>\n",
499
+ " </tr>\n",
500
+ " <tr>\n",
501
+ " <th>6</th>\n",
502
+ " <td>Palmyra</td>\n",
503
+ " <td>Writer</td>\n",
504
+ " <td>&lt;a target=\"_blank\" href=\"https://huggingface....</td>\n",
505
+ " <td>20</td>\n",
506
+ " <td>300</td>\n",
507
+ " <td>15:1</td>\n",
508
+ " <td>🌋</td>\n",
509
+ " <td>Feb/2023</td>\n",
510
+ " <td>🟢</td>\n",
511
+ " <td>Feb/2023</td>\n",
512
+ " <td>&lt;a target=\"_blank\" href=\"https://writer.com/b...</td>\n",
513
+ " <td>Only up to 5B available open-source 'trained o...</td>\n",
514
+ " </tr>\n",
515
+ " <tr>\n",
516
+ " <th>7</th>\n",
517
+ " <td>Luminous Supreme Control</td>\n",
518
+ " <td>Aleph Alpha</td>\n",
519
+ " <td>&lt;a target=\"_blank\" href=\"https://app.aleph-al...</td>\n",
520
+ " <td>70</td>\n",
521
+ " <td>NaN</td>\n",
522
+ " <td>NaN</td>\n",
523
+ " <td>🆆 📚⬆ 🕸 👥</td>\n",
524
+ " <td>Feb/2023</td>\n",
525
+ " <td>🟢</td>\n",
526
+ " <td>Feb/2023</td>\n",
527
+ " <td>&lt;a target=\"_blank\" href=\"https://docs.aleph-a...</td>\n",
528
+ " <td>‘Control’ means instruction tuned</td>\n",
529
+ " </tr>\n",
530
+ " </tbody>\n",
531
+ "</table>\n",
532
+ "</div>"
533
+ ],
534
+ "text/plain": [
535
+ " Model Lab \\\n",
536
+ "3 Kosmos-1 Microsoft \n",
537
+ "4 LLaMA-65B Meta AI \n",
538
+ "5 MOSS Fudan University \n",
539
+ "6 Palmyra Writer \n",
540
+ "7 Luminous Supreme Control Aleph Alpha \n",
541
+ "\n",
542
+ " Selected \\nplaygrounds Parameters \\n(B) \\\n",
543
+ "3 1.6 \n",
544
+ "4 <a target=\"_blank\" href=\"Weights leaked: http... 65 \n",
545
+ "5 <a target=\"_blank\" href=\"https://moss.fastnlp... 20 \n",
546
+ "6 <a target=\"_blank\" href=\"https://huggingface.... 20 \n",
547
+ "7 <a target=\"_blank\" href=\"https://app.aleph-al... 70 \n",
548
+ "\n",
549
+ " Tokens \\ntrained (B) Ratio T:P\\n(Chinchilla scaling) Training dataset \\\n",
550
+ "3 360 225:1 🆆 📚⬆ 🕸 🌋 \n",
551
+ "4 1400 22:1 🆆 📚⬆ 🕸 🌋 \n",
552
+ "5 430 22:1 🕸 🌋 \n",
553
+ "6 300 15:1 🌋 \n",
554
+ "7 NaN NaN 🆆 📚⬆ 🕸 👥 \n",
555
+ "\n",
556
+ " Announced\\n▼ Public? Released \\\n",
557
+ "3 Feb/2023 🔴 Feb/2023 \n",
558
+ "4 Feb/2023 🟡 Feb/2023 \n",
559
+ "5 Feb/2023 🟢 Feb/2023 \n",
560
+ "6 Feb/2023 🟢 Feb/2023 \n",
561
+ "7 Feb/2023 🟢 Feb/2023 \n",
562
+ "\n",
563
+ " Paper / Repo \\\n",
564
+ "3 <a target=\"_blank\" href=\"https://arxiv.org/ab... \n",
565
+ "4 <a target=\"_blank\" href=\"https://research.fac... \n",
566
+ "5 <a target=\"_blank\" href=\"https://txsun1997.gi... \n",
567
+ "6 <a target=\"_blank\" href=\"https://writer.com/b... \n",
568
+ "7 <a target=\"_blank\" href=\"https://docs.aleph-a... \n",
569
+ "\n",
570
+ " Notes \n",
571
+ "3 Multimodal large language model (MLLM). Raven’... \n",
572
+ "4 Researchers only, noncommercial only. 'LLaMA-6... \n",
573
+ "5 Major bandwidth issues: https://www.reuters.co... \n",
574
+ "6 Only up to 5B available open-source 'trained o... \n",
575
+ "7 ‘Control’ means instruction tuned "
576
+ ]
577
+ },
578
+ "execution_count": 66,
579
+ "metadata": {},
580
+ "output_type": "execute_result"
581
+ }
582
+ ],
583
+ "source": [
584
+ "df.head()\n"
585
+ ]
586
+ },
587
+ {
588
+ "cell_type": "code",
589
+ "execution_count": 67,
590
  "metadata": {},
591
  "outputs": [],
592
  "source": [
 
598
  },
599
  {
600
  "cell_type": "code",
601
+ "execution_count": 68,
602
+ "metadata": {},
603
+ "outputs": [],
604
+ "source": [
605
+ "# |export\n",
606
+ "dtypes = [\"str\" if c not in columns_to_click else \"markdown\" for c in df.columns]\n"
607
+ ]
608
+ },
609
+ {
610
+ "cell_type": "code",
611
+ "execution_count": 69,
612
  "metadata": {},
613
  "outputs": [
614
  {
615
  "name": "stdout",
616
  "output_type": "stream",
617
  "text": [
618
+ "Running on local URL: http://127.0.0.1:7868\n",
619
  "\n",
620
  "To create a public link, set `share=True` in `launch()`.\n"
621
  ]
 
623
  {
624
  "data": {
625
  "text/html": [
626
+ "<div><iframe src=\"http://127.0.0.1:7868/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
627
  ],
628
  "text/plain": [
629
  "<IPython.core.display.HTML object>"
 
636
  "data": {
637
  "text/plain": []
638
  },
639
+ "execution_count": 69,
640
  "metadata": {},
641
  "output_type": "execute_result"
642
  }
 
650
  "with gr.Blocks() as demo:\n",
651
  " gr.Markdown(title)\n",
652
  " gr.Markdown(description)\n",
653
+ " gr.components.DataFrame(value=value_func, datatype=dtypes)\n",
654
  "\n",
655
  "demo.launch()\n"
656
  ]
657
  },
658
  {
659
  "cell_type": "code",
660
+ "execution_count": 70,
661
  "metadata": {},
662
  "outputs": [
663
  {
664
  "name": "stdout",
665
  "output_type": "stream",
666
  "text": [
667
+ "Closing server running on port: 7868\n"
668
  ]
669
  }
670
  ],
 
674
  },
675
  {
676
  "cell_type": "code",
677
+ "execution_count": 71,
678
  "metadata": {},
679
  "outputs": [],
680
  "source": [
app.py CHANGED
@@ -1,7 +1,7 @@
1
  # AUTOGENERATED! DO NOT EDIT! File to edit: app.ipynb.
2
 
3
  # %% auto 0
4
- __all__ = ['df', 'title', 'description', 'make_clickable_cell', 'value_func']
5
 
6
  # %% app.ipynb 0
7
  import gradio as gr
@@ -27,19 +27,29 @@ df = df.copy()[df["Parameters \n(B)"] != "TBA"]
27
 
28
  # %% app.ipynb 6
29
  def make_clickable_cell(cell):
30
- return f'<a target="_blank" href="{cell}">{cell}</a>'
 
 
 
31
 
32
 
33
  # %% app.ipynb 7
34
- df["Paper / Repo"] = df["Paper / Repo"].apply(make_clickable_cell)
 
 
35
 
36
- # %% app.ipynb 8
 
37
  title = """<h1 align="center">The Large Language Models Landscape</h1>"""
38
  description = """Large Language Models (LLMs) today come in a variety architectures and capabilities. This interactive landscape provides a visual overview of the most important LLMs, including their training data, size, release date, and whether they are openly accessible or not. It also includes notes on each model to provide additional context. This landscape is derived from data compiled by Dr. Alan D. Thompson at [lifearchitect.ai](https://lifearchitect.ai).
39
  """
40
 
41
 
42
- # %% app.ipynb 9
 
 
 
 
43
  def value_func():
44
  return df
45
 
@@ -47,7 +57,7 @@ def value_func():
47
  with gr.Blocks() as demo:
48
  gr.Markdown(title)
49
  gr.Markdown(description)
50
- gr.components.DataFrame(value=value_func)
51
 
52
  demo.launch()
53
 
 
1
  # AUTOGENERATED! DO NOT EDIT! File to edit: app.ipynb.
2
 
3
  # %% auto 0
4
+ __all__ = ['df', 'columns_to_click', 'title', 'description', 'dtypes', 'make_clickable_cell', 'value_func']
5
 
6
  # %% app.ipynb 0
7
  import gradio as gr
 
27
 
28
  # %% app.ipynb 6
29
  def make_clickable_cell(cell):
30
+ if pd.isnull(cell):
31
+ return ""
32
+ else:
33
+ return f'<a target="_blank" href="{cell}">{cell}</a>'
34
 
35
 
36
  # %% app.ipynb 7
37
+ columns_to_click = ["Paper / Repo", "Selected \nplaygrounds"]
38
+ for col in columns_to_click:
39
+ df[col] = df[col].apply(make_clickable_cell)
40
 
41
+
42
+ # %% app.ipynb 9
43
  title = """<h1 align="center">The Large Language Models Landscape</h1>"""
44
  description = """Large Language Models (LLMs) today come in a variety architectures and capabilities. This interactive landscape provides a visual overview of the most important LLMs, including their training data, size, release date, and whether they are openly accessible or not. It also includes notes on each model to provide additional context. This landscape is derived from data compiled by Dr. Alan D. Thompson at [lifearchitect.ai](https://lifearchitect.ai).
45
  """
46
 
47
 
48
+ # %% app.ipynb 10
49
+ dtypes = ["str" if c not in columns_to_click else "markdown" for c in df.columns]
50
+
51
+
52
+ # %% app.ipynb 11
53
  def value_func():
54
  return df
55
 
 
57
  with gr.Blocks() as demo:
58
  gr.Markdown(title)
59
  gr.Markdown(description)
60
+ gr.components.DataFrame(value=value_func, datatype=dtypes)
61
 
62
  demo.launch()
63