reformat config files
This commit is contained in:
parent
5e0476925b
commit
a938b67163
|
|
@ -117,5 +117,5 @@ text_splitter_dict = {
|
|||
# TEXT_SPLITTER 名称
|
||||
TEXT_SPLITTER_NAME = "ChineseRecursiveTextSplitter"
|
||||
|
||||
## Embedding模型定制词语的词表文件
|
||||
# Embedding模型定制词语的词表文件
|
||||
EMBEDDING_KEYWORD_FILE = "embedding_keywords.txt"
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
import os
|
||||
|
||||
|
||||
# 可以指定一个绝对路径,统一存放所有的Embedding和LLM模型。
|
||||
# 每个模型可以是一个单独的目录,也可以是某个目录下的二级子目录
|
||||
MODEL_ROOT_PATH = ""
|
||||
|
|
@ -45,55 +44,54 @@ MODEL_PATH = {
|
|||
"chatglm3-6b-32k": "THUDM/chatglm3-6b-32k",
|
||||
|
||||
"baichuan2-13b": "baichuan-inc/Baichuan2-13B-Chat",
|
||||
"baichuan2-7b":"baichuan-inc/Baichuan2-7B-Chat",
|
||||
"baichuan2-7b": "baichuan-inc/Baichuan2-7B-Chat",
|
||||
|
||||
"baichuan-7b": "baichuan-inc/Baichuan-7B",
|
||||
"baichuan-13b": "baichuan-inc/Baichuan-13B",
|
||||
'baichuan-13b-chat':'baichuan-inc/Baichuan-13B-Chat',
|
||||
'baichuan-13b-chat': 'baichuan-inc/Baichuan-13B-Chat',
|
||||
|
||||
"aquila-7b":"BAAI/Aquila-7B",
|
||||
"aquilachat-7b":"BAAI/AquilaChat-7B",
|
||||
"aquila-7b": "BAAI/Aquila-7B",
|
||||
"aquilachat-7b": "BAAI/AquilaChat-7B",
|
||||
|
||||
"internlm-7b":"internlm/internlm-7b",
|
||||
"internlm-chat-7b":"internlm/internlm-chat-7b",
|
||||
"internlm-7b": "internlm/internlm-7b",
|
||||
"internlm-chat-7b": "internlm/internlm-chat-7b",
|
||||
|
||||
"falcon-7b":"tiiuae/falcon-7b",
|
||||
"falcon-40b":"tiiuae/falcon-40b",
|
||||
"falcon-rw-7b":"tiiuae/falcon-rw-7b",
|
||||
"falcon-7b": "tiiuae/falcon-7b",
|
||||
"falcon-40b": "tiiuae/falcon-40b",
|
||||
"falcon-rw-7b": "tiiuae/falcon-rw-7b",
|
||||
|
||||
"gpt2":"gpt2",
|
||||
"gpt2-xl":"gpt2-xl",
|
||||
"gpt2": "gpt2",
|
||||
"gpt2-xl": "gpt2-xl",
|
||||
|
||||
"gpt-j-6b":"EleutherAI/gpt-j-6b",
|
||||
"gpt4all-j":"nomic-ai/gpt4all-j",
|
||||
"gpt-neox-20b":"EleutherAI/gpt-neox-20b",
|
||||
"pythia-12b":"EleutherAI/pythia-12b",
|
||||
"oasst-sft-4-pythia-12b-epoch-3.5":"OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5",
|
||||
"dolly-v2-12b":"databricks/dolly-v2-12b",
|
||||
"stablelm-tuned-alpha-7b":"stabilityai/stablelm-tuned-alpha-7b",
|
||||
"gpt-j-6b": "EleutherAI/gpt-j-6b",
|
||||
"gpt4all-j": "nomic-ai/gpt4all-j",
|
||||
"gpt-neox-20b": "EleutherAI/gpt-neox-20b",
|
||||
"pythia-12b": "EleutherAI/pythia-12b",
|
||||
"oasst-sft-4-pythia-12b-epoch-3.5": "OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5",
|
||||
"dolly-v2-12b": "databricks/dolly-v2-12b",
|
||||
"stablelm-tuned-alpha-7b": "stabilityai/stablelm-tuned-alpha-7b",
|
||||
|
||||
"Llama-2-13b-hf":"meta-llama/Llama-2-13b-hf",
|
||||
"Llama-2-70b-hf":"meta-llama/Llama-2-70b-hf",
|
||||
"open_llama_13b":"openlm-research/open_llama_13b",
|
||||
"vicuna-13b-v1.3":"lmsys/vicuna-13b-v1.3",
|
||||
"koala":"young-geng/koala",
|
||||
"Llama-2-13b-hf": "meta-llama/Llama-2-13b-hf",
|
||||
"Llama-2-70b-hf": "meta-llama/Llama-2-70b-hf",
|
||||
"open_llama_13b": "openlm-research/open_llama_13b",
|
||||
"vicuna-13b-v1.3": "lmsys/vicuna-13b-v1.3",
|
||||
"koala": "young-geng/koala",
|
||||
|
||||
"mpt-7b":"mosaicml/mpt-7b",
|
||||
"mpt-7b-storywriter":"mosaicml/mpt-7b-storywriter",
|
||||
"mpt-30b":"mosaicml/mpt-30b",
|
||||
"opt-66b":"facebook/opt-66b",
|
||||
"opt-iml-max-30b":"facebook/opt-iml-max-30b",
|
||||
"mpt-7b": "mosaicml/mpt-7b",
|
||||
"mpt-7b-storywriter": "mosaicml/mpt-7b-storywriter",
|
||||
"mpt-30b": "mosaicml/mpt-30b",
|
||||
"opt-66b": "facebook/opt-66b",
|
||||
"opt-iml-max-30b": "facebook/opt-iml-max-30b",
|
||||
|
||||
"Qwen-7B":"Qwen/Qwen-7B",
|
||||
"Qwen-14B":"Qwen/Qwen-14B",
|
||||
"Qwen-7B-Chat":"Qwen/Qwen-7B-Chat",
|
||||
"Qwen-14B-Chat":"Qwen/Qwen-14B-Chat",
|
||||
"Qwen-7B": "Qwen/Qwen-7B",
|
||||
"Qwen-14B": "Qwen/Qwen-14B",
|
||||
"Qwen-7B-Chat": "Qwen/Qwen-7B-Chat",
|
||||
"Qwen-14B-Chat": "Qwen/Qwen-14B-Chat",
|
||||
},
|
||||
}
|
||||
# 选用的 Embedding 名称
|
||||
EMBEDDING_MODEL = "m3e-base" # 可以尝试最新的嵌入式sota模型:bge-large-zh-v1.5
|
||||
|
||||
|
||||
# Embedding 模型运行设备。设为"auto"会自动检测,也可手动设定为"cuda","mps","cpu"其中之一。
|
||||
EMBEDDING_DEVICE = "auto"
|
||||
|
||||
|
|
@ -191,20 +189,18 @@ ONLINE_LLM_MODEL = {
|
|||
},
|
||||
}
|
||||
|
||||
|
||||
# 通常情况下不需要更改以下内容
|
||||
|
||||
# nltk 模型存储路径
|
||||
NLTK_DATA_PATH = os.path.join(os.path.dirname(os.path.dirname(__file__)), "nltk_data")
|
||||
|
||||
|
||||
VLLM_MODEL_DICT = {
|
||||
"aquila-7b":"BAAI/Aquila-7B",
|
||||
"aquilachat-7b":"BAAI/AquilaChat-7B",
|
||||
"aquila-7b": "BAAI/Aquila-7B",
|
||||
"aquilachat-7b": "BAAI/AquilaChat-7B",
|
||||
|
||||
"baichuan-7b": "baichuan-inc/Baichuan-7B",
|
||||
"baichuan-13b": "baichuan-inc/Baichuan-13B",
|
||||
'baichuan-13b-chat':'baichuan-inc/Baichuan-13B-Chat',
|
||||
'baichuan-13b-chat': 'baichuan-inc/Baichuan-13B-Chat',
|
||||
# 注意:bloom系列的tokenizer与model是分离的,因此虽然vllm支持,但与fschat框架不兼容
|
||||
# "bloom":"bigscience/bloom",
|
||||
# "bloomz":"bigscience/bloomz",
|
||||
|
|
@ -212,43 +208,43 @@ VLLM_MODEL_DICT = {
|
|||
# "bloomz-7b1":"bigscience/bloomz-7b1",
|
||||
# "bloomz-1b7":"bigscience/bloomz-1b7",
|
||||
|
||||
"internlm-7b":"internlm/internlm-7b",
|
||||
"internlm-chat-7b":"internlm/internlm-chat-7b",
|
||||
"falcon-7b":"tiiuae/falcon-7b",
|
||||
"falcon-40b":"tiiuae/falcon-40b",
|
||||
"falcon-rw-7b":"tiiuae/falcon-rw-7b",
|
||||
"gpt2":"gpt2",
|
||||
"gpt2-xl":"gpt2-xl",
|
||||
"gpt-j-6b":"EleutherAI/gpt-j-6b",
|
||||
"gpt4all-j":"nomic-ai/gpt4all-j",
|
||||
"gpt-neox-20b":"EleutherAI/gpt-neox-20b",
|
||||
"pythia-12b":"EleutherAI/pythia-12b",
|
||||
"oasst-sft-4-pythia-12b-epoch-3.5":"OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5",
|
||||
"dolly-v2-12b":"databricks/dolly-v2-12b",
|
||||
"stablelm-tuned-alpha-7b":"stabilityai/stablelm-tuned-alpha-7b",
|
||||
"Llama-2-13b-hf":"meta-llama/Llama-2-13b-hf",
|
||||
"Llama-2-70b-hf":"meta-llama/Llama-2-70b-hf",
|
||||
"open_llama_13b":"openlm-research/open_llama_13b",
|
||||
"vicuna-13b-v1.3":"lmsys/vicuna-13b-v1.3",
|
||||
"koala":"young-geng/koala",
|
||||
"mpt-7b":"mosaicml/mpt-7b",
|
||||
"mpt-7b-storywriter":"mosaicml/mpt-7b-storywriter",
|
||||
"mpt-30b":"mosaicml/mpt-30b",
|
||||
"opt-66b":"facebook/opt-66b",
|
||||
"opt-iml-max-30b":"facebook/opt-iml-max-30b",
|
||||
"internlm-7b": "internlm/internlm-7b",
|
||||
"internlm-chat-7b": "internlm/internlm-chat-7b",
|
||||
"falcon-7b": "tiiuae/falcon-7b",
|
||||
"falcon-40b": "tiiuae/falcon-40b",
|
||||
"falcon-rw-7b": "tiiuae/falcon-rw-7b",
|
||||
"gpt2": "gpt2",
|
||||
"gpt2-xl": "gpt2-xl",
|
||||
"gpt-j-6b": "EleutherAI/gpt-j-6b",
|
||||
"gpt4all-j": "nomic-ai/gpt4all-j",
|
||||
"gpt-neox-20b": "EleutherAI/gpt-neox-20b",
|
||||
"pythia-12b": "EleutherAI/pythia-12b",
|
||||
"oasst-sft-4-pythia-12b-epoch-3.5": "OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5",
|
||||
"dolly-v2-12b": "databricks/dolly-v2-12b",
|
||||
"stablelm-tuned-alpha-7b": "stabilityai/stablelm-tuned-alpha-7b",
|
||||
"Llama-2-13b-hf": "meta-llama/Llama-2-13b-hf",
|
||||
"Llama-2-70b-hf": "meta-llama/Llama-2-70b-hf",
|
||||
"open_llama_13b": "openlm-research/open_llama_13b",
|
||||
"vicuna-13b-v1.3": "lmsys/vicuna-13b-v1.3",
|
||||
"koala": "young-geng/koala",
|
||||
"mpt-7b": "mosaicml/mpt-7b",
|
||||
"mpt-7b-storywriter": "mosaicml/mpt-7b-storywriter",
|
||||
"mpt-30b": "mosaicml/mpt-30b",
|
||||
"opt-66b": "facebook/opt-66b",
|
||||
"opt-iml-max-30b": "facebook/opt-iml-max-30b",
|
||||
|
||||
"Qwen-7B":"Qwen/Qwen-7B",
|
||||
"Qwen-14B":"Qwen/Qwen-14B",
|
||||
"Qwen-7B-Chat":"Qwen/Qwen-7B-Chat",
|
||||
"Qwen-14B-Chat":"Qwen/Qwen-14B-Chat",
|
||||
"Qwen-7B": "Qwen/Qwen-7B",
|
||||
"Qwen-14B": "Qwen/Qwen-14B",
|
||||
"Qwen-7B-Chat": "Qwen/Qwen-7B-Chat",
|
||||
"Qwen-14B-Chat": "Qwen/Qwen-14B-Chat",
|
||||
|
||||
"agentlm-7b":"THUDM/agentlm-7b",
|
||||
"agentlm-13b":"THUDM/agentlm-13b",
|
||||
"agentlm-70b":"THUDM/agentlm-70b",
|
||||
"agentlm-7b": "THUDM/agentlm-7b",
|
||||
"agentlm-13b": "THUDM/agentlm-13b",
|
||||
"agentlm-70b": "THUDM/agentlm-70b",
|
||||
|
||||
}
|
||||
|
||||
## 你认为支持Agent能力的模型,可以在这里添加,添加后不会出现可视化界面的警告
|
||||
# 你认为支持Agent能力的模型,可以在这里添加,添加后不会出现可视化界面的警告
|
||||
SUPPORT_AGENT_MODEL = [
|
||||
"azure-api",
|
||||
"openai-api",
|
||||
|
|
|
|||
|
|
@ -17,13 +17,12 @@
|
|||
# - input: 用户输入内容
|
||||
# - agent_scratchpad: Agent的思维记录
|
||||
|
||||
PROMPT_TEMPLATES = {}
|
||||
|
||||
PROMPT_TEMPLATES["completion"] = {
|
||||
PROMPT_TEMPLATES = {
|
||||
"completion": {
|
||||
"default": "{input}"
|
||||
}
|
||||
},
|
||||
|
||||
PROMPT_TEMPLATES["llm_chat"] = {
|
||||
"llm_chat": {
|
||||
"default": "{{ input }}",
|
||||
|
||||
"py":
|
||||
|
|
@ -32,9 +31,9 @@ PROMPT_TEMPLATES["llm_chat"] = {
|
|||
{{ input }}
|
||||
"""
|
||||
,
|
||||
}
|
||||
},
|
||||
|
||||
PROMPT_TEMPLATES["knowledge_base_chat"] = {
|
||||
"knowledge_base_chat": {
|
||||
"default":
|
||||
"""
|
||||
<指令>根据已知信息,简洁和专业的来回答问题。如果无法从中得到答案,请说 “根据已知信息无法回答该问题”,不允许在答案中添加编造成分,答案请使用中文。 </指令>
|
||||
|
|
@ -52,8 +51,9 @@ PROMPT_TEMPLATES["knowledge_base_chat"] = {
|
|||
<指令>请根据用户的问题,进行简洁明了的回答</指令>
|
||||
<问题>{{ question }}</问题>
|
||||
""",
|
||||
}
|
||||
PROMPT_TEMPLATES["search_engine_chat"] = {
|
||||
},
|
||||
|
||||
"search_engine_chat": {
|
||||
"default":
|
||||
"""
|
||||
<指令>这是我搜索到的互联网信息,请你根据这些信息进行提取并有调理,简洁的回答问题。如果无法从中得到答案,请说 “无法搜索到能回答问题的内容”。 </指令>
|
||||
|
|
@ -71,8 +71,9 @@ PROMPT_TEMPLATES["search_engine_chat"] = {
|
|||
<指令>请根据用户的问题,进行简洁明了的回答</指令>
|
||||
<问题>{{ question }}</问题>
|
||||
""",
|
||||
}
|
||||
PROMPT_TEMPLATES["agent_chat"] = {
|
||||
},
|
||||
|
||||
"agent_chat": {
|
||||
"default":
|
||||
"""
|
||||
Answer the following questions as best you can. If it is in order, you can use some tools appropriately.You have access to the following tools:
|
||||
|
|
@ -99,6 +100,7 @@ PROMPT_TEMPLATES["agent_chat"] = {
|
|||
Question: {input}
|
||||
Thought: {agent_scratchpad}
|
||||
""",
|
||||
|
||||
"AgentLM":
|
||||
"""
|
||||
<SYS>>\n
|
||||
|
|
@ -125,6 +127,7 @@ PROMPT_TEMPLATES["agent_chat"] = {
|
|||
Thought: {agent_scratchpad}
|
||||
|
||||
""",
|
||||
|
||||
"中文版本":
|
||||
"""
|
||||
你的知识不一定正确,所以你一定要用提供的工具来思考,并给出用户答案。
|
||||
|
|
@ -151,4 +154,5 @@ PROMPT_TEMPLATES["agent_chat"] = {
|
|||
Question: {input}
|
||||
Thought: {agent_scratchpad}
|
||||
""",
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue