Downloads · 30 days
487
6% of all-time downloads
Gen2B/Irbis-7b-v0.1
Irbis-7b-v0.1 is a text generation model from Gen2B. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
Downloads · 30 days
487
6% of all-time downloads
All-time downloads
7.7K
Public
Parameters
7.5B
15 GB on disk
Likes
16
Public
Click a slice to open those files.
.safetensors14.9 GB · 100%
From the Hugging Face model README
Irbis-7B - это языковая модель на основе архитектуры трансформеров, адаптированная для казахского языка.
В результате модель показывает значительно лучшее качество работы с казахским языком по сравнению с прочими моделями из открытых источников. За счет нового токенизатора увеличилась скорость генерации текста в 3-4 раза, также оптимизировалось заполнение контекстного окна.
Подробнее можно почитать в статье.
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
import torch
model_name = "Gen2B/Irbis-7b-v0.1"
model = AutoModelForCausalLM.from_pretrained(
model_name,
return_dict=True,
torch_dtype=torch.float16,
device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_name)
prompt = "Сұрақ: Шөп неге жасыл?\nЖауап: "
input_ids = tokenizer([prompt], return_tensors = "pt")["input_ids"].to("cuda")
generation_config = GenerationConfig(
temperature=0.6,
repetition_penalty=1.15
)
print("Generating...")
generation_output = model.generate(
input_ids=input_ids,
generation_config=generation_config,
return_dict_in_generate=True,
output_scores=True,
max_new_tokens=2048,
pad_token_id=tokenizer.eos_token_id,
)
for s in generation_output.sequences:
print(tokenizer.decode(s)) # Өсімдіктер ауасыз өмір сүре алмайды, сондықтан олар жасыл түсті болады.