Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,9 +11,12 @@ import spaces
|
|
| 11 |
import time
|
| 12 |
import subprocess
|
| 13 |
|
| 14 |
-
|
| 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-
|
| 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-
|
| 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(),
|