Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -8,20 +8,18 @@ import time
|
|
8 |
import sys
|
9 |
|
10 |
os.system("pip install --upgrade pip")
|
11 |
-
os.system('''CMAKE_ARGS="-DLLAMA_AVX512=ON -DLLAMA_AVX512_VBMI=ON -DLLAMA_AVX512_VNNI=ON -DLLAMA_FP16_VA=ON" pip install llama-cpp-python
|
12 |
|
13 |
from huggingface_hub import snapshot_download
|
14 |
from llama_cpp import Llama
|
15 |
|
16 |
|
17 |
-
SYSTEM_PROMPT = '''You are
|
18 |
-
You are good at speaking English and Chinese.
|
19 |
You are talking to a human User. If the question is meaningless, please explain the reason and don't share false information.
|
20 |
-
You are based on SEA model, trained by "SSFW NLPark" team, not related to GPT, LLaMA, Meta, Mistral or OpenAI.
|
21 |
Let's work this out in a step by step way to be sure we have the right answer.\n\n'''
|
22 |
SYSTEM_TOKEN = 1587
|
23 |
-
USER_TOKEN =
|
24 |
-
BOT_TOKEN =
|
25 |
LINEBREAK_TOKEN = 13
|
26 |
|
27 |
|
@@ -45,8 +43,8 @@ def get_system_tokens(model):
|
|
45 |
return get_message_tokens(model, **system_message)
|
46 |
|
47 |
|
48 |
-
repo_name = "TheBloke/
|
49 |
-
model_name = "
|
50 |
|
51 |
snapshot_download(repo_id=repo_name, local_dir=".", allow_patterns=model_name)
|
52 |
|
@@ -105,9 +103,8 @@ def bot(
|
|
105 |
with gr.Blocks(
|
106 |
theme=gr.themes.Soft()
|
107 |
) as demo:
|
108 |
-
gr.Markdown(f"""<h1><center
|
109 |
-
gr.Markdown(value="""
|
110 |
-
这是量化版兮辞·析辞的部署,在 CPU 上运行。
|
111 |
SLIDE 是一种会话语言模型,在多种类型的语料库上进行训练。
|
112 |
本节目由上海师范大学附属外国语中学 NLPark 赞助播出""")
|
113 |
|
|
|
8 |
import sys
|
9 |
|
10 |
os.system("pip install --upgrade pip")
|
11 |
+
os.system('''CMAKE_ARGS="-DLLAMA_AVX512=ON -DLLAMA_AVX512_VBMI=ON -DLLAMA_AVX512_VNNI=ON -DLLAMA_FP16_VA=ON" pip install llama-cpp-python''')
|
12 |
|
13 |
from huggingface_hub import snapshot_download
|
14 |
from llama_cpp import Llama
|
15 |
|
16 |
|
17 |
+
SYSTEM_PROMPT = '''You are an AI programming assistant named "Shi-Ci" in English or "兮辞" in Chinese, utilizing the SEA Coder model, developed by "SSFW NLPark" team, and you only answer questions related to computer science.
|
|
|
18 |
You are talking to a human User. If the question is meaningless, please explain the reason and don't share false information.
|
|
|
19 |
Let's work this out in a step by step way to be sure we have the right answer.\n\n'''
|
20 |
SYSTEM_TOKEN = 1587
|
21 |
+
USER_TOKEN = 16384
|
22 |
+
BOT_TOKEN = 16384
|
23 |
LINEBREAK_TOKEN = 13
|
24 |
|
25 |
|
|
|
43 |
return get_message_tokens(model, **system_message)
|
44 |
|
45 |
|
46 |
+
repo_name = "TheBloke/deepseek-coder-6.7B-instruct-GGUF"
|
47 |
+
model_name = "deepseek-coder-6.7b-instruct.Q5_K_M.gguf"
|
48 |
|
49 |
snapshot_download(repo_id=repo_name, local_dir=".", allow_patterns=model_name)
|
50 |
|
|
|
103 |
with gr.Blocks(
|
104 |
theme=gr.themes.Soft()
|
105 |
) as demo:
|
106 |
+
gr.Markdown(f"""<h1><center>上师附外-兮辞·析辞-AI编程协理</center></h1>""")
|
107 |
+
gr.Markdown(value="""这儿是一个中文模型的试部署。
|
|
|
108 |
SLIDE 是一种会话语言模型,在多种类型的语料库上进行训练。
|
109 |
本节目由上海师范大学附属外国语中学 NLPark 赞助播出""")
|
110 |
|