Text Generation
Not-For-All-Audiences
ImRasul1 commited on
Commit
eaa1ed2
1 Parent(s): 992d8df

Create Gpt-2

Browse files
Files changed (1) hide show
  1. Gpt-2 +6 -0
Gpt-2 ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from transformers import AutoTokenizer, AutoModelForCausalLM
2
+
3
+ # Загрузка модели (замените 'gpt2' на нужную)
4
+ model_name = "gpt2"
5
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
6
+ model = AutoModelForCausalLM.from_pretrained(model_name)