Downloads · 30 days
37
0% of all-time downloads
afterless/reverse-pythia-160m
reverse-pythia-160m is a text generation model from afterless. Use it when you need the model to write or continue text. It is set up for transformers.
Downloads · 30 days
37
0% of all-time downloads
All-time downloads
10.5K
Public
Repo size
1.5 GB
Likes
0
Public
Click a slice to open those files.
.bin375 MB · 99%
From the Hugging Face model README
from transformers import GPTNeoXForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(
"afterless/reverse-pythia-160m"
)
model = GPTNeoXForCausalLM.from_pretrained(
"afterless/reverse-pythia-160m"
)
inputs = tokenizer(
"but I told him, the cheese was the best",
return_token_type_ids=False,
return_tensors="pt"
)
inputs['input_ids'] = t.flip(inputs.input_ids, (1,))
tokens = t.flip(model.generate(**inputs), (1,))
tokenizer.decode(tokens[0])