IlyaGusev / saiga_gemma2_9b

huggingface.co
Total runs: 54
24-hour runs: 0
7-day runs: 7
30-day runs: 26
Model's Last Updated: July 22 2024
text-generation

Introduction of saiga_gemma2_9b

Model Details of saiga_gemma2_9b

Saiga/Gemma2 9B, Russian Gemma-2-based chatbot

Based on Gemma-2 9B Instruct .

Prompt format

Gemma-2 prompt format:

<start_of_turn>system
Ты — Сайга, русскоязычный автоматический ассистент. Ты разговариваешь с людьми и помогаешь им.<end_of_turn>
<start_of_turn>user
Как дела?<end_of_turn>
<start_of_turn>model
Отлично, а у тебя?<end_of_turn>
<start_of_turn>user
Шикарно. Как пройти в библиотеку?<end_of_turn>
<start_of_turn>model
Code example
# Исключительно ознакомительный пример.
# НЕ НАДО ТАК ИНФЕРИТЬ МОДЕЛЬ В ПРОДЕ.
# См. https://github.com/vllm-project/vllm или https://github.com/huggingface/text-generation-inference

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig

MODEL_NAME = "IlyaGusev/saiga_gemma2_10b"

model = AutoModelForCausalLM.from_pretrained(
    MODEL_NAME,
    load_in_8bit=True,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)
model.eval()

tokenizer = AutoTokenizer.from_pretrained(MODEL_NAME)
generation_config = GenerationConfig.from_pretrained(MODEL_NAME)
print(generation_config)

inputs = ["Почему трава зеленая?", "Сочини длинный рассказ, обязательно упоминая следующие объекты. Дано: Таня, мяч"]
for query in inputs:
    prompt = tokenizer.apply_chat_template([{
        "role": "user",
        "content": query
    }], tokenize=False, add_generation_prompt=True)
    data = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
    data = {k: v.to(model.device) for k, v in data.items()}
    output_ids = model.generate(**data, generation_config=generation_config)[0]
    output_ids = output_ids[len(data["input_ids"][0]):]
    output = tokenizer.decode(output_ids, skip_special_tokens=True).strip()
    print(query)
    print(output)
    print()
    print("==============================")
    print()
Versions

v2:

v1:

Evaluation

Pivot: gemma_2_9b_it_abliterated

model length_controlled_winrate win_rate standard_error avg_length
gemma_2_9b_it_abliterated 50.00 50.00 0.00 1126
saiga_gemma2_9b, v1 48.66 45.54 2.45 1066
saiga_gemms2_9b, v2 47.77 45.30 2.45 1074

Runs of IlyaGusev saiga_gemma2_9b on huggingface.co

54
Total runs
0
24-hour runs
5
3-day runs
7
7-day runs
26
30-day runs

More Information About saiga_gemma2_9b huggingface.co Model

More saiga_gemma2_9b license Visit here:

https://choosealicense.com/licenses/gemma

saiga_gemma2_9b huggingface.co

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

saiga_gemma2_9b huggingface.co Url

https://huggingface.co/IlyaGusev/saiga_gemma2_9b

IlyaGusev saiga_gemma2_9b online free

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

IlyaGusev saiga_gemma2_9b online free url in huggingface.co:

https://huggingface.co/IlyaGusev/saiga_gemma2_9b

saiga_gemma2_9b install

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

saiga_gemma2_9b install url in huggingface.co:

https://huggingface.co/IlyaGusev/saiga_gemma2_9b

Url of saiga_gemma2_9b

saiga_gemma2_9b huggingface.co Url

Provider of saiga_gemma2_9b huggingface.co

IlyaGusev
ORGANIZATIONS

Other API from IlyaGusev