Views
No views yet
EleutherAI/pythia-410m-deduped. Its objective is to generate positive movie reviews.lvwerra/distilbert-imdb with penalties.1from transformers import pipeline
2
3model_id = "vemz/pythia-410m-rloo-imdb"
4
5generator = pipeline("text-generation", model=model_id, device_map="auto")
6
7prompt = "At first I wad bored, but then"
8
9output = generator(prompt, max_new_tokens=50, return_full_text=False)[0]
10print(output["generated_text"])1rloo_config = RLOOConfig(
2 output_dir=output_dir,
3 learning_rate=3e-5,
4 lr_scheduler_type="cosine",
5 warmup_ratio=0.1,
6 num_generations=4,
7 beta=0.05,
8 per_device_train_batch_size=2,
9 gradient_accumulation_steps=16,
10 max_steps=100,
11 logging_steps=10,
12 bf16=False,
13 fp16=False,
14 gradient_checkpointing=True,
15 max_completion_length=48,
16 save_strategy="steps",
17 save_steps=40,
18 save_total_limit=1,
19)vemz/pythia-410m-sft-imdb must be loaded separately.1@misc{vonwerra2022trl,
2 title = {{TRL: Transformer Reinforcement Learning}},
3 author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
4 year = 2020,
5 journal = {GitHub repository},
6 publisher = {GitHub},
7 howpublished = {\url{https://github.com/huggingface/trl}}
8}