Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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,
|