1xApollo commited on
Commit
835a3e3
·
verified ·
1 Parent(s): f1fe554

Add Sinhala GPT-2 model for text generation This model was fine-tuned on a custom Sinhala dataset to improve text generation for Sinhala language.

Browse files

from transformers import Trainer, TrainingArguments

# Define your model
model = GPT2LMHeadModel.from_pretrained('gpt2')

# Prepare your custom dataset here
train_dataset = CustomDataset('your_dataset.txt')

training_args = TrainingArguments(
output_dir='./results',
num_train_epochs=3,
per_device_train_batch_size=8,
save_steps=10_000,
save_total_limit=2,
)

trainer = Trainer(
model=model,
args=training_args,
train_dataset=train_dataset,
)

trainer.train()

Files changed (1) hide show
  1. README.md +26 -3
README.md CHANGED
@@ -1,3 +1,26 @@
1
- ---
2
- license: cc-by-nd-4.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: cc-by-nd-4.0
3
+ language:
4
+ - si
5
+ - en
6
+ - ta
7
+ metrics:
8
+ - code_eval
9
+ - chrf
10
+ - character
11
+ base_model:
12
+ - openai-community/gpt2
13
+ new_version: openai-community/gpt2
14
+ pipeline_tag: text-classification
15
+ library_name: asteroid
16
+ tags:
17
+ - code
18
+ - climate
19
+ - biology
20
+ - text-generation-inference
21
+ - art
22
+ - legal
23
+ ---
24
+ ---
25
+ license: cc-by-nd-4.0
26
+ ---0