Cran-May commited on
Commit
a6b8aca
·
1 Parent(s): 666c5b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -11
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==0.2.13''')
12
 
13
  from huggingface_hub import snapshot_download
14
  from llama_cpp import Llama
15
 
16
 
17
- SYSTEM_PROMPT = '''You are a helpful, respectful and honest INTP-T AI Assistant named "Shi-Ci" in English or "兮辞" in Chinese.
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 = 2188
24
- BOT_TOKEN = 12435
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/openbuddy-zephyr-7B-v14.1-GGUF"
49
- model_name = "openbuddy-zephyr-7b-v14.1.Q4_K_M.gguf"
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>上师附外-兮辞·析辞-人工智能助理</center></h1>""")
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