Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,6 +40,7 @@ def initialize_system():
|
|
| 40 |
# Quantization config
|
| 41 |
bnb_config = BitsAndBytesConfig(
|
| 42 |
load_in_4bit=True,
|
|
|
|
| 43 |
bnb_4bit_quant_type="nf4",
|
| 44 |
bnb_4bit_compute_dtype=torch.float16,
|
| 45 |
)
|
|
@@ -50,7 +51,8 @@ def initialize_system():
|
|
| 50 |
MODEL_NAME,
|
| 51 |
quantization_config=bnb_config,
|
| 52 |
device_map="auto",
|
| 53 |
-
trust_remote_code=True
|
|
|
|
| 54 |
)
|
| 55 |
|
| 56 |
return vector_store, model, tokenizer
|
|
|
|
| 40 |
# Quantization config
|
| 41 |
bnb_config = BitsAndBytesConfig(
|
| 42 |
load_in_4bit=True,
|
| 43 |
+
bnb_4bit_use_double_quant=True,
|
| 44 |
bnb_4bit_quant_type="nf4",
|
| 45 |
bnb_4bit_compute_dtype=torch.float16,
|
| 46 |
)
|
|
|
|
| 51 |
MODEL_NAME,
|
| 52 |
quantization_config=bnb_config,
|
| 53 |
device_map="auto",
|
| 54 |
+
trust_remote_code=True,
|
| 55 |
+
use_flash_attention_2=True
|
| 56 |
)
|
| 57 |
|
| 58 |
return vector_store, model, tokenizer
|