harmdevries commited on
Commit
23b5435
·
1 Parent(s): f86ffab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -11,17 +11,17 @@ st.header('Query, Key, Value projection')
11
  mha_flop = 2*bs*n*d*3*d
12
  mha_bytes = 2*bs*n*d + 2*3*d*d + 2*bs*n*3*d
13
 
14
- st.write("Multi-query Attention")
15
- st.write("FLOP: " + mha_flop)
16
- st.write("bytes: " + mha_bytes)
17
- st.write("Arithm. intensity:" + (mha_flop/mha_bytes))
18
 
19
  mqa_flop = 2*bs*n*d*(1+2/h)*d
20
  mqa_bytes = 2*bs*n*d + 2*(2/h)*d*d + 2*bs*n*(2/h)*d
21
 
22
- st.write("Multi-query Attention")
23
- st.write("FLOP: " + mqa_flop)
24
- st.write("bytes: " + mqa_bytes)
25
- st.write("Arithm. intensity:" + (mqa_flop/mqa_bytes))
26
 
27
- st.header('Query, Key, Value projection')
 
11
  mha_flop = 2*bs*n*d*3*d
12
  mha_bytes = 2*bs*n*d + 2*3*d*d + 2*bs*n*3*d
13
 
14
+ st.subheader("Multi-query Attention")
15
+ st.text("FLOP: " + str(mha_flop))
16
+ st.text("bytes: " + str(mha_bytes))
17
+ st.text("Arithm. intensity:" + str(mha_flop/mha_bytes))
18
 
19
  mqa_flop = 2*bs*n*d*(1+2/h)*d
20
  mqa_bytes = 2*bs*n*d + 2*(2/h)*d*d + 2*bs*n*(2/h)*d
21
 
22
+ st.subheader("Multi-query Attention")
23
+ st.write("FLOP: " + str(mqa_flop))
24
+ st.write("bytes: " + str(mqa_bytes))
25
+ st.write("Arithm. intensity:" + str(mqa_flop/mqa_bytes))
26
 
27
+ st.header('Attention')