Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ This is a demo of [`MBZUAI-Paris/Atlas-Chat-9B`](https://huggingface.co/MBZUAI-P
|
|
17 |
|
18 |
MAX_MAX_NEW_TOKENS = 2048
|
19 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
20 |
-
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "
|
21 |
|
22 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
23 |
|
@@ -27,8 +27,8 @@ model = AutoModelForCausalLM.from_pretrained(
|
|
27 |
model_id,
|
28 |
device_map="auto",
|
29 |
torch_dtype=torch.bfloat16,
|
|
|
30 |
)
|
31 |
-
model.config.sliding_window = 4096
|
32 |
model.eval()
|
33 |
|
34 |
|
|
|
17 |
|
18 |
MAX_MAX_NEW_TOKENS = 2048
|
19 |
DEFAULT_MAX_NEW_TOKENS = 1024
|
20 |
+
MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "2024"))
|
21 |
|
22 |
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
23 |
|
|
|
27 |
model_id,
|
28 |
device_map="auto",
|
29 |
torch_dtype=torch.bfloat16,
|
30 |
+
_attn_implementation="eager"
|
31 |
)
|
|
|
32 |
model.eval()
|
33 |
|
34 |
|