nurqoneah commited on
Commit
085780a
·
verified ·
1 Parent(s): 8f2a16f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -4
app.py CHANGED
@@ -39,11 +39,13 @@ def create_llm():
39
  """Initialize the language model with optimized parameters"""
40
 
41
 
42
- bnb_config = BitsAndBytesConfig(
43
- load_in_4bit=True, bnb_4bit_use_double_quant=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.bfloat16
44
- )
45
 
46
- model = AutoModelForCausalLM.from_pretrained(MODEL_NAME, quantization_config=bnb_config)
 
 
47
  tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
48
 
49
  terminators = [tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<|eot_id|>")]
 
39
  """Initialize the language model with optimized parameters"""
40
 
41
 
42
+ # bnb_config = BitsAndBytesConfig(
43
+ # load_in_4bit=True, bnb_4bit_use_double_quant=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.bfloat16
44
+ # )
45
 
46
+ model = AutoModelForCausalLM.from_pretrained(MODEL_NAME,
47
+ # quantization_config=bnb_config
48
+ )
49
  tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
50
 
51
  terminators = [tokenizer.eos_token_id, tokenizer.convert_tokens_to_ids("<|eot_id|>")]