from transformers import AutoTokenizer, AutoModelForCausalLM # Загрузка модели (замените 'gpt2' на нужную) model_name = "gpt2" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained(model_name)