|
|
--- |
|
|
language: |
|
|
- ru |
|
|
license: apache-2.0 |
|
|
pipeline_tag: text2text-generation |
|
|
library_name: transformers |
|
|
--- |
|
|
# Irbis |
|
|
|
|
|
|
|
|
<img src="Irbis.jpg" width="700px"> |
|
|
|
|
|
|
|
|
## Description |
|
|
|
|
|
Irbis is a generative language model based on the T5 architecture, designed to generate SQL code from user queries and database schemas. It is specifically trained to work with Russian-language tables and data, enabling it to process and understand both the queries and the structure of the databases in Russian. Irbis is optimized for SQL generation, providing accurate and efficient solutions for database management tasks in a Russian-language environment. |
|
|
|
|
|
|
|
|
## 👨💻 Examples of usage |
|
|
|
|
|
|
|
|
```python |
|
|
from transformers import pipeline |
|
|
import torch |
|
|
|
|
|
pipe = pipeline("text2text-generation", model = "MadShift/Irbis", max_lenght=250) |
|
|
|
|
|
input_text = "Схема: [схема бд], Вопрос: [введите ваш вопрос по таблице здесь]" |
|
|
input_ids = torch.tensor([pipe.tokenizer.encode(input_text)]) |
|
|
outputs = pipe.model.generate(input_ids, eos_token_id=pipe.tokenizer.eos_token_id, early_stopping=True) |
|
|
|
|
|
print(pipe.tokenizer.decode(outputs[0][1:])) |
|
|
``` |