Skip to content

Commit 84d88dc

Browse files
authored
Allow use of gpt-2 and gpt-3.5 in encoding_for_model (#185)
1 parent 01df436 commit 84d88dc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tiktoken/model.py

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
# chat
2121
"gpt-4": "cl100k_base",
2222
"gpt-3.5-turbo": "cl100k_base",
23+
"gpt-3.5": "cl100k_base", # Common shorthand
2324
"gpt-35-turbo": "cl100k_base", # Azure deployment name
2425
# base
2526
"davinci-002": "cl100k_base",
@@ -63,6 +64,7 @@
6364
"code-search-ada-code-001": "r50k_base",
6465
# open source
6566
"gpt2": "gpt2",
67+
"gpt-2": "gpt2", # Maintains consistency with gpt-4
6668
}
6769

6870

0 commit comments

Comments
 (0)