summaryrefslogtreecommitdiff
path: root/gpt2/config.go
blob: cd3984df908d0637ff5dca28acf366c725400cdf (plain)
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
package gpt2

type Config struct {
	VocabSize    int
	NumLayers    int
	NumHeads     int
	HeadDim      int
	NumPositions int
}

type Options struct {
	WithCache    bool
	WithLogits   bool
	WithLogProbs bool
}

func DefaultConfig() Config {
	return Config{
		VocabSize:    50257,
		NumLayers:    12,
		NumHeads:     12,
		HeadDim:      64,
		NumPositions: 1024,
	}
}