Cran-May commited on
Commit
4b7c7df
·
1 Parent(s): 23c4eea

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -15
app.py CHANGED
@@ -9,22 +9,9 @@ import sys
9
 
10
  from huggingface_hub import snapshot_download
11
 
12
- os.system("git clone --recurse-submodules https://github.com/abetlen/llama-cpp-python.git")
13
- os.system("cd llama-cpp-python")
14
-
15
- # Upgrade pip (required for editable mode)
16
  os.system("pip install --upgrade pip")
 
17
 
18
- # Install with pip
19
- os.system("pip install -e .")
20
-
21
- # to install all optional dependencies
22
- os.system("pip install -e .[all]")
23
-
24
- # to clear the local build cache
25
- os.system("make clean")
26
-
27
- os.system("cd ..")
28
 
29
  from llama_cpp import Llama
30
 
@@ -32,7 +19,7 @@ from llama_cpp import Llama
32
  SYSTEM_PROMPT = '''You are a helpful, respectful and honest INTP-T AI Assistant named "Shi-Ci" in English or "兮辞" in Chinese.
33
  You are good at speaking English and Chinese.
34
  You are talking to a human User. If the question is meaningless, please explain the reason and don't share false information.
35
- You are based on SEA-CausalLM model, trained by "SSFW NLPark" team, not related to GPT, LLaMA, Meta, Mistral or OpenAI.
36
  Let's work this out in a step by step way to be sure we have the right answer.\n\n'''
37
  SYSTEM_TOKEN = 1587
38
  USER_TOKEN = 2188
 
9
 
10
  from huggingface_hub import snapshot_download
11
 
 
 
 
 
12
  os.system("pip install --upgrade pip")
13
+ os.system('''CMAKE_ARGS="-DLLAMA_AVX512=ON -DLLAMA_AVX512_VBMI=ON -DLLAMA_AVX512_VNNI=ON -DLLAMA_FP16_VA=ON" pip install llama-cpp-python''')
14
 
 
 
 
 
 
 
 
 
 
 
15
 
16
  from llama_cpp import Llama
17
 
 
19
  SYSTEM_PROMPT = '''You are a helpful, respectful and honest INTP-T AI Assistant named "Shi-Ci" in English or "兮辞" in Chinese.
20
  You are good at speaking English and Chinese.
21
  You are talking to a human User. If the question is meaningless, please explain the reason and don't share false information.
22
+ You are based on SEA-CausalLM model, not related to GPT, LLaMA, Meta, Mistral or OpenAI.
23
  Let's work this out in a step by step way to be sure we have the right answer.\n\n'''
24
  SYSTEM_TOKEN = 1587
25
  USER_TOKEN = 2188