Spaces:
Running
Running
Paulie-Aditya
commited on
Commit
·
685b00b
1
Parent(s):
1185cee
using cache to avoid mle
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ class Assistant:
|
|
11 |
device_map = 'auto'
|
12 |
# bnb_config = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",bnb_4bit_compute_dtype=torch.float16,)
|
13 |
# self.model = AutoModelForCausalLM.from_pretrained( model_name,quantization_config=bnb_config, trust_remote_code=True,use_cache=False,device_map=device_map)
|
14 |
-
self.model = AutoModelForCausalLM.from_pretrained( model_name, trust_remote_code=True,use_cache=
|
15 |
|
16 |
self.tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
17 |
self.tokenizer.pad_token = self.tokenizer.eos_token
|
|
|
11 |
device_map = 'auto'
|
12 |
# bnb_config = BitsAndBytesConfig(load_in_4bit=True, bnb_4bit_quant_type="nf4",bnb_4bit_compute_dtype=torch.float16,)
|
13 |
# self.model = AutoModelForCausalLM.from_pretrained( model_name,quantization_config=bnb_config, trust_remote_code=True,use_cache=False,device_map=device_map)
|
14 |
+
self.model = AutoModelForCausalLM.from_pretrained( model_name, trust_remote_code=True,use_cache=True,device_map=device_map)
|
15 |
|
16 |
self.tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
17 |
self.tokenizer.pad_token = self.tokenizer.eos_token
|