Spaces:
Running
Running
AlexWortega
commited on
Commit
•
94d051b
1
Parent(s):
65c32ca
Update app.py
Browse files
app.py
CHANGED
@@ -6,7 +6,7 @@ from huggingface_hub.file_download import http_get
|
|
6 |
from llama_cpp import Llama
|
7 |
|
8 |
|
9 |
-
SYSTEM_PROMPT = "Ты —
|
10 |
|
11 |
|
12 |
def get_message_tokens(model, role, content):
|
@@ -22,11 +22,11 @@ def get_system_tokens(model):
|
|
22 |
|
23 |
def load_model(
|
24 |
directory: str = ".",
|
25 |
-
model_name: str = "
|
26 |
-
model_url: str = "https://huggingface.co/
|
27 |
):
|
28 |
final_model_path = os.path.join(directory, model_name)
|
29 |
-
|
30 |
print("Downloading all files...")
|
31 |
if not os.path.exists(final_model_path):
|
32 |
with open(final_model_path, "wb") as f:
|
@@ -95,11 +95,11 @@ with gr.Blocks(
|
|
95 |
) as demo:
|
96 |
favicon = '<img src="https://cdn.midjourney.com/b88e5beb-6324-4820-8504-a1a37a9ba36d/0_1.png" width="48px" style="display: inline">'
|
97 |
gr.Markdown(
|
98 |
-
f"""<h1><center>{favicon}
|
99 |
|
100 |
-
This is a demo of a **Russian**-speaking
|
101 |
|
102 |
-
Это демонстрационная версия [квантованной
|
103 |
|
104 |
Сайга-2 — это разговорная языковая модель, которая основана на [LLaMA-2](https://ai.meta.com/llama/) и дообучена на корпусах, сгенерированных ChatGPT, таких как [ru_turbo_alpaca](https://huggingface.co/datasets/IlyaGusev/ru_turbo_alpaca), [ru_turbo_saiga](https://huggingface.co/datasets/IlyaGusev/ru_turbo_saiga) и [gpt_roleplay_realm](https://huggingface.co/datasets/IlyaGusev/gpt_roleplay_realm).
|
105 |
"""
|
|
|
6 |
from llama_cpp import Llama
|
7 |
|
8 |
|
9 |
+
SYSTEM_PROMPT = "Ты — Вихрь, русскоязычный автоматический ассистент. Ты разговариваешь с людьми и помогаешь им."
|
10 |
|
11 |
|
12 |
def get_message_tokens(model, role, content):
|
|
|
22 |
|
23 |
def load_model(
|
24 |
directory: str = ".",
|
25 |
+
model_name: str = "vikhr-7b-instruct_0.2.Q4_K_S.gguf",
|
26 |
+
model_url: str = "https://huggingface.co/pirbis/Vikhr-7B-instruct_0.2-GGUF/blob/main/vikhr-7b-instruct_0.2.Q4_K_S.gguf"
|
27 |
):
|
28 |
final_model_path = os.path.join(directory, model_name)
|
29 |
+
#pirbis/Vikhr-7B-instruct_0.2-GGUF
|
30 |
print("Downloading all files...")
|
31 |
if not os.path.exists(final_model_path):
|
32 |
with open(final_model_path, "wb") as f:
|
|
|
95 |
) as demo:
|
96 |
favicon = '<img src="https://cdn.midjourney.com/b88e5beb-6324-4820-8504-a1a37a9ba36d/0_1.png" width="48px" style="display: inline">'
|
97 |
gr.Markdown(
|
98 |
+
f"""<h1><center>{favicon}Vikhr Instruct2 GGUF Q4_K</center></h1>
|
99 |
|
100 |
+
This is a demo of a **Russian**-speaking Mistrak-based model. If you are interested in other languages, please check other models, such as [MPT-7B-Chat](https://huggingface.co/spaces/mosaicml/mpt-7b-chat).
|
101 |
|
102 |
+
Это демонстрационная версия [квантованной Вихрь-0.2 с 7 миллиардами параметров](https://huggingface.co/pirbis/Vikhr-7B-instruct_0.2-GGUF/), работающая на CPU.
|
103 |
|
104 |
Сайга-2 — это разговорная языковая модель, которая основана на [LLaMA-2](https://ai.meta.com/llama/) и дообучена на корпусах, сгенерированных ChatGPT, таких как [ru_turbo_alpaca](https://huggingface.co/datasets/IlyaGusev/ru_turbo_alpaca), [ru_turbo_saiga](https://huggingface.co/datasets/IlyaGusev/ru_turbo_saiga) и [gpt_roleplay_realm](https://huggingface.co/datasets/IlyaGusev/gpt_roleplay_realm).
|
105 |
"""
|