Spaces:
Runtime error
Runtime error
picocreator
commited on
Commit
•
bb4f12e
1
Parent(s):
cc76ff6
Update app.py
Browse files
app.py
CHANGED
@@ -6,14 +6,14 @@ from pynvml import *
|
|
6 |
nvmlInit()
|
7 |
gpu_h = nvmlDeviceGetHandleByIndex(0)
|
8 |
ctx_limit = 3000
|
9 |
-
title = "
|
10 |
|
11 |
os.environ["RWKV_JIT_ON"] = '1'
|
12 |
os.environ["RWKV_CUDA_ON"] = '1' # if '1' then use CUDA kernel for seq mode (much faster)
|
13 |
|
14 |
from rwkv.model import RWKV
|
15 |
-
model_path = hf_hub_download(repo_id="
|
16 |
-
model = RWKV(model=model_path, strategy='cuda
|
17 |
from rwkv.utils import PIPELINE, PIPELINE_ARGS
|
18 |
pipeline = PIPELINE(model, "rwkv_vocab_v20230424")
|
19 |
|
@@ -27,13 +27,13 @@ def generate_prompt(instruction, input=""):
|
|
27 |
|
28 |
### Response:"""
|
29 |
else:
|
30 |
-
return f"""
|
31 |
|
32 |
-
|
33 |
|
34 |
-
|
35 |
|
36 |
-
|
37 |
|
38 |
def evaluate(
|
39 |
ctx,
|
|
|
6 |
nvmlInit()
|
7 |
gpu_h = nvmlDeviceGetHandleByIndex(0)
|
8 |
ctx_limit = 3000
|
9 |
+
title = "EagleX 1.7T Demo"
|
10 |
|
11 |
os.environ["RWKV_JIT_ON"] = '1'
|
12 |
os.environ["RWKV_CUDA_ON"] = '1' # if '1' then use CUDA kernel for seq mode (much faster)
|
13 |
|
14 |
from rwkv.model import RWKV
|
15 |
+
model_path = hf_hub_download(repo_id="recursal/EagleX_1-7T", filename="EagleX-1_7T.pth")
|
16 |
+
model = RWKV(model=model_path, strategy='cuda bf16')
|
17 |
from rwkv.utils import PIPELINE, PIPELINE_ARGS
|
18 |
pipeline = PIPELINE(model, "rwkv_vocab_v20230424")
|
19 |
|
|
|
27 |
|
28 |
### Response:"""
|
29 |
else:
|
30 |
+
return f"""User: hi
|
31 |
|
32 |
+
Assistant: Hi. I am your assistant and I will provide expert full response in full details. Please feel free to ask any question and I will always answer it.
|
33 |
|
34 |
+
User: {instruction}
|
35 |
|
36 |
+
Assistant:"""
|
37 |
|
38 |
def evaluate(
|
39 |
ctx,
|