GPT-2 Instruct Model
This is a fine-tuned GPT-2 model for instruction-following tasks.
Base Model
Training Details
- Epochs: 4
- Batch size: 2
- Max length: 512
- Optimizer: AdamW
Dataset
- Custom instruction dataset
Usage Example
from transformers import pipeline
chat = pipeline(
"text-generation",
model="Sanjarbek1024/gpt2-instruct",
tokenizer="Sanjarbek1024/gpt2-instruct"
)
prompt = "<|user|>\nWhat is AI?\n<|assistant|>\n"
result = chat(prompt, max_new_tokens=100)
print(result[0]["generated_text"])
Author