JUNGU commited on
Commit
52fa8dc
โ€ข
1 Parent(s): 2c2ec7f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -11,9 +11,12 @@ import spaces
11
  import time
12
  import subprocess
13
 
14
- # from transformers_modules.apple.OpenELM-3B-Instruct.d3c76da586450c73898e6bed70cecf3376300fb3.configuration_openelm import OpenELMConfig
15
 
16
  from transformers_modules.apple.OpenELM_3B_Instruct.d3c76da586450c73898e6bed70cecf3376300fb3.configuration_openelm import OpenELMConfig
 
 
 
17
 
18
 
19
  # flash-attn ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜. CUDA ๋นŒ๋“œ๋Š” ๊ฑด๋„ˆ๋œ€.
@@ -30,14 +33,14 @@ token = os.environ["HF_TOKEN"]
30
  # beomi/Llama-3-KoEn-8B-Instruct-preview ๋ชจ๋ธ๊ณผ ํ† ํฌ๋‚˜์ด์ € ๊ฐ™์ด ๋กœ๋“œ
31
  model = AutoModelForCausalLM.from_pretrained(
32
  # "microsoft/Phi-3-mini-128k-instruct",
33
- "apple/OpenELM-3B-Instruct",
34
  token=token,
35
  trust_remote_code=True,
36
  )
37
  # bug fix
38
  # tok = AutoTokenizer.from_pretrained("apple/OpenELM-3B-Instruct", token=token, trust_remote_code=True)
39
  tok = AutoTokenizer.from_pretrained(
40
- "apple/OpenELM-3B-Instruct",
41
  token=token,
42
  trust_remote_code=True,
43
  config=OpenELMConfig(),
 
11
  import time
12
  import subprocess
13
 
14
+ from transformers_modules.apple.OpenELM-3B-Instruct.d3c76da586450c73898e6bed70cecf3376300fb3.configuration_openelm import OpenELMConfig
15
 
16
  from transformers_modules.apple.OpenELM_3B_Instruct.d3c76da586450c73898e6bed70cecf3376300fb3.configuration_openelm import OpenELMConfig
17
+ from transformers import AutoConfig, AutoTokenizer
18
+
19
+ config = AutoConfig.from_pretrained("apple/OpenELM-270M", trust_remote_code=True)
20
 
21
 
22
  # flash-attn ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ ์„ค์น˜. CUDA ๋นŒ๋“œ๋Š” ๊ฑด๋„ˆ๋œ€.
 
33
  # beomi/Llama-3-KoEn-8B-Instruct-preview ๋ชจ๋ธ๊ณผ ํ† ํฌ๋‚˜์ด์ € ๊ฐ™์ด ๋กœ๋“œ
34
  model = AutoModelForCausalLM.from_pretrained(
35
  # "microsoft/Phi-3-mini-128k-instruct",
36
+ "apple/OpenELM-270M",
37
  token=token,
38
  trust_remote_code=True,
39
  )
40
  # bug fix
41
  # tok = AutoTokenizer.from_pretrained("apple/OpenELM-3B-Instruct", token=token, trust_remote_code=True)
42
  tok = AutoTokenizer.from_pretrained(
43
+ "apple/OpenELM-270M",
44
  token=token,
45
  trust_remote_code=True,
46
  config=OpenELMConfig(),