MrunmayD commited on
Commit
5fd08fe
·
verified ·
1 Parent(s): aded77f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -40,7 +40,19 @@ Do NOT forget the triple backticks and the `<end_code>` tag — they are require
40
  Even if you can't answer the question fully, always provide reasoning and return a final_answer block.
41
  """
42
 
43
- model_name = "Qwen/Qwen2.5-Coder-7B-Instruct"
 
 
 
 
 
 
 
 
 
 
 
 
44
  tokenizer = AutoTokenizer.from_pretrained(model_name)
45
  model = AutoModelForCausalLM.from_pretrained(
46
  model_name,
 
40
  Even if you can't answer the question fully, always provide reasoning and return a final_answer block.
41
  """
42
 
43
+ model_id = "bartowski/Qwen_Qwen3-4B-GGUF"
44
+ gguf_filename = "Qwen_Qwen3-4B-IQ4_XS.gguf" # Replace with your specific GGUF file
45
+
46
+ # Load the tokenizer
47
+ tokenizer = AutoTokenizer.from_pretrained(model_id, gguf_file=gguf_filename)
48
+
49
+ # Load the model with appropriate torch_dtype
50
+ model = AutoModelForCausalLM.from_pretrained(
51
+ model_id,
52
+ gguf_file=gguf_filename,
53
+ torch_dtype=torch.float32 # Adjust based on your hardware capabilities
54
+ )
55
+
56
  tokenizer = AutoTokenizer.from_pretrained(model_name)
57
  model = AutoModelForCausalLM.from_pretrained(
58
  model_name,