Downloads · 30 days
534
4% of all-time downloads
ai-sage/GigaChat-20B-A3B-instruct-v1.5-bf16
GigaChat-20B-A3B-instruct-v1.5-bf16 is a machine learning model from ai-sage. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Диалоговая модель из семейства моделей GigaChat, основная на ai-sage/GigaChat-20B-A3B-instruct-v1.5. Поддерживает контекст в 131 тысячу токенов.
Downloads · 30 days
534
4% of all-time downloads
All-time downloads
15.2K
Public
Repo size
82.4 GB
Likes
6
Public
Click a slice to open those files.
.bin41.2 GB · 100%
From the Hugging Face model README
Диалоговая модель из семейства моделей GigaChat, основная на ai-sage/GigaChat-20B-A3B-instruct-v1.5. Поддерживает контекст в 131 тысячу токенов.
Представляем обновленную версию с улучшенным alignment, что привело к значительному росту метрик арен:
Больше подробностей в хабр статье и в карточке оригинальной instruct модели.
Для данной модели также доступны веса в fp32 и int8
А также:
pip install --upgrade transformers torch accelerate bitsandbytes
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
model_name = "ai-sage/GigaChat-20B-A3B-instruct-bf16"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True, device_map="auto", torch_dtype=torch.bfloat16)
model.generation_config = GenerationConfig.from_pretrained(model_name)
messages = [
{"role": "user", "content": "Докажи теорему о неподвижной точке"}
]
input_tensor = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
outputs = model.generate(input_tensor.to(model.device))
result = tokenizer.decode(outputs[0][input_tensor.shape[1]:], skip_special_tokens=False)
print(result)