Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -77,7 +77,8 @@ def initialize_model():
|
|
77 |
load_in_8bit=True,
|
78 |
bnb_8bit_compute_dtype=torch.bfloat16,
|
79 |
bnb_8bit_quant_type="nf4",
|
80 |
-
bnb_8bit_use_double_quant=True
|
|
|
81 |
)
|
82 |
|
83 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID , trust_remote_code=True)
|
@@ -86,7 +87,7 @@ def initialize_model():
|
|
86 |
|
87 |
model = AutoModelForCausalLM.from_pretrained(
|
88 |
MODEL_ID,
|
89 |
-
torch_dtype=
|
90 |
device_map="cuda",
|
91 |
# attn_implementation="flash_attention_2",
|
92 |
trust_remote_code=True,
|
|
|
77 |
load_in_8bit=True,
|
78 |
bnb_8bit_compute_dtype=torch.bfloat16,
|
79 |
bnb_8bit_quant_type="nf4",
|
80 |
+
bnb_8bit_use_double_quant=True,
|
81 |
+
llm_int8_enable_fp32_cpu_offload=True
|
82 |
)
|
83 |
|
84 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID , trust_remote_code=True)
|
|
|
87 |
|
88 |
model = AutoModelForCausalLM.from_pretrained(
|
89 |
MODEL_ID,
|
90 |
+
torch_dtype="auto",
|
91 |
device_map="cuda",
|
92 |
# attn_implementation="flash_attention_2",
|
93 |
trust_remote_code=True,
|