Auttar commited on
Commit
700f47a
·
verified ·
1 Parent(s): 7b57004

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +32 -48
README.md CHANGED
@@ -1,65 +1,49 @@
1
  ---
2
- library_name: transformers
3
- base_model: sberbank-ai/ruT5-base
4
  tags:
5
- - generated_from_trainer
6
- metrics:
7
- - rouge
8
- model-index:
9
- - name: RuT5SentimentSummarization
10
- results: []
11
  ---
12
 
13
- <!-- This model card has been generated automatically according to the information the Trainer had access to. You
14
- should probably proofread and complete it, then remove this comment. -->
15
 
16
- # RuT5SentimentSummarization
 
17
 
18
- This model is a fine-tuned version of [sberbank-ai/ruT5-base](https://huggingface.co/sberbank-ai/ruT5-base) on the None dataset.
19
- It achieves the following results on the evaluation set:
20
- - Loss: 1.5647
21
- - Rouge1: 0
22
- - Rouge2: 0
23
- - Rougel: 0
24
 
25
- ## Model description
 
26
 
27
- More information needed
 
 
28
 
29
- ## Intended uses & limitations
 
30
 
31
- More information needed
 
 
 
 
32
 
33
- ## Training and evaluation data
 
 
34
 
35
- More information needed
 
36
 
37
- ## Training procedure
38
 
39
- ### Training hyperparameters
40
 
41
- The following hyperparameters were used during training:
42
- - learning_rate: 5e-05
43
- - train_batch_size: 4
44
- - eval_batch_size: 4
45
- - seed: 42
46
- - optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
47
- - lr_scheduler_type: linear
48
- - num_epochs: 3
49
- - mixed_precision_training: Native AMP
50
 
51
- ### Training results
52
 
53
- | Training Loss | Epoch | Step | Validation Loss | Rouge1 | Rouge2 | Rougel |
54
- |:-------------:|:-----:|:-----:|:---------------:|:------:|:------:|:------:|
55
- | 1.9315 | 1.0 | 4090 | 1.6697 | 0 | 0 | 0 |
56
- | 1.7284 | 2.0 | 8180 | 1.5894 | 0 | 0 | 0 |
57
- | 1.5832 | 3.0 | 12270 | 1.5647 | 0 | 0 | 0 |
58
-
59
-
60
- ### Framework versions
61
-
62
- - Transformers 5.0.0
63
- - Pytorch 2.10.0+cu128
64
- - Datasets 4.0.0
65
- - Tokenizers 0.22.2
 
1
  ---
2
+ language: ru
 
3
  tags:
4
+ - summarization
5
+ - t5
6
+ - russian
7
+ - sentiment-analysis
8
+ license: mit
 
9
  ---
10
 
11
+ # RuT5-Base for Sentiment Summarization
 
12
 
13
+ ## Описание
14
+ Модель для генеративной суммаризации отзывов на русском языке. Обучалась на датасете Kinopoisk с использованием дистилляции знаний от LLM.
15
 
16
+ ## Задача
17
+ Создание кратких, информативных резюме отзывов с выделением ключевых плюсов и минусов.
 
 
 
 
18
 
19
+ ## Метрики на тестовой выборке
20
+ (Будут добавлены после завершения обучения)
21
 
22
+ ## Использование
23
+ ```python
24
+ from transformers import T5ForConditionalGeneration, T5Tokenizer
25
 
26
+ model = T5ForConditionalGeneration.from_pretrained("Auttar/RuT5SentimentSummarization")
27
+ tokenizer = T5Tokenizer.from_pretrained("Auttar/RuT5SentimentSummarization")
28
 
29
+ def summarize(review):
30
+ input_text = f"summarize: {review}"
31
+ inputs = tokenizer(input_text, return_tensors="pt", max_length=512, truncation=True)
32
+ outputs = model.generate(inputs.input_ids, max_length=128, num_beams=4)
33
+ return tokenizer.decode(outputs[0], skip_special_tokens=True)
34
 
35
+ # Пример
36
+ review = "Фильм отличный! Актеры играют великолепно, сюжет захватывает."
37
+ print(summarize(review))
38
 
39
+ # Обучение
40
+ - Базовая модель: sberbank-ai/ruT5-base
41
 
42
+ - Датасет: Kinopoisk с сгенерированными резюме
43
 
44
+ - Эпохи: 3
45
 
46
+ - Learning rate: 5e-5
 
 
 
 
 
 
 
 
47
 
48
+ - Batch size: 4
49