Update app.py
Browse files
app.py
CHANGED
@@ -12,15 +12,15 @@ print('device =', device)
|
|
12 |
model = AutoModelForCausalLM.from_pretrained(
|
13 |
'Viet-Mistral/Vistral-7B-Chat',
|
14 |
torch_dtype=torch.bfloat16, # change to torch.float16 if you're using V100
|
15 |
-
device_map="auto"
|
16 |
-
use_cache=True,
|
17 |
#cache_dir='/workspace/thviet/hf_cache'
|
18 |
)
|
19 |
|
20 |
tokenizer = AutoTokenizer.from_pretrained(MODEL, cache_dir='/workspace/thviet/hf_cache')
|
21 |
|
22 |
lora_config = LoraConfig.from_pretrained(
|
23 |
-
"thviet79/model-QA-medical"
|
24 |
#cache_dir='/workspace/thviet/hf_cache'
|
25 |
)
|
26 |
|
|
|
12 |
model = AutoModelForCausalLM.from_pretrained(
|
13 |
'Viet-Mistral/Vistral-7B-Chat',
|
14 |
torch_dtype=torch.bfloat16, # change to torch.float16 if you're using V100
|
15 |
+
device_map="auto"#,
|
16 |
+
#use_cache=True,
|
17 |
#cache_dir='/workspace/thviet/hf_cache'
|
18 |
)
|
19 |
|
20 |
tokenizer = AutoTokenizer.from_pretrained(MODEL, cache_dir='/workspace/thviet/hf_cache')
|
21 |
|
22 |
lora_config = LoraConfig.from_pretrained(
|
23 |
+
"thviet79/model-QA-medical"# Thay bằng đường dẫn đến mô hình LoRA trên Hugging Face
|
24 |
#cache_dir='/workspace/thviet/hf_cache'
|
25 |
)
|
26 |
|