Spaces:
Runtime error
Runtime error
Commit
·
4719f35
1
Parent(s):
1550361
Update app.py
Browse files
app.py
CHANGED
@@ -34,9 +34,13 @@ mha_flop = 2*bs*n*d*3*d
|
|
34 |
mha_bytes = 2*bs*n*d + 2*3*d*d + 2*bs*n*3*d
|
35 |
|
36 |
st.subheader("Multi-query Attention")
|
37 |
-
|
38 |
-
|
39 |
-
|
|
|
|
|
|
|
|
|
40 |
|
41 |
mqa_flop = 2*bs*n*d*(1+2/h)*d
|
42 |
mqa_bytes = 2*bs*n*d + 2*(2/h)*d*d + 2*bs*n*(2/h)*d
|
|
|
34 |
mha_bytes = 2*bs*n*d + 2*3*d*d + 2*bs*n*3*d
|
35 |
|
36 |
st.subheader("Multi-query Attention")
|
37 |
+
c1, c2 = st.columns(columns or [2, 3])
|
38 |
+
c1.write("FLOP:")
|
39 |
+
c2.write(str(mha_flop))
|
40 |
+
c1.write("Bytes: ")
|
41 |
+
c2.write(str(mha_bytes))
|
42 |
+
c1.write("Arithm. intensity:")
|
43 |
+
c2.write(str(mha_flop/mha_bytes))
|
44 |
|
45 |
mqa_flop = 2*bs*n*d*(1+2/h)*d
|
46 |
mqa_bytes = 2*bs*n*d + 2*(2/h)*d*d + 2*bs*n*(2/h)*d
|