debisoft commited on
Commit
53aff72
·
1 Parent(s): e6e3119
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -9,7 +9,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
9
  from datasets import load_dataset
10
 
11
  huggingface_hub.login(os.getenv('HF_TOKEN'))
12
- peft_model_id = "debisoft/Qwen2.5-VL-3B-Instruct-thinking-function_calling-V0"
13
 
14
  bnb_config = BitsAndBytesConfig(
15
  load_in_4bit=True,
@@ -19,6 +19,9 @@ bnb_config = BitsAndBytesConfig(
19
  )
20
 
21
  device = "auto"
 
 
 
22
  config = PeftConfig.from_pretrained(peft_model_id)
23
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(config.base_model_name_or_path,
24
  #AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path,
 
9
  from datasets import load_dataset
10
 
11
  huggingface_hub.login(os.getenv('HF_TOKEN'))
12
+ peft_model_id = "debisoft/Qwen2.5-VL-7B-Instruct-thinking-function_calling-V0"
13
 
14
  bnb_config = BitsAndBytesConfig(
15
  load_in_4bit=True,
 
19
  )
20
 
21
  device = "auto"
22
+ cuda_device = torch.device("cuda")
23
+ cpu_device = torch.device("cpu")
24
+
25
  config = PeftConfig.from_pretrained(peft_model_id)
26
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(config.base_model_name_or_path,
27
  #AutoModelForCausalLM.from_pretrained(config.base_model_name_or_path,