Spaces:
Runtime error
Runtime error
Commit
·
8f8d70a
1
Parent(s):
3ddfba1
Update app.py
Browse files
app.py
CHANGED
@@ -86,8 +86,6 @@ def print_kernel_execution(c1, c2, comp_flop, mem_bytes):
|
|
86 |
|
87 |
return exec_time
|
88 |
|
89 |
-
|
90 |
-
|
91 |
st.sidebar.header("Transformer parameters")
|
92 |
col1, col2 = st.sidebar.columns([2, 4])
|
93 |
|
@@ -115,7 +113,7 @@ for i in range(n_start, n):
|
|
115 |
mqa_time = shared_time + qkv_mqa_exec(bs, h, i, d)[2] + att1_mqa_exec(bs, h, i, d)[2] + att2_mqa_exec(bs, h, i, d)[2]
|
116 |
mqa_total_time += l*mqa_time
|
117 |
|
118 |
-
c1, c2 = st.columns(2, 4)
|
119 |
c1.write("Multi-Head Attention:")
|
120 |
c2.write(str(round(mha_total_time, 2)))
|
121 |
c1.write("Multi-Query Attention:")
|
@@ -125,7 +123,7 @@ c2.write(str(round(mha_total_time/mqa_total_time),2))
|
|
125 |
|
126 |
st.header("Memory consumption")
|
127 |
st.caption("MHA")
|
128 |
-
c1, c2 = st.columns(2, 4)
|
129 |
num_params = 12*l*d*d
|
130 |
c1.write("Num Parameters (in B)")
|
131 |
c2.write(str(round(num_params/1e9, 3)))
|
|
|
86 |
|
87 |
return exec_time
|
88 |
|
|
|
|
|
89 |
st.sidebar.header("Transformer parameters")
|
90 |
col1, col2 = st.sidebar.columns([2, 4])
|
91 |
|
|
|
113 |
mqa_time = shared_time + qkv_mqa_exec(bs, h, i, d)[2] + att1_mqa_exec(bs, h, i, d)[2] + att2_mqa_exec(bs, h, i, d)[2]
|
114 |
mqa_total_time += l*mqa_time
|
115 |
|
116 |
+
c1, c2 = st.columns([2, 4])
|
117 |
c1.write("Multi-Head Attention:")
|
118 |
c2.write(str(round(mha_total_time, 2)))
|
119 |
c1.write("Multi-Query Attention:")
|
|
|
123 |
|
124 |
st.header("Memory consumption")
|
125 |
st.caption("MHA")
|
126 |
+
c1, c2 = st.columns([2, 4])
|
127 |
num_params = 12*l*d*d
|
128 |
c1.write("Num Parameters (in B)")
|
129 |
c2.write(str(round(num_params/1e9, 3)))
|