AsyncCoder-10 commited on
Commit
41c2109
·
verified ·
1 Parent(s): 3586735

Update app/main.py

Browse files
Files changed (1) hide show
  1. app/main.py +3 -2
app/main.py CHANGED
@@ -13,8 +13,9 @@ tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
13
  model = AutoModelForCausalLM.from_pretrained(
14
  model_id,
15
  trust_remote_code=True,
16
- attn_implementation="eager", # ✅ This resolves the window_size error
17
- device_map="auto"
 
18
  )
19
  llm_pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
20
 
 
13
  model = AutoModelForCausalLM.from_pretrained(
14
  model_id,
15
  trust_remote_code=True,
16
+ attn_implementation="eager", # Solves the window_size error
17
+ device_map="auto", # Requires accelerate
18
+ torch_dtype="auto", # Use the best dtype automatically
19
  )
20
  llm_pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
21