How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="Roaoch/CyberClassic-Generator")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("Roaoch/CyberClassic-Generator")
model = AutoModelForCausalLM.from_pretrained("Roaoch/CyberClassic-Generator", device_map="auto")
Quick Links

This text generator is based on OpenAI GPT2 model from HuggingFace Base model went through two step of learning

First - Finetining of base model

On this step model is finetuned on dataset of single sentence from the texts of Dostovesky F.M.

Training parameters:

  • Epoch = 10
  • Learning Rate = 1e-3
  • Optimizer = AdamW
  • Scheduler = OneCycleLR
  • Training env = PyTorch

image.png

image.png

Second - RL

On this step finetuned model went trough reinforcement learning pipline with TRL library.

Training parameters:

  • Epoch = 30
  • Trainer = PPO
  • Query texts = first 100 texts from dataset, trimmed by first 3 words
  • Reward = score from binary classifier multiplied by 10

image.png

image.png

Downloads last month
23
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Space using Roaoch/CyberClassic-Generator 1

Collection including Roaoch/CyberClassic-Generator