File size: 1,602 Bytes
eabc98e
a486b6e
 
eabc98e
a486b6e
 
 
 
 
 
 
 
 
eabc98e
a486b6e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
language:
- ru
license: mit
tags:
- text-generation
- pytorch
- qwen2
- russian
- tensor
- instruct
- sft
pipeline_tag: text-generation
---

# Tensor-2-40m-instruct

Tensor-2-40m-instruct is a Russian-language language model from the **Tensor** series, developed as part of the **GribAI** project. This is an instruction-tuned version of [Tensor-2-40m-base](https://huggingface.co/VGribAI/Tensor-2-40m-base), fine-tuned to follow instructions and hold a dialogue.

## Description

Built on top of Tensor-2-40m-base, this model was additionally fine-tuned on a **150 MB** SFT (supervised fine-tuning) dataset, including code-related data. As a result, it follows instructions more reliably and handles code-related prompts better than the base model.

## Training

- Base model: Tensor-2-40m-base
- SFT dataset: 150 MB, including code
- Stage: supervised fine-tuning (SFT)

## Usage

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "VGribAI/Tensor-2-40m-instruct"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)

prompt = "Напиши функцию на Python, которая считает факториал числа"
inputs = tokenizer(prompt, return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=200)

print(tokenizer.decode(output[0], skip_special_tokens=True))
```

## Limitations

As a small model, it may still make mistakes in complex reasoning, long-context tasks, or less common domains. Always verify generated code before running it.
**GribAI** project (VGribAI).