Downloads · 30 days
18
6% of all-time downloads
Realluke/phi-2-senator-tweets
phi-2-senator-tweets is a text generation model from Realluke. Use it when you need the model to write or continue text. It is set up for transformers.
Downloads · 30 days
18
6% of all-time downloads
All-time downloads
303
Public
Parameters
2.8B
5.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.6 GB · 100%
From the Hugging Face model README
Phi-2 finetuned on Senator Tweets.
The starting token is [start] and the ending token is [end]
Example:
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("Realluke/phi-2-senator-tweets", torch_dtype="auto", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-2", trust_remote_code=True)
inputs = tokenizer("[start]", return_tensors="pt", return_attention_mask=False)
outputs = model.generate(**inputs, max_length=200)
text = tokenizer.batch_decode(outputs)[0]
print(text)