From 84d88dca52d591481b986ae386108e632b32cd61 Mon Sep 17 00:00:00 2001 From: Xing Han Lu <21180505+xhluca@users.noreply.github.com> Date: Fri, 9 Feb 2024 00:52:56 -0500 Subject: [PATCH] Allow use of gpt-2 and gpt-3.5 in encoding_for_model (#185) --- tiktoken/model.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tiktoken/model.py b/tiktoken/model.py index 6cc7418a..17532aee 100644 --- a/tiktoken/model.py +++ b/tiktoken/model.py @@ -20,6 +20,7 @@ # chat "gpt-4": "cl100k_base", "gpt-3.5-turbo": "cl100k_base", + "gpt-3.5": "cl100k_base", # Common shorthand "gpt-35-turbo": "cl100k_base", # Azure deployment name # base "davinci-002": "cl100k_base", @@ -63,6 +64,7 @@ "code-search-ada-code-001": "r50k_base", # open source "gpt2": "gpt2", + "gpt-2": "gpt2", # Maintains consistency with gpt-4 }