Spaces:
Sleeping
Sleeping
token
Browse files
app.py
CHANGED
@@ -12,8 +12,7 @@ quantization_config = BitsAndBytesConfig(
|
|
12 |
load_in_4bit=True,
|
13 |
bnb_4bit_use_double_quant=True,
|
14 |
bnb_4bit_quant_type="nf4",
|
15 |
-
bnb_4bit_compute_dtype=torch.bfloat16
|
16 |
-
load_in_8bit_fp32_cpu_offload=True # Set as suggested in the error
|
17 |
)
|
18 |
|
19 |
# Load the base model with the updated quantization configuration
|
@@ -22,7 +21,7 @@ base_model = AutoModelForCausalLM.from_pretrained(
|
|
22 |
base_model_id,
|
23 |
quantization_config=quantization_config,
|
24 |
trust_remote_code=True,
|
25 |
-
|
26 |
)
|
27 |
|
28 |
# Load the tokenizer
|
|
|
12 |
load_in_4bit=True,
|
13 |
bnb_4bit_use_double_quant=True,
|
14 |
bnb_4bit_quant_type="nf4",
|
15 |
+
bnb_4bit_compute_dtype=torch.bfloat16
|
|
|
16 |
)
|
17 |
|
18 |
# Load the base model with the updated quantization configuration
|
|
|
21 |
base_model_id,
|
22 |
quantization_config=quantization_config,
|
23 |
trust_remote_code=True,
|
24 |
+
token=True # Update this to use the token parameter
|
25 |
)
|
26 |
|
27 |
# Load the tokenizer
|