Spaces:
Runtime error
Runtime error
Use empty quantization config to avoid AttributeError
Browse files
app.py
CHANGED
@@ -4,11 +4,13 @@ import accelerate
|
|
4 |
|
5 |
print("Accelerate version:", accelerate.__version__)
|
6 |
|
|
|
|
|
7 |
# Load the original model
|
8 |
original_model = AutoModelForCausalLM.from_pretrained(
|
9 |
"unsloth/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit",
|
10 |
load_in_4bit=False, # Disable 4-bit quantization
|
11 |
-
quantization_config=
|
12 |
)
|
13 |
original_tokenizer = AutoTokenizer.from_pretrained("unsloth/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit")
|
14 |
|
@@ -16,7 +18,7 @@ original_tokenizer = AutoTokenizer.from_pretrained("unsloth/DeepSeek-R1-Distill-
|
|
16 |
fine_tuned_model = AutoModelForCausalLM.from_pretrained(
|
17 |
"kas1/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit-John1",
|
18 |
load_in_4bit=False, # Disable 4-bit quantization
|
19 |
-
quantization_config=
|
20 |
)
|
21 |
fine_tuned_tokenizer = AutoTokenizer.from_pretrained("kas1/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit-John1")
|
22 |
|
|
|
4 |
|
5 |
print("Accelerate version:", accelerate.__version__)
|
6 |
|
7 |
+
from transformers import BitsAndBytesConfig
|
8 |
+
|
9 |
# Load the original model
|
10 |
original_model = AutoModelForCausalLM.from_pretrained(
|
11 |
"unsloth/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit",
|
12 |
load_in_4bit=False, # Disable 4-bit quantization
|
13 |
+
quantization_config=BitsAndBytesConfig() # Use an empty quantization config
|
14 |
)
|
15 |
original_tokenizer = AutoTokenizer.from_pretrained("unsloth/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit")
|
16 |
|
|
|
18 |
fine_tuned_model = AutoModelForCausalLM.from_pretrained(
|
19 |
"kas1/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit-John1",
|
20 |
load_in_4bit=False, # Disable 4-bit quantization
|
21 |
+
quantization_config=BitsAndBytesConfig() # Use an empty quantization config
|
22 |
)
|
23 |
fine_tuned_tokenizer = AutoTokenizer.from_pretrained("kas1/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit-John1")
|
24 |
|