ai-forever / sage-v1.1.0

huggingface.co
Total runs: 470
24-hour runs: 0
7-day runs: -91
30-day runs: 267
Model's Last Updated: November 19 2024
text2text-generation

Introduction of sage-v1.1.0

Model Details of sage-v1.1.0

sage-v1.1.0

banner

Summary

The model corrects spelling and punctuation errors and typos by bringing all the words in the text to the norm of the Russian language. Corrector had been trained based on the model FRED-T5-1.7B . An extensive dataset with “artificial” errors was taken as a training corpus: the corpus was assembled on the basis of the Russian-language Wikipedia and transcripts of Russian-language videos, then typos and spelling errors were automatically introduced into it using the library SAGE .

Public references
Examples
Input Output
И не чсно прохожим в этот день непогожйи почему я веселый такйо И не ясно прохожим в этот день непогожий, почему я веселый такой.
Каждй день воттак делой, и спена балеть нибудет. А вотак каждый день ниделай Каждый день вот так делай и спина болеть не будет. А вот так каждый день не делай.
Основая цель мероприятия практическая отработка навыков по оказанию помощи гражданам, попавшим в ДТП а также повышение и совершенствование уровня профессиональной подготовки сотрудников МЧС при проведении аварийно-спасательных работ по ликвидации последствий дорожно-транспортных проишествий сокращение временных показателей реагирования. Основная цель мероприятия — практическая отработка навыков по оказанию помощи гражданам, попавшим в ДТП, а также повышение и совершенствование уровня профессиональной подготовки сотрудников МЧС при проведении аварийно-спасательных работ по ликвидации последствий дорожно-транспортных происшествий, сокращение временных показателей реагирования
Metrics
Quality

Below are automatic metrics for determining the correctness of the spell checkers. We compare our solution with both open automatic spell checkers and the ChatGPT family of models on all four available datasets:

  • RUSpellRU : texts collected from ( LiveJournal ), with manually corrected typos and errors;
  • MultidomainGold : examples from 7 text sources, including the open web, news, social media, reviews, subtitles, policy documents and literary works;
  • MedSpellChecker : texts with errors from medical anamnesis;
  • GitHubTypoCorpusRu : spelling errors and typos in commits from GitHub ;

RUSpellRU

Model Pr. (spell) Rec. (spell) F1 (spell) Pr. (punc) Rec. (punc) F1 (punc) Pr. (case) Rec. (case) F1 (case)
sage-v1.1.0 90.3 86.3 88.2 90.3 86.6 88.4 95.2 95.9 95.6
sage-fredt5-large 57.3 68.0 62.2 86.7 46.1 60.2 92.1 67.8 78.1
sage-fredt5-large (ft) 88.4 80.9 84.5 88.2 85.3 86.8 95.5 94.0 94.7
gpt-3.5-turbo 33.6 58.5 42.7 85.9 64.6 73.7 84.9 73.9 79.0
gpt-4 54.9 76.7 64.0 84.0 82.3 83.2 91.5 90.2 90.9

MultidomainGold

Model Pr. (spell) Rec. (spell) F1 (spell) Pr. (punc) Rec. (punc) F1 (punc) Pr. (case) Rec. (case) F1 (case)
sage-v1.1.0 81.6 77.7 79.6 70.2 67.5 68.8 80.5 80.5 80.5
sage-fredt5-large 43.4 49.7 46.3 21.8 21.3 21.6 58.8 23.9 34.0
sage-fredt5-large (ft) 80.3 75.1 77.6 69.0 66.5 67.7 78.6 80.0 79.3
gpt-3.5-turbo 18.8 48.1 27.1 42.0 31.8 36.2 47.1 51.3 49.1
gpt-4 25.4 68.0 37.0 57.8 54.3 56.0 54.0 67.5 60.0

MedSpellChecker

Model Pr. (spell) Rec. (spell) F1 (spell) Pr. (punc) Rec. (punc) F1 (punc) Pr. (case) Rec. (case) F1 (case)
sage-v1.1.0 71.3 73.5 72.4 75.1 69.2 72.0 80.9 72.8 76.6
sage-fredt5-large 35.2 54.5 42.8 19.2 13.2 15.7 48.7 36.8 41.9
sage-fredt5-large (ft) 72.5 72.2 72.3 74.6 66.4 70.3 79.3 85.1 82.1
gpt-3.5-turbo 14.7 45.9 22.3 69.9 52.3 59.8 26.4 41.8 32.3
gpt-4 37.8 72.3 49.6 81.4 64.3 71.9 73.0 62.1 67.1

GitHubTypoCorpusRu

Model Pr. (spell) Rec. (spell) F1 (spell) Pr. (punc) Rec. (punc) F1 (punc) Pr. (case) Rec. (case) F1 (case)
sage-v1.1.0 70.8 56.3 62.7 48.9 35.8 41.4 32.9 45.3 38.1
sage-fredt5-large 46.0 46.6 46.3 22.7 18.3 20.2 12.0 13.2 12.6
sage-fredt5-large (ft) 67.5 53.2 59.5 48.5 38.0 42.6 37.3 50.0 42.7
gpt-3.5-turbo 23.7 38.7 29.4 37.6 23.3 28.7 19.6 35.9 25.3
gpt-4 27.0 52.8 35.7 45.9 32.6 38.2 25.7 36.8 30.2
How to use
import re
import torch
from transformers import AutoTokenizer, T5ForConditionalGeneration

tokenizer = AutoTokenizer.from_pretrained("ai-forever/FRED-T5-1.7B")
model = T5ForConditionalGeneration.from_pretrained("ai-forever/sage-v1.1.0")

model.to('cuda')

tokenizer_config = {
            'max_length': None,
            'padding': 'longest',
            'truncation': False,
            "return_tensors": "pt",
        }

def inference(sentence):
    text = "<LM>" + sentence
    with torch.inference_mode():
        encodings = tokenizer(text, **tokenizer_config)
        for k, v in encodings.items():
            encodings[k] = v.to('cuda:0')
        res = model.generate(
            **encodings,
            use_cache=True,
            max_length = encodings['input_ids'].size(1) * 1.5
        )
        res = res.cpu().tolist()
        res = tokenizer.batch_decode(res, skip_special_tokens=True)
    return res

text = 'Првет какдила'
text = re.sub(r'\n+', '\n', text)
print(inference(text))

# ['Привет, как дела?']
Resources
Specifications
  • File size: 7 Gb;
  • Framework: pytorch
  • Version: v1.1.0
  • Developer: SberDevices, AGI NLP
Contacts

nikita.martynov.98@list.ru

Runs of ai-forever sage-v1.1.0 on huggingface.co

470
Total runs
0
24-hour runs
-3
3-day runs
-91
7-day runs
267
30-day runs

More Information About sage-v1.1.0 huggingface.co Model

More sage-v1.1.0 license Visit here:

https://choosealicense.com/licenses/mit

sage-v1.1.0 huggingface.co

sage-v1.1.0 huggingface.co is an AI model on huggingface.co that provides sage-v1.1.0's model effect (), which can be used instantly with this ai-forever sage-v1.1.0 model. huggingface.co supports a free trial of the sage-v1.1.0 model, and also provides paid use of the sage-v1.1.0. Support call sage-v1.1.0 model through api, including Node.js, Python, http.

ai-forever sage-v1.1.0 online free

sage-v1.1.0 huggingface.co is an online trial and call api platform, which integrates sage-v1.1.0's modeling effects, including api services, and provides a free online trial of sage-v1.1.0, you can try sage-v1.1.0 online for free by clicking the link below.

ai-forever sage-v1.1.0 online free url in huggingface.co:

https://huggingface.co/ai-forever/sage-v1.1.0

sage-v1.1.0 install

sage-v1.1.0 is an open source model from GitHub that offers a free installation service, and any user can find sage-v1.1.0 on GitHub to install. At the same time, huggingface.co provides the effect of sage-v1.1.0 install, users can directly use sage-v1.1.0 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

sage-v1.1.0 install url in huggingface.co:

https://huggingface.co/ai-forever/sage-v1.1.0

Url of sage-v1.1.0

Provider of sage-v1.1.0 huggingface.co

ai-forever
ORGANIZATIONS

Other API from ai-forever

huggingface.co

Total runs: 525.5K
Run Growth: 485.9K
Growth Rate: 96.59%
Updated: November 03 2023
huggingface.co

Total runs: 10.6K
Run Growth: 1.6K
Growth Rate: 14.99%
Updated: December 05 2023
huggingface.co

Total runs: 8.2K
Run Growth: 5.1K
Growth Rate: 59.45%
Updated: December 29 2024
huggingface.co

Total runs: 5.9K
Run Growth: 3.6K
Growth Rate: 61.73%
Updated: December 11 2023
huggingface.co

Total runs: 2.3K
Run Growth: -360
Growth Rate: -15.50%
Updated: December 05 2023
huggingface.co

Total runs: 1.8K
Run Growth: 78
Growth Rate: 4.35%
Updated: December 28 2023
huggingface.co

Total runs: 315
Run Growth: 165
Growth Rate: 52.05%
Updated: January 26 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated: December 24 2021
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated: June 08 2023
huggingface.co

Total runs: 0
Run Growth: 0
Growth Rate: 0.00%
Updated: September 21 2021