habdine commited on
Commit
b44c523
1 Parent(s): 9aaf598

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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", "4096"))
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