Downloads · 30 days
32
4% of all-time downloads
gabrielloiseau/TAROT-DPO
TAROT-DPO is a text generation model from gabrielloiseau. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gpl-3.0.
Task-Oriented Authorship Obfuscation Using Policy Optimization Methods
Downloads · 30 days
32
4% of all-time downloads
All-time downloads
741
Public
Parameters
355M
1.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors1.4 GB · 100%
From the Hugging Face model README
Task-Oriented Authorship Obfuscation Using Policy Optimization Methods
Fine-tuned text rewriting model with direct preference optimization for authorship obfuscation.
ArXiv paper: https://arxiv.org/abs/2407.21630v1
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("gabrielloiseau/TAROT-DPO")
model = AutoModelForCausalLM.from_pretrained("gabrielloiseau/TAROT-DPO")
paragraph = """I had dinner at Bella's Bistro last night, and it was a delightful experience.
As soon as I walked in, I was greeted warmly by the hostess, and the cozy, rustic decor made me feel right at home.
I started with the bruschetta, which was so fresh and flavorful—I could have eaten a whole meal of just that!"""
inputs = tokenizer([paragraph + "<|endoftext|>"], return_tensors="pt", padding=True)
outputs = model.generate(**inputs, do_sample=True, max_new_tokens=128)
outputs = outputs[:, inputs["input_ids"].shape[1]:]
tokenizer.batch_decode(outputs,skip_special_tokens=True)