justheuristic commited on
Commit
1d1af69
1 Parent(s): 4b293ab

additional parameters

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -26,7 +26,8 @@ offload = col2.checkbox("Offload optimizer", value=False)
26
  share_params = col2.checkbox("Share parameters", value=False)
27
 
28
  with st.expander("More options"):
29
-
 
30
  precisions_names = ('Full', 'Mixed ("O1")', 'Pure 16-bit')
31
  precisions_values = ('O0', 'O1', 'O3')
32
  precision = st.selectbox('Precision', precisions_names, index=1)
@@ -36,7 +37,7 @@ with st.expander("More options"):
36
  args = mem_calc.parse_args(f"""
37
  --model {model} --vocab_size {vocab_size} --optimizer {optimizers_values[optimizers_names.index(optimizer)]}
38
  {'--checkpoint' if checkpoint else ''} {'--offload' if offload else ''} {'--albert' if share_params else ''}
39
- --fp16-level {precisions_values[precisions_names.index(precision)]}
40
  """.split())
41
 
42
 
 
26
  share_params = col2.checkbox("Share parameters", value=False)
27
 
28
  with st.expander("More options"):
29
+ batch_size = int(st.number_input('Microbatch size (sequences)', min_value=1, step=1, value=1, format="%i"))
30
+ seq_len = int(st.number_input('Sequence length (max. tokens)', min_value=1, step=1, value=1024, format="%i"))
31
  precisions_names = ('Full', 'Mixed ("O1")', 'Pure 16-bit')
32
  precisions_values = ('O0', 'O1', 'O3')
33
  precision = st.selectbox('Precision', precisions_names, index=1)
 
37
  args = mem_calc.parse_args(f"""
38
  --model {model} --vocab_size {vocab_size} --optimizer {optimizers_values[optimizers_names.index(optimizer)]}
39
  {'--checkpoint' if checkpoint else ''} {'--offload' if offload else ''} {'--albert' if share_params else ''}
40
+ --fp16-level {precisions_values[precisions_names.index(precision)]} --bsz {batch_size} --seqlen {seq_len}
41
  """.split())
42
 
43