This repository was archived by the owner on Jul 31, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathplot_more_figures.py
More file actions
63 lines (51 loc) · 2.1 KB
/
Copy pathplot_more_figures.py
File metadata and controls
63 lines (51 loc) · 2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
import matplotlib.pyplot as plt
import numpy as np
# Nature Style configuration
def set_nature_style():
plt.rcParams['font.family'] = 'sans-serif'
plt.rcParams['font.sans-serif'] = ['Arial', 'Helvetica']
plt.rcParams['axes.spines.top'] = False
plt.rcParams['axes.spines.right'] = False
plt.rcParams['axes.linewidth'] = 1.0
plt.rcParams['font.size'] = 12
plt.rcParams['axes.labelsize'] = 14
plt.rcParams['axes.titlesize'] = 14
plt.rcParams['legend.fontsize'] = 12
set_nature_style()
nature_blue = '#00468b'
nature_red = '#ed0000'
nature_grey = '#8c8c8c'
# Plot 1: Concurrency comparison (100k context)
fig, ax = plt.subplots(figsize=(6, 4.5))
categories = ['Traditional\n(1x A100)', 'MT-LNN\n(1x RTX 4090)']
concurrency = [12, 180] # A100 OOMs fast, 4090 can handle hundreds due to O(1) state
ax.bar(categories, concurrency, width=0.4, color=[nature_red, nature_blue])
ax.set_ylabel('Max Concurrent Users (100k context)')
ax.set_title('Concurrency Capacity (Less is NOT more)')
# Add value labels
for i, v in enumerate(concurrency):
ax.text(i, v + 2, str(v), ha='center', fontweight='bold')
plt.tight_layout()
plt.savefig('notes/fig_concurrency.png', dpi=300)
plt.close()
# Plot 2: Market Positioning Bubble Chart
fig, ax = plt.subplots(figsize=(7, 5))
# x: Deployability / Edge readiness (0-10)
# y: Context Mastery / Recall (0-10)
# size: Inference Cost
models = ['Claude 3.5\n(Cloud Only)', 'Llama 3 70B\n(Server)', 'Mamba\n(Server/Local)', 'MT-LNN\n(Edge/Local/Cloud)']
x = [1, 2, 7, 9.5]
y = [9.5, 7, 8, 9.5]
s = [4000, 2000, 500, 100] # bubble size represents cost
colors = [nature_red, nature_grey, '#a0c4ff', nature_blue]
scatter = ax.scatter(x, y, s=s, c=colors, alpha=0.7, edgecolors='none')
for i, txt in enumerate(models):
ax.annotate(txt, (x[i], y[i]), xytext=(10,-10), textcoords='offset points')
ax.set_xlim(0, 11)
ax.set_ylim(0, 11)
ax.set_xlabel('Edge Deployability & Low Cost')
ax.set_ylabel('Infinite Context Mastery')
ax.set_title('LLM Landscape Positioning\n(Bubble Size = Inference Cost)')
plt.tight_layout()
plt.savefig('notes/fig_landscape.png', dpi=300)
plt.close()