Yurii Paniv commited on
Commit
50ca940
·
1 Parent(s): 46852ae

peft to cuda

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ quant_config = BitsAndBytesConfig(
18
  model = MistralForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1", torch_dtype=float16).to("cuda")
19
  #quantization_config=quant_config,)#.to("cuda")
20
  #device_map="auto",)
21
- model = PeftModel.from_pretrained(model, "lang-uk/dragoman")
22
  tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1", use_fast=False, add_bos_token=False)
23
 
24
  @spaces.GPU(duration=20)
 
18
  model = MistralForCausalLM.from_pretrained("mistralai/Mistral-7B-v0.1", torch_dtype=float16).to("cuda")
19
  #quantization_config=quant_config,)#.to("cuda")
20
  #device_map="auto",)
21
+ model = PeftModel.from_pretrained(model, "lang-uk/dragoman").to("cuda")
22
  tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-v0.1", use_fast=False, add_bos_token=False)
23
 
24
  @spaces.GPU(duration=20)