Hello.
Anyone know anything about the title?
First, I checked the token ID of logit_bias with the following code in Python.
encoding: Encoding = tiktoken.encoding_for_model("gpt-3.5-turbo-16k")
token_ids0 = encoding.encode("晴れ")
token_ids1 = encoding.encode("曇り")
And then I got below two token ids as below.
"晴れ" = [45114, 112, 33121]
"曇り" = [27552, 229, 31431]
In addition, I used 3 json formats as below and sent to the API (gpt-3.5-turbo-16k), but different json formats returned errors.
#pattern 1
input_logit_bias = {
[
"45114": -100,
"112": -100,
"33121": -100
],
[
"27552": -100,
"229": -100,
"31431": -100
],
}
#pattern 2
input_logit_bias = [
{
"45114": -100,
"112": -100,
"33121": -100
},
{
"27552": -100,
"229": -100,
"31431": -100
},
]
#pattern 3
input_logit_bias = {
{
"45114": -100,
"112": -100,
"33121": -100
},
{
"27552": -100,
"229": -100,
"31431": -100
}
}
I would appreciate it if someone could tell me who was able to set multiple words in logit_bias.
Thank you.