JUNGU commited on
Commit
895beee
โ€ข
1 Parent(s): 3ece526

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -11,6 +11,10 @@ import spaces
11
  import time
12
  import subprocess
13
 
 
 
 
 
14
  # flash-attn ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜. CUDA ๋นŒ๋“œ๋Š” ๊ฑด๋„ˆ๋œ€.
15
  subprocess.run(
16
  "pip install flash-attn --no-build-isolation",
@@ -29,7 +33,14 @@ model = AutoModelForCausalLM.from_pretrained(
29
  token=token,
30
  trust_remote_code=True,
31
  )
32
- tok = AutoTokenizer.from_pretrained("apple/OpenELM-3B-Instruct", token=token, trust_remote_code=True)
 
 
 
 
 
 
 
33
 
34
  # ์ข…๋ฃŒ ํ† ํฐ ID ์„ค์ •
35
  terminators = [
 
11
  import time
12
  import subprocess
13
 
14
+ from transformers_modules.apple.OpenELM-3B-Instruct.d3c76da586450c73898e6bed70cecf3376300fb3.configuration_openelm import OpenELMConfig
15
+
16
+
17
+
18
  # flash-attn ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜. CUDA ๋นŒ๋“œ๋Š” ๊ฑด๋„ˆ๋œ€.
19
  subprocess.run(
20
  "pip install flash-attn --no-build-isolation",
 
33
  token=token,
34
  trust_remote_code=True,
35
  )
36
+ # bug fix
37
+ # tok = AutoTokenizer.from_pretrained("apple/OpenELM-3B-Instruct", token=token, trust_remote_code=True)
38
+ tok = AutoTokenizer.from_pretrained(
39
+ "apple/OpenELM-3B-Instruct",
40
+ token=token,
41
+ trust_remote_code=True,
42
+ config=OpenELMConfig(),
43
+ )
44
 
45
  # ์ข…๋ฃŒ ํ† ํฐ ID ์„ค์ •
46
  terminators = [