This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import os | |
import torch | |
import transformers | |
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer | |
import deepspeed | |
import matplotlib.pyplot as plt | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Определение склонности моделей rugpt к запоминанию обучающего датасета | |
""" | |
import collections | |
import os | |
import json | |
import itertools | |
import sys | |
import argparse | |
import random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Определение склонности моделей rugpt к запоминанию обучающего датасета | |
""" | |
import collections | |
import os | |
import json | |
import itertools | |
import sys | |
import argparse | |
import random |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import argparse | |
import torch | |
import transformers | |
from transformers import T5Config | |
if __name__ == '__main__': | |
proj_dir = os.path.expanduser('~/polygon/chatbot') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Тренировка модели болталки Axioma на FRED T5 для проекта https://github.com/Koziev/chatbot | |
Эксперимент с файнтюном: токены истории диалога не включаем в backprop, присваивая соответствующим целям (labels) значение -100 | |
Прочие хинты по тренировке: https://kelijah.livejournal.com/315826.html | |
""" | |
import os | |
import json | |
import sys | |
import io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import argparse | |
import logging | |
import random | |
from flask import Flask, request | |
from flask import jsonify | |
import transformers | |
from kandinsky2 import get_kandinsky2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Эксперимент с файнтюном: токены исходного текста не включаем в backprop, присваивая соответствующим целям (labels) значение -100 | |
""" | |
import os | |
import json | |
import io | |
import random | |
import itertools |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Файнтюн rugpt на датасете перефразировок с использованием GPT2DoubleHeadsModel (https://huggingface.co/docs/transformers/model_doc/gpt2#transformers.GPT2DoubleHeadsModel) | |
Для проектов чатбота и генеративных стихов. | |
Используется датасет перефразировок из проекта чатбота с добавленными сэмплами проекта генеративных стихов. | |
В качестве дистракторов используем негативные примеры перефразировок из этого же датасета плюс рандомные выборки. | |
04.01.2023 Заранее подготовленный датасет загружаем из paraphrases.json (см. публичную версию https://huggingface.co/datasets/inkoziev/paraphrases) | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Автоматическая оценка точности генерации цифрового ответа для p(0)qa сэмплов. | |
13.10.2022 Добавил валидацию модели на T5 | |
""" | |
import os | |
import io | |
import re | |
import time |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Эксперимент с визуализацией эмбеддингов токенов в rugpt. | |
""" | |
import os | |
import io | |
import collections | |
import torch | |
import transformers |
NewerOlder