cifkao commited on
Commit
e2a018d
1 Parent(s): d2e3092

Decrease limit

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -57,8 +57,8 @@ metric_name = st.selectbox("Metric", ["KL divergence", "Cross entropy"], index=1
57
 
58
  tokenizer = st.cache_resource(AutoTokenizer.from_pretrained, show_spinner=False)(model_name, use_fast=False)
59
 
60
- # Make sure the logprobs do not use up more than ~6 GB of memory
61
- MAX_MEM = 6e9 / (torch.finfo(torch.float16).bits / 8)
62
  # Select window lengths such that we are allowed to fill the whole window without running out of memory
63
  # (otherwise the window length is irrelevant)
64
  window_len_options = [
 
57
 
58
  tokenizer = st.cache_resource(AutoTokenizer.from_pretrained, show_spinner=False)(model_name, use_fast=False)
59
 
60
+ # Make sure the logprobs do not use up more than ~4 GB of memory
61
+ MAX_MEM = 4e9 / (torch.finfo(torch.float16).bits / 8)
62
  # Select window lengths such that we are allowed to fill the whole window without running out of memory
63
  # (otherwise the window length is irrelevant)
64
  window_len_options = [