harmdevries commited on
Commit
bc2a18b
·
1 Parent(s): 0332fd5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -127,7 +127,9 @@ 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)))
130
- c1.write("Storing activations")
 
 
131
  acts = round(2*bs*l*(d/h)*h*2*n/1e9, 2)
132
  c2.write(str(acts))
133
 
@@ -136,12 +138,13 @@ c1, c2 = st.columns([2, 4])
136
  num_params = (10+2/h)*l*d*d
137
  c1.write("Num Parameters (in B)")
138
  c2.write(str(round(num_params/1e9, 3)))
139
- c1.write("Storing activations")
 
 
140
  acts = round(2*bs*l*(d/h)*2*n/1e9, 2)
141
  c2.write(str(acts))
142
 
143
 
144
-
145
  breakdown = st.checkbox("Show breakdown per operation")
146
  if breakdown:
147
  st.header('Attention layer')
 
127
  num_params = 12*l*d*d
128
  c1.write("Num Parameters (in B)")
129
  c2.write(str(round(num_params/1e9, 3)))
130
+ c1.write("Stored Parameters (GB)")
131
+ c2.write(str(round(2*num_params/1e9, 3)))
132
+ c1.write("Cached keys and values (GB)")
133
  acts = round(2*bs*l*(d/h)*h*2*n/1e9, 2)
134
  c2.write(str(acts))
135
 
 
138
  num_params = (10+2/h)*l*d*d
139
  c1.write("Num Parameters (in B)")
140
  c2.write(str(round(num_params/1e9, 3)))
141
+ c1.write("Stored Parameters (GB)")
142
+ c2.write(str(round(2*num_params/1e9, 3)))
143
+ c1.write("Cached keys and values (GB)")
144
  acts = round(2*bs*l*(d/h)*2*n/1e9, 2)
145
  c2.write(str(acts))
146
 
147
 
 
148
  breakdown = st.checkbox("Show breakdown per operation")
149
  if breakdown:
150
  st.header('Attention layer')