Spaces:
Sleeping
Sleeping
Commit
·
f76a5b5
1
Parent(s):
5018214
removed quantization optimization
Browse files
app.py
CHANGED
@@ -9,8 +9,10 @@ class Assistant:
|
|
9 |
def __init__(self):
|
10 |
model_name = "ruslanmv/Medical-Llama3-8B"
|
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.tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
|
15 |
self.tokenizer.pad_token = self.tokenizer.eos_token
|
16 |
|
|
|
9 |
def __init__(self):
|
10 |
model_name = "ruslanmv/Medical-Llama3-8B"
|
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=False,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
|
18 |
|