Spaces:
Running
Running
Further limit the number of tokens
Browse files
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
|