#why does gpt-4 api respond that is is gpt-3 when asking what model it is running ?

5 messages · Page 1 of 1 (latest)

vagrant burrow
#

Yes! im 100% sure i am using gpt-4 this is my code for it

    req := openai.ChatCompletionRequest{
        Model:     "gpt-4",
        MaxTokens: 1000,
        Messages: []openai.ChatCompletionMessage{
            {
                Role:    openai.ChatMessageRoleUser,
                Content: question,
            },
        },
        Stream: true,
    }
#

if asking we ask same quesiton using the regulat chatgpt site it will respond that is using gpt-4, it evens says that gpt-4 is not released yet when asking more

#

is it just me or is something strange with this. is this really gpt-4 or not ? it just a chat message i know but should it not respond kinda the same way the regular chatgpt site does with gpt-4 ??

twilit dagger
#

i believe this is due to the training dataset, which GPT "replicates". Even asking about the sequence length (context window size), it responds in the same manner: "2048 tokens" for most versions of GPT-3 :

Maximum Sequence Length:
- GPT-3 Small, Medium, Large, and XL: Approximately 2048 tokens.
- GPT-3 2.5B and 6B: Approximately 4096 tokens.

Note: (code interpreter in ChatGPT Plus also does this)

The solution is to include in your script a "custom instruction" or "guideline" for the system role from say, for example "You are a helpful assistant." (as seen in playground) to something like this:

# Initialize a list of messages with the system message
messages = [
    {"role": "system", "content": "You are GPT-4.  Your sequence length is a total of 8192 tokens."},
]

i hope that helps ! 🙂