File size: 1,396 Bytes
357cf25
 
 
 
 
 
 
 
 
ee733be
 
 
 
 
 
 
 
 
 
 
 
 
 
357cf25
ee733be
4b2e4e2
 
4b86156
4b2e4e2
 
 
1276734
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4b2e4e2
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
language:
  - en
library_name: pytorch
tags:
  - language-model
  - gpt2
  - transformer
  - wikitext-103

model-index:

- name: gpt2_wt103-40m_12-layer
  results:
  - task:
      type: language-modeling
    dataset:
      type: wikitext
      name: Wikitext-103
    metrics:
      - type: perplexity
        value: 40.3 
    
---

# Model description

paper: [Characterizing Verbatim Short-Term Memory in Neural Language Models](https://arxiv.org/abs/2210.13569)

This is a gpt2-small-like decoder-only transformer model trained on a 40M token subset of the [wikitext-103 dataset](https://paperswithcode.com/dataset/wikitext-103).

# Usage

You can download and load the model as follows:

```python
from transformers import GPT2LMHeadModel

model = GPT2LMHeadModel.from_pretrained("Kristijan/gpt2_wt103-40m_12-layer")

```

Alternatively, if you've downloaded the checkpoint files in this repository, you could also do:

```python
from transformers import GPT2LMHeadModel

model = GPT2LMHeadModel.from_pretrained(path_to_folder_with_checkpoint_files)

```

To tokenize your text for this model, you should use the [tokenizer trained on Wikitext-103](https://huggingface.co/Kristijan/wikitext-103-tokenizer)

# Intended uses

This checkpoint is intended for research purposes, for example those interested in studying the behavior of transformer language models trained on smaller datasets.