Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -35,15 +35,14 @@ quantization_config = BitsAndBytesConfig(
|
|
35 |
# quantization_config = BitsAndBytesConfig(load_in_8bit=True)
|
36 |
|
37 |
model_id = "CardinalOperations/ORLM-LLaMA-3-8B"
|
38 |
-
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
39 |
model = AutoModelForCausalLM.from_pretrained(
|
40 |
model_id,
|
41 |
device_map="auto",
|
42 |
torch_dtype=torch.bfloat16,
|
43 |
attn_implementation="flash_attention_2",
|
44 |
-
|
45 |
)
|
46 |
-
model.config.sliding_window = 4096
|
47 |
model.eval()
|
48 |
|
49 |
|
|
|
35 |
# quantization_config = BitsAndBytesConfig(load_in_8bit=True)
|
36 |
|
37 |
model_id = "CardinalOperations/ORLM-LLaMA-3-8B"
|
38 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=True)
|
39 |
model = AutoModelForCausalLM.from_pretrained(
|
40 |
model_id,
|
41 |
device_map="auto",
|
42 |
torch_dtype=torch.bfloat16,
|
43 |
attn_implementation="flash_attention_2",
|
44 |
+
quantization_config=quantization_config,
|
45 |
)
|
|
|
46 |
model.eval()
|
47 |
|
48 |
|