Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add openai/gpt-3.5-turbo-instruct model #2376

Merged
merged 1 commit into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/helm/config/model_deployments.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1041,6 +1041,14 @@ model_deployments:
## GPT 3.5 Turbo Models
# ChatGPT: https://openai.com/blog/chatgpt

- name: openai/gpt-3.5-turbo-instruct
model_name: openai/gpt-3.5-turbo-instruct
tokenizer_name: openai/cl100k_base
max_sequence_length: 4096
max_sequence_length: 4097
Comment on lines +1047 to +1048
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we still doing this off by one? I thought we would get rid of it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doing this for consistency for now, since gpt-3.5-turbo-instruct uses the same completions API as text-davinci-003 and we did that for text-davinci-003. I should check with @teetone whether we can just delete this.

client_spec:
class_name: "helm.proxy.clients.openai_client.OpenAIClient"

# The claimed sequence length is 4096, but as of 2023-03-07, the empirical usable
# sequence length is smaller at 4087 with one user input message and one assistant
# output message because ChatGPT uses special tokens for message roles and boundaries.
Expand Down
8 changes: 8 additions & 0 deletions src/helm/config/model_metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1360,6 +1360,14 @@ models:
## GPT 3.5 Turbo Models
# ChatGPT: https://openai.com/blog/chatgpt

- name: openai/gpt-3.5-turbo-instruct
display_name: GPT-3.5 Turbo Instruct
description: Similar capabilities as GPT-3 era models. Compatible with legacy Completions endpoint and not Chat Completions.
creator_organization_name: OpenAI
access: limited
release_date: 2023-09-18
tags: [TEXT_MODEL_TAG, OPENAI_CHATGPT_MODEL_TAG, LIMITED_FUNCTIONALITY_TEXT_MODEL_TAG, INSTRUCTION_FOLLOWING_MODEL_TAG]

- name: openai/gpt-3.5-turbo-0301
display_name: GPT-3.5 Turbo (0301)
description: Sibling model of text-davinci-003 that is optimized for chat but works well for traditional completions tasks as well. Snapshot from 2023-03-01.
Expand Down
6 changes: 5 additions & 1 deletion src/helm/proxy/clients/openai_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ def __init__(
self.api_base: str = "https://api.openai.com/v1"

def _is_chat_model_engine(self, model_engine: str):
return model_engine.startswith("gpt-3.5") or model_engine.startswith("gpt-4")
if model_engine == "gpt-3.5-turbo-instruct":
return False
elif model_engine.startswith("gpt-3.5") or model_engine.startswith("gpt-4"):
return True
return False

def _set_access_info(self):
# Following https://beta.openai.com/docs/api-reference/authentication
Expand Down
Loading