lvwerra HF staff commited on
Commit
d5f0a3f
1 Parent(s): 7dea8d5

low mem loading of model

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ def load_tokenizer(model_ckpt):
11
 
12
  @st.cache(allow_output_mutation=True)
13
  def load_model(model_ckpt):
14
- model = AutoModelForCausalLM.from_pretrained(model_ckpt)
15
  return model
16
 
17
  @st.cache()
 
11
 
12
  @st.cache(allow_output_mutation=True)
13
  def load_model(model_ckpt):
14
+ model = AutoModelForCausalLM.from_pretrained(model_ckpt, low_cpu_mem_usage=True)
15
  return model
16
 
17
  @st.cache()