update readme
Browse files
README.md
CHANGED
@@ -12,6 +12,14 @@ Full code and details at https://github.com/csinva/gpt-paper-title-generator
|
|
12 |
- inference
|
13 |
- should prepend with a year and two newlines before querying for a title, e.g. `2022\n\n`
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
**Data**
|
16 |
- all [papers on arXiv](https://www.kaggle.com/datasets/Cornell-University/arxiv) in the categories cs.AI, cs.LG, stat.ML
|
17 |
- date cutoff: only finetuned on papers with dat on or before Apr 1, 2022
|
|
|
12 |
- inference
|
13 |
- should prepend with a year and two newlines before querying for a title, e.g. `2022\n\n`
|
14 |
|
15 |
+
```python
|
16 |
+
from transformers import AutoModelForCausalLM, pipeline, AutoTokenizer
|
17 |
+
model = AutoModelForCausalLM.from_pretrained("csinva/gpt-neo-2.7B-titles")
|
18 |
+
tokenizer = AutoTokenizer.from_pretrained("EleutherAI/gpt-neo-2.7B")
|
19 |
+
pipe = pipeline('text-generation', model=model, tokenizer=tokenizer)
|
20 |
+
pipe('2022\n\n')
|
21 |
+
```
|
22 |
+
|
23 |
**Data**
|
24 |
- all [papers on arXiv](https://www.kaggle.com/datasets/Cornell-University/arxiv) in the categories cs.AI, cs.LG, stat.ML
|
25 |
- date cutoff: only finetuned on papers with dat on or before Apr 1, 2022
|