afterless commited on
Commit
0ffb679
1 Parent(s): 017d6eb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -1
README.md CHANGED
@@ -1,10 +1,24 @@
 
 
 
 
 
 
 
 
 
 
1
  ```python
2
  from transformers import GPTNeoXForCausalLM, AutoTokenizer
3
 
4
  tokenizer = AutoTokenizer.from_pretrained("afterless/reverse-pythia-160m")
5
  model = GPTNeoXForCausalLM.from_pretrained("afterless/reverse-pythia-160m")
6
 
7
- inputs = tokenizer("but I told him, the cheese was the best", return_token_type_ids=False, return_tensors="pt")
 
 
 
 
8
  inputs['input_ids'] = t.flip(inputs.input_ids, (1,))
9
  tokens = t.flip(model.generate(**inputs), (1,))
10
  tokenizer.decode(tokens[0])
 
1
+ ---
2
+ datasets:
3
+ - EleutherAI/pile
4
+ language:
5
+ - en
6
+ tags:
7
+ - Text Generation
8
+ - pytorch
9
+ - causal-lm
10
+ ---
11
  ```python
12
  from transformers import GPTNeoXForCausalLM, AutoTokenizer
13
 
14
  tokenizer = AutoTokenizer.from_pretrained("afterless/reverse-pythia-160m")
15
  model = GPTNeoXForCausalLM.from_pretrained("afterless/reverse-pythia-160m")
16
 
17
+ inputs = tokenizer(
18
+ "but I told him, the cheese was the best",
19
+ return_token_type_ids=False,
20
+ return_tensors="pt"
21
+ )
22
  inputs['input_ids'] = t.flip(inputs.input_ids, (1,))
23
  tokens = t.flip(model.generate(**inputs), (1,))
24
  tokenizer.decode(tokens[0])