diff options
Diffstat (limited to 'gpt2')
| -rw-r--r-- | gpt2/cmd/gpt2/main.go | 4 | ||||
| -rw-r--r-- | gpt2/config.go | 2 | ||||
| -rw-r--r-- | gpt2/model_test.go | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/gpt2/cmd/gpt2/main.go b/gpt2/cmd/gpt2/main.go index b9b75a2..17dac69 100644 --- a/gpt2/cmd/gpt2/main.go +++ b/gpt2/cmd/gpt2/main.go @@ -28,7 +28,7 @@ func main() { } func generate(prompt []int64) { - cfg := gpt2.DefaultConfig() + cfg := gpt2.ConfigDefault() cfg.VocabSize = 8193 @@ -60,7 +60,7 @@ func generate(prompt []int64) { } func score(prompt []int64) { - cfg := gpt2.DefaultConfig() + cfg := gpt2.ConfigDefault() cfg.VocabSize = 8193 diff --git a/gpt2/config.go b/gpt2/config.go index 7e1f74e..9f1a65f 100644 --- a/gpt2/config.go +++ b/gpt2/config.go @@ -14,7 +14,7 @@ type Options struct { WithLogProbs bool } -func DefaultConfig() Config { +func ConfigDefault() Config { return Config{ VocabSize: 50257, NumLayers: 12, diff --git a/gpt2/model_test.go b/gpt2/model_test.go index cd38241..383cf92 100644 --- a/gpt2/model_test.go +++ b/gpt2/model_test.go @@ -48,7 +48,7 @@ func model() *Model { WithLogProbs: false, } - m := NewModel(shelf.Abs("models/gpt2/model_cache.onnx"), DefaultConfig(), opts) + m := NewModel(shelf.Abs("models/gpt2/model_cache.onnx"), ConfigDefault(), opts) if err := m.Init(); err != nil { log.Fatal(err) |
