minhdang commited on
Commit
3f46449
1 Parent(s): 381b170

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -18,7 +18,10 @@ nf4_config = BitsAndBytesConfig(
18
 
19
  model_id = "CohereForAI/c4ai-command-r-v01"
20
  tokenizer = AutoTokenizer.from_pretrained(model_id)
21
- model = AutoModelForCausalLM.from_pretrained(model_id,quantization_config=nf4_config)
 
 
 
22
 
23
  @spaces.GPU
24
  def generate_response(user_input, max_new_tokens, temperature):
 
18
 
19
  model_id = "CohereForAI/c4ai-command-r-v01"
20
  tokenizer = AutoTokenizer.from_pretrained(model_id)
21
+ model = AutoModelForCausalLM.from_pretrained(model_id,
22
+ load_in_8bit=True,
23
+ # quantization_config=nf4_config
24
+ )
25
 
26
  @spaces.GPU
27
  def generate_response(user_input, max_new_tokens, temperature):