Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 = [
|