MRNH commited on
Commit
63a965b
1 Parent(s): f86becd

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +27 -0
README.md ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ pipeline_tag: text2text-generation
5
+ metrics:
6
+ - f1
7
+ tags:
8
+ - grammatical error correction
9
+ - GEC
10
+ - russian
11
+ ---
12
+
13
+ This is a fine-tuned version of Multilingual Bart trained on Russian in particular on the public dataset RULEC-GEC for Grammatical Error Correction.
14
+
15
+ To initialize the model:
16
+
17
+
18
+ from transformers import MBartForConditionalGeneration, MBart50TokenizerFast
19
+ model = MBartForConditionalGeneration.from_pretrained("MRNH/mbart-russian-grammar-corrector")
20
+
21
+
22
+ To generate text using the model:
23
+
24
+
25
+ tokenizer = MBart50TokenizerFast.from_pretrained("MRNH/mbart-russian-grammar-corrector", src_lang="ru_RU", tgt_lang="ru_RU")
26
+ input = tokenizer("I was here yesterday to studying",text_target="I was here yesterday to study", return_tensors='pt')
27
+ output = model.generate(input["input_ids"],attention_mask=input["attention_mask"],forced_bos_token_id=tokenizer_it.lang_code_to_id["ru_RU"])