update cli_demo.py
This commit is contained in:
parent
a6184b01be
commit
eabef0415b
|
|
@ -1,5 +1,4 @@
|
||||||
from configs.model_config import *
|
from configs.model_config import *
|
||||||
import datetime
|
|
||||||
from chains.local_doc_qa import LocalDocQA
|
from chains.local_doc_qa import LocalDocQA
|
||||||
|
|
||||||
# return top-k text chunk from vector store
|
# return top-k text chunk from vector store
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,10 @@ embedding_model_dict = {
|
||||||
"ernie-tiny": "nghuyong/ernie-3.0-nano-zh",
|
"ernie-tiny": "nghuyong/ernie-3.0-nano-zh",
|
||||||
"ernie-base": "nghuyong/ernie-3.0-base-zh",
|
"ernie-base": "nghuyong/ernie-3.0-base-zh",
|
||||||
"text2vec": "GanymedeNil/text2vec-large-chinese",
|
"text2vec": "GanymedeNil/text2vec-large-chinese",
|
||||||
"local": "/Users/liuqian/Downloads/ChatGLM-6B/text2vec-large-chinese"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Embedding model name
|
# Embedding model name
|
||||||
EMBEDDING_MODEL = "local"#"text2vec"
|
EMBEDDING_MODEL = "text2vec"
|
||||||
|
|
||||||
# Embedding running device
|
# Embedding running device
|
||||||
EMBEDDING_DEVICE = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
EMBEDDING_DEVICE = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
||||||
|
|
@ -20,11 +19,10 @@ llm_model_dict = {
|
||||||
"chatglm-6b-int4-qe": "THUDM/chatglm-6b-int4-qe",
|
"chatglm-6b-int4-qe": "THUDM/chatglm-6b-int4-qe",
|
||||||
"chatglm-6b-int4": "THUDM/chatglm-6b-int4",
|
"chatglm-6b-int4": "THUDM/chatglm-6b-int4",
|
||||||
"chatglm-6b": "THUDM/chatglm-6b",
|
"chatglm-6b": "THUDM/chatglm-6b",
|
||||||
"local": "/Users/liuqian/Downloads/ChatGLM-6B/chatglm-6b"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# LLM model name
|
# LLM model name
|
||||||
LLM_MODEL = "local"#"chatglm-6b"
|
LLM_MODEL = "chatglm-6b"
|
||||||
|
|
||||||
# LLM running device
|
# LLM running device
|
||||||
LLM_DEVICE = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
LLM_DEVICE = "cuda" if torch.cuda.is_available() else "mps" if torch.backends.mps.is_available() else "cpu"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue