Update model.py
Browse files
model.py
CHANGED
|
@@ -3,14 +3,14 @@ from typing import Iterator
|
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
-
model_id = '
|
| 7 |
|
| 8 |
from huggingface_hub import snapshot_download,hf_hub_download
|
| 9 |
|
| 10 |
-
hf_hub_download(model_id, local_dir="./", filename="
|
| 11 |
hf_hub_download(repo_id="baichuan-inc/Baichuan-13B-Chat",local_dir="./", filename="tokenizer.model")
|
| 12 |
from llama_cpp import Llama
|
| 13 |
-
llm = Llama(model_path="./
|
| 14 |
|
| 15 |
def run(message: str,
|
| 16 |
chat_history: list[tuple[str, str]],
|
|
|
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
+
model_id = 'shaowenchen/baichuan2-7b-chat-gguf'
|
| 7 |
|
| 8 |
from huggingface_hub import snapshot_download,hf_hub_download
|
| 9 |
|
| 10 |
+
hf_hub_download(model_id, local_dir="./", filename="baichuan2-7b-chat.Q4_K.gguf")
|
| 11 |
hf_hub_download(repo_id="baichuan-inc/Baichuan-13B-Chat",local_dir="./", filename="tokenizer.model")
|
| 12 |
from llama_cpp import Llama
|
| 13 |
+
llm = Llama(model_path="./baichuan2-7b-chat.Q4_K.gguf", n_ctx=4096,seed=-1)
|
| 14 |
|
| 15 |
def run(message: str,
|
| 16 |
chat_history: list[tuple[str, str]],
|