File size: 6,411 Bytes
41fcbcc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130

---
library_name: transformers
model_name: QVikhr-3-8B-Instruction
base_model:
- Qwen/Qwen3-8B
language:
- ru
- en
license: apache-2.0
datasets:
- Vikhrmodels/GrandMaster2
---

# QVikhr-3-8B-Instruction

Инструктивная модель на основе **Qwen/Qwen3-8B**, обученная на русскоязычном датасете **GrandMaster2**. Создана для высокоэффективной обработки текстов на русском и английском языках, обеспечивая точные ответы и быстрое выполнение задач.

## Quantized variants:

- GGUF [Vikhrmodels/QVikhr-3-8B-Instruction-GGUF](https://huggingface.co/Vikhrmodels/QVikhr-3-8B-Instruction-GGUF)
- MLX
  - 4 bit [Vikhrmodels/QVikhr-3-8B-Instruction-MLX_4bit](https://huggingface.co/Vikhrmodels/QVikhr-3-8B-Instruction-MLX_4bit)
  - 8 bit [Vikhrmodels/QVikhr-3-8B-Instruction-MLX_8bit](https://huggingface.co/Vikhrmodels/QVikhr-3-8B-Instruction-MLX_8bit)

## Особенности:

- 📚 Основа / Base: [Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B)
- 🇷🇺 Специализация / Specialization: **RU**
- 💾 Датасет / Dataset: [GrandMaster2](https://huggingface.co/datasets/Vikhrmodels/GrandMaster2)
- 🌍 Поддержка / Support: **Bilingual RU/EN**

## Попробовать:

[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1DvostFGC_7jnziSUaZ0gJnADhOi5lrSD?usp=sharing)

## DOoM

| model                                    | score | math_score    |physics_score |
|------------------------------------------|-------|-----------|--------------|
| gpt-4.1  |0.466   |0.584  |0.347         |
| QVikhr-3-8B-Instruction  |0.445   |0.563  |0.327        |
| Qwen3-8B  |0.417   |0.538  |0.296          |
| Gemma 3 27B  |0.4   |0.474  |0.327          |

## Описание / Description:

**QVikhr-3-8B-Instruction** — мощная языковая модель, обученная на датасете **GrandMaster-2**, поддерживает генерацию инструкций, контекстные ответы и анализ текста на русском языке. Эта модель оптимизирована для задач инструктивного обучения и обработки текстов. Она подходит для использования в профессиональной среде, а также для интеграции в пользовательские приложения и сервисы.

Модель построена на базе архитектуры [Qwen/Qwen3-8B](https://huggingface.co/Qwen/Qwen3-8B) и была дообучена на большом русскоязычном датасете [GrandMaster2](https://huggingface.co/datasets/Vikhrmodels/GrandMaster2). Такое специализированное обучение значительно улучшило её способность генерировать точные, контекстно-зависимые ответы и быстро выполнять задачи на русском языке.

Тесты производительности подтверждают значительные улучшения модели. В рейтинге «DOoM» QVikhr-3-8B-Instruction получила оценку 0.445, что существенно превосходит результат базовой модели Qwen3-8B, и приближается к модели gpt-4.1. Это доказывает её превосходные возможности для решения задач связанные с математикой и физикой на русском языке. 


## Обучение:

**QVikhr-3-8B-Instruction** была создана с использованием метода SFT (Supervised Fine-Tuning). Мы использовали синтетический датасет **GrandMaster-2**.


## Пример кода для запуска:

**Рекомендуемая температура для генерации: 0.3**.

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load the model and tokenizer
model_name = "Vikhrmodels/QVikhr-3-8B-Instruction"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

# Prepare the input text
input_text = "Напиши краткое описание книги Гарри Поттер."

messages = [
    {"role": "user", "content": input_text},
]

# Tokenize and generate text
input_ids = tokenizer.apply_chat_template(messages, truncation=True, add_generation_prompt=True, return_tensors="pt")
output = model.generate(
    input_ids,
    max_length=4096,
    temperature=0.3,
    num_return_sequences=1,
    no_repeat_ngram_size=2,
    top_k=50,
    top_p=0.95,
)

# Decode and print result
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)
````

### Авторы

  - Sergei Bratchikov, [NLP Wanderer](https://t.me/nlpwanderer), [Vikhr Team](https://t.me/vikhrlabs)
  - Nikolay Kompanets, [LakoMoor](https://t.me/lakomoordev), [Vikhr Team](https://t.me/vikhrlabs)
  - Konstantin Korolev, [Vikhr Team](https://t.me/vikhrlabs)
  - Aleksandr Nikolich, [Vikhr Team](https://t.me/vikhrlabs)

### Ссылки

[Vikhr](https://vikhr.org)
[Vikhr Telegram](https://t.me/vikhrlabs)
[Донаты](https://www.tbank.ru/cf/3W1Ko1rj8ah)

### Как цитировать

```bibtex
@inproceedings{nikolich2024vikhr,
  title={Vikhr: Advancing Open-Source Bilingual Instruction-Following Large Language Models for Russian and English},
  author={Aleksandr Nikolich and Konstantin Korolev and Sergei Bratchikov and Nikolay Kompanets and Igor Kiselev and Artem Shelmanov},
  booktitle={Proceedings of the 4th Workshop on Multilingual Representation Learning (MRL) @ EMNLP-2024},
  year={2024},
  publisher={Association for Computational Linguistics},
  url={[https://arxiv.org/pdf/2405.13929](https://arxiv.org/pdf/2405.13929)}
}

@misc{qwen3technicalreport,
      title={Qwen3 Technical Report}, 
      author={Qwen Team},
      year={2025},
      eprint={2505.09388},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2505.09388}, 
}
```