Gaivoronsky / Mistral-7B-Saiga

huggingface.co
Total runs: 30
24-hour runs: 0
7-day runs: -1
30-day runs: 17
Model's Last Updated: October 16 2023
text-generation

Introduction of Mistral-7B-Saiga

Model Details of Mistral-7B-Saiga

This is a generative model converted to fp16 format based on IlyaGusev/saiga_mistral_7b_lora

Install vLLM:

pip install vllm

Start server:

python -u -m vllm.entrypoints.openai.api_server --host 0.0.0.0 --model Gaivoronsky/Mistral-7B-Saiga

Client:

import openai

openai.api_base = "http://localhost:8000/v1"
openai.api_key = "none"

DEFAULT_MESSAGE_TEMPLATE = "<s>{role}\n{content}</s>"
DEFAULT_RESPONSE_TEMPLATE = "<s>bot\n"
DEFAULT_SYSTEM_PROMPT = "Ты — Сайга, русскоязычный автоматический ассистент. Ты разговариваешь с людьми и помогаешь им."


class Conversation:
    def __init__(
        self,
        message_template=DEFAULT_MESSAGE_TEMPLATE,
        system_prompt=DEFAULT_SYSTEM_PROMPT,
        response_template=DEFAULT_RESPONSE_TEMPLATE
    ):
        self.message_template = message_template
        self.response_template = response_template
        self.messages = [{
            "role": "system",
            "content": system_prompt
        }]

    def add_user_message(self, message):
        self.messages.append({
            "role": "user",
            "content": message
        })

    def add_bot_message(self, message):
        self.messages.append({
            "role": "bot",
            "content": message
        })

    def get_prompt(self):
        final_text = ""
        for message in self.messages:
            message_text = self.message_template.format(**message)
            final_text += message_text
        final_text += DEFAULT_RESPONSE_TEMPLATE
        return final_text.strip()


query = "Сколько весит жираф?"
conversation = Conversation()
conversation.add_user_message(query)
prompt = conversation.get_prompt()

response = openai.ChatCompletion.create(
        model="Gaivoronsky/Mistral-7B-Saiga",
        messages=[{"role": "user", "content": prompt}],
        system=DEFAULT_SYSTEM_PROMPT,
        max_tokens=512,
        stop=['</s>']
)
response['choices'][0]['message']['content']

Runs of Gaivoronsky Mistral-7B-Saiga on huggingface.co

30
Total runs
0
24-hour runs
-2
3-day runs
-1
7-day runs
17
30-day runs

More Information About Mistral-7B-Saiga huggingface.co Model

More Mistral-7B-Saiga license Visit here:

https://choosealicense.com/licenses/cc-by-4.0

Mistral-7B-Saiga huggingface.co

Mistral-7B-Saiga huggingface.co is an AI model on huggingface.co that provides Mistral-7B-Saiga's model effect (), which can be used instantly with this Gaivoronsky Mistral-7B-Saiga model. huggingface.co supports a free trial of the Mistral-7B-Saiga model, and also provides paid use of the Mistral-7B-Saiga. Support call Mistral-7B-Saiga model through api, including Node.js, Python, http.

Gaivoronsky Mistral-7B-Saiga online free

Mistral-7B-Saiga huggingface.co is an online trial and call api platform, which integrates Mistral-7B-Saiga's modeling effects, including api services, and provides a free online trial of Mistral-7B-Saiga, you can try Mistral-7B-Saiga online for free by clicking the link below.

Gaivoronsky Mistral-7B-Saiga online free url in huggingface.co:

https://huggingface.co/Gaivoronsky/Mistral-7B-Saiga

Mistral-7B-Saiga install

Mistral-7B-Saiga is an open source model from GitHub that offers a free installation service, and any user can find Mistral-7B-Saiga on GitHub to install. At the same time, huggingface.co provides the effect of Mistral-7B-Saiga install, users can directly use Mistral-7B-Saiga installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

Mistral-7B-Saiga install url in huggingface.co:

https://huggingface.co/Gaivoronsky/Mistral-7B-Saiga

Url of Mistral-7B-Saiga

Mistral-7B-Saiga huggingface.co Url

Provider of Mistral-7B-Saiga huggingface.co

Gaivoronsky
ORGANIZATIONS

Other API from Gaivoronsky

huggingface.co

Total runs: 58
Run Growth: -44
Growth Rate: -122.22%
Updated:February 07 2023
huggingface.co

Total runs: 33
Run Growth: 16
Growth Rate: 55.17%
Updated:June 08 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:March 22 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated:May 17 2023