cifkao commited on
Commit
4b314cc
1 Parent(s): dca8e6c

Further limit the number of tokens

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -111,6 +111,7 @@ window_len = st.select_slider(
111
  # Now figure out how many tokens we are allowed to use:
112
  # window_len * (num_tokens + window_len) * vocab_size <= MAX_MEM
113
  max_tokens = int(MAX_MEM / (multiplier * window_len) - window_len)
 
114
 
115
  DEFAULT_TEXT = """
116
  We present context length probing, a novel explanation technique for causal
 
111
  # Now figure out how many tokens we are allowed to use:
112
  # window_len * (num_tokens + window_len) * vocab_size <= MAX_MEM
113
  max_tokens = int(MAX_MEM / (multiplier * window_len) - window_len)
114
+ max_tokens = min(max_tokens, 4096)
115
 
116
  DEFAULT_TEXT = """
117
  We present context length probing, a novel explanation technique for causal