sanjeevbora commited on
Commit
90dbd88
·
verified ·
1 Parent(s): 43c1570

updated app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -20,19 +20,19 @@ books_db_client = books_db.as_retriever()
20
  # Initialize the model and tokenizer
21
  model_name = "stabilityai/stablelm-zephyr-3b"
22
 
23
- bnb_config = transformers.BitsAndBytesConfig(
24
- load_in_4bit=True,
25
- bnb_4bit_quant_type='nf4',
26
- bnb_4bit_use_double_quant=True,
27
- bnb_4bit_compute_dtype=torch.bfloat16
28
- )
29
 
30
  model_config = transformers.AutoConfig.from_pretrained(model_name, max_new_tokens=1024)
31
  model = transformers.AutoModelForCausalLM.from_pretrained(
32
  model_name,
33
  trust_remote_code=True,
34
  config=model_config,
35
- quantization_config=bnb_config,
36
  device_map=device,
37
  )
38
 
 
20
  # Initialize the model and tokenizer
21
  model_name = "stabilityai/stablelm-zephyr-3b"
22
 
23
+ # bnb_config = transformers.BitsAndBytesConfig(
24
+ # load_in_4bit=True,
25
+ # bnb_4bit_quant_type='nf4',
26
+ # bnb_4bit_use_double_quant=True,
27
+ # bnb_4bit_compute_dtype=torch.bfloat16
28
+ # )
29
 
30
  model_config = transformers.AutoConfig.from_pretrained(model_name, max_new_tokens=1024)
31
  model = transformers.AutoModelForCausalLM.from_pretrained(
32
  model_name,
33
  trust_remote_code=True,
34
  config=model_config,
35
+ # quantization_config=bnb_config,
36
  device_map=device,
37
  )
38