Views
No views yet
.safetensors| T-lite-instruct-0.1 (llama 3.0 8B based) | gemma-2-9b-it | GigaChat-20B-A3B-instruct | |
|---|---|---|---|
| MERA | 0.335 | 0.392 | 0.513 |
| ru-MMLU 5-shot | 0.555 | 0.625 | 0.598 |
| Shlepa | 0.36 | 0.388 | 0.482 |
| GigaChat-20B-A3B-instruct | GigaChat-Pro v26.20 | GigaChat-Max v26.20 | |
|---|---|---|---|
| Математические задачи | |||
| GSM8K 5-shot | 0,763 | 0,782 | 0,929 |
| MATH 4-shot | 0,426 | 0,446 | 0,53 |
| Написание кода | |||
| HumanEval 0-shot | 0,329 | 0,439 | 0,64 |
| MBPP 0-shot | 0,385 | 0,487 | 0,667 |
| Общие знания | |||
| MMLU EN 5-shot | 0,648 | 0,687 | 0,804 |
| MMLU RU 5-shot Переведенные данные из MMLU EN 5-shot | 0,598 | 0,645 | 0,75 |
| MMLU RU 1-shot | — | 0,617 | 0,718 |
| MMLU PRO EN 5-shot | 0,348 | 0,431 | 0,589 |
| RUBQ 0-shot | 0,675 | 0,724 | 0,73 |
| WINOGRANDE 4-shot | 0,75 | 0,796 | 0,832 |
| CyberMetric 0-shot | 0,798 | 0,827 | 0,864 |
| Следование инструкциям | |||
| IFEval 0-shot | 0,411 | 0,566 | 0,721 |
transformers>=4.471import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
3
4model_name = "ai-sage/GigaChat-20B-A3B-instruct"
5tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
6model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True, torch_dtype=torch.bfloat16, device_map="auto")
7model.generation_config = GenerationConfig.from_pretrained(model_name)
8
9messages = [
10 {"role": "user", "content": "Докажи теорему о неподвижной точке"}
11]
12input_tensor = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
13outputs = model.generate(input_tensor.to(model.device))
14
15result = tokenizer.decode(outputs[0][input_tensor.shape[1]:], skip_special_tokens=False)
16print(result)1from transformers import AutoTokenizer
2from vllm import LLM, SamplingParams
3
4model_name = "ai-sage/GigaChat-20B-A3B-instruct"
5tokenizer = AutoTokenizer.from_pretrained(model_name)
6llm = LLM(model=model_name, trust_remote_code=True)
7sampling_params = SamplingParams(temperature=0.3, max_tokens=8192)
8
9messages_list = [
10 [{"role": "user", "content": "Докажи теорему о неподвижной точке"}],
11]
12
13prompt_token_ids = [tokenizer.apply_chat_template(messages, add_generation_prompt=True) for messages in messages_list]
14
15outputs = llm.generate(prompt_token_ids=prompt_token_ids, sampling_params=sampling_params)
16
17generated_text = [output.outputs[0].text for output in outputs]
18print(generated_text)1input_string = tokenizer.apply_chat_template(messages,tokenize=False, add_generation_prompt=True)
2input_tensor = tokenizer(input_string, return_tensors="pt")1vllm serve ai-sage/GigaChat-20B-A3B-instruct \
2 --disable-log-requests \
3 --trust_remote_code \
4 --dtype bfloat16 \
5 --max-seq-len 81921curl http://localhost:8000/v1/chat/completions \
2 -H "Content-Type: application/json" \
3 -d '{
4 "model": "ai-sage/GigaChat-20B-A3B-instruct" ,
5 "messages": [
6 {"role": "system", "content": "Ты ОЧЕНЬ умный математик"},
7 {"role": "user", "content": "Докажи теорему о неподвижной точке"}
8 ]
9 }'