bobber commited on
Commit
76deac1
·
1 Parent(s): 4482b12

load gguf weight

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -7,14 +7,20 @@ import torch
7
  #Qwen/Qwen2-0.5B
8
  model_name = "simplescaling/s1.1-32B"
9
  subfolder = "Qwen-0.5B-GRPO/checkpoint-1868"
 
 
10
 
11
  model = AutoModelForCausalLM.from_pretrained(
12
  model_name,
13
  # subfolder=subfolder,
14
- torch_dtype=torch.bfloat16,
 
15
  device_map="auto"
16
  )
17
- tokenizer = AutoTokenizer.from_pretrained(model_name, subfolder=subfolder)
 
 
 
18
  SYSTEM_PROMPT = """
19
  Respond in the following format:
20
  <reasoning>
 
7
  #Qwen/Qwen2-0.5B
8
  model_name = "simplescaling/s1.1-32B"
9
  subfolder = "Qwen-0.5B-GRPO/checkpoint-1868"
10
+ filename = "s1-32B-Q6_K_L.gguf"
11
+ torch_dtype = torch.float32 # could be torch.float16 or torch.bfloat16 too
12
 
13
  model = AutoModelForCausalLM.from_pretrained(
14
  model_name,
15
  # subfolder=subfolder,
16
+ gguf_file=filename,
17
+ torch_dtype=torch_dtype,
18
  device_map="auto"
19
  )
20
+ tokenizer = AutoTokenizer.from_pretrained(model_name
21
+ , gguf_file=filename
22
+ # , subfolder=subfolder
23
+ )
24
  SYSTEM_PROMPT = """
25
  Respond in the following format:
26
  <reasoning>