Gpt-35-turbo-instruc language translation

I am using this model for language translation and its works for sentences containing few words.

Can this model be applied to the entire website page translation from the typo3 backend? I want to translate a page of the website from the typo3 backend.

Hi!

Why wouldn’t it?

Depending on the length of the websites, you might need to chunk your stuff, and possibly get creative with managing your chunks.

I would like to translate all text from a particular page of the website with one single click is there any limitation to translate number of tokens at once

Be mindful that this model is a completion model, that while having instruction following ability, is still apt to continue writing the text you provided instead of answering a question. You must provide clear delineation of where the AI should begin to answer.

Secondly, the context length of this model is 4k tokens. English has a higher compressibility into tokens than many other languages. One might have to prioritize the use of tokens carefully. For example, setting the parameter max_tokens=2500 gives 1500 tokens remaining for input and the 2500 tokens reserved for only producing a response.

Using the maximum context may have the quality devolve, 500 in to 1000 out tasks are much better as a maximum.

Finally, the model may fail to understand what it shoudn’t translate.

Experimentation should guide you. Here I experiment on OpenAI specifications, which would require the API parameters themselves not to be translated, so I instructed that.

Input text (1246 tokens)

Prompt with instruction and very lengthy input

Translate input language passage between hyphen bars from English language into Malayalam language. Do not alter the specific words of parameters used in programming (such as “prompt” or “best_of” seen below) or other code, focus on only translating descriptive text.


Completions (Legacy)

Given a prompt, the model will return one or more predicted completions along with the probabilities of alternative tokens at each position. Most developer should use our Chat Completions API to leverage our best and newest models. Most models that support the legacy Completions endpoint will be shut off on January 4th, 2024.
Create completionLegacy

post https://api.openai.com/v1/completions

Creates a completion for the provided prompt and parameters.
Request body
model
string
Required

ID of the model to use. You can use the List models API to see all of your available models, or see our Model overview for descriptions of them.
prompt
string or array
Required

The prompt(s) to generate completions for, encoded as a string, array of strings, array of tokens, or array of token arrays.

Note that <|endoftext|> is the document separator that the model sees during training, so if a prompt is not specified the model will generate as if from the beginning of a new document.
best_of
integer or null
Optional
Defaults to 1

Generates best_of completions server-side and returns the “best” (the one with the highest log probability per token). Results cannot be streamed.

When used with n, best_of controls the number of candidate completions and n specifies how many to return – best_of must be greater than n.

Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop.
echo
boolean or null
Optional
Defaults to false

Echo back the prompt in addition to the completion
frequency_penalty
number or null
Optional
Defaults to 0

Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model’s likelihood to repeat the same line verbatim.

See more information about frequency and presence penalties.
logit_bias
map
Optional
Defaults to null

Modify the likelihood of specified tokens appearing in the completion.

Accepts a JSON object that maps tokens (specified by their token ID in the GPT tokenizer) to an associated bias value from -100 to 100. You can use this tokenizer tool (which works for both GPT-2 and GPT-3) to convert text to token IDs. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token.

As an example, you can pass {“50256”: -100} to prevent the <|endoftext|> token from being generated.
logprobs
integer or null
Optional
Defaults to null

Include the log probabilities on the logprobs most likely output tokens, as well the chosen tokens. For example, if logprobs is 5, the API will return a list of the 5 most likely tokens. The API will always return the logprob of the sampled token, so there may be up to logprobs+1 elements in the response.

The maximum value for logprobs is 5.
max_tokens
integer or null
Optional
Defaults to 16

The maximum number of tokens that can be generated in the completion.

The token count of your prompt plus max_tokens cannot exceed the model’s context length. Example Python code for counting tokens.
n
integer or null
Optional
Defaults to 1

How many completions to generate for each prompt.

Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop.
presence_penalty
number or null
Optional
Defaults to 0

Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model’s likelihood to talk about new topics.

See more information about frequency and presence penalties.
seed
integer or null
Optional

If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.

Determinism is not guaranteed, and you should refer to the system_fingerprint response parameter to monitor changes in the backend.
stop
string / array / null
Optional
Defaults to null

Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence.
stream
boolean or null
Optional
Defaults to false

Whether to stream back partial progress. If set, tokens will be sent as data-only server-sent events as they become available, with the stream terminated by a data: [DONE] message. Example Python code.
suffix
string or null
Optional
Defaults to null

The suffix that comes after a completion of inserted text.
temperature
number or null
Optional
Defaults to 1

What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.

We generally recommend altering this or top_p but not both.
top_p
number or null
Optional
Defaults to 1

An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.

We generally recommend altering this or temperature but not both.
user
string
Optional

A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. Learn more.

Response, 2500 tokens (much shorter output, and then the language devolves into repeating nonsense, even though this was set to top_p=0.01 for high reliability on a task that shouldn’t need temperature to break up repeats)

പൂർത്തിയാക്കൽകൾ (പഴയതായി)

ഒരു പ്രോംപ്റ്റ് നൽകിയാൽ, മോഡൽ ഒരു അല്ലെങ്കിൽ അതിന്റെ സ്ഥിരതയും പ്രവർത്തനത്തിന്റെ സാധ്യതകളും ഒരു അല്ലെങ്കിൽ അതിന്റെ വിവരണം കാണുന്നതിനായി നിങ്ങളുടെ അനുവദനീയ മോഡൽ ഉപയോഗിക്കാം. നിങ്ങൾക്ക് നമ്മുടെ ചാറ്റ് പൂർത്തിയാക്കൽ API ഉപയോഗിക്കാനും നമ്മുടെ ഏറ്റവും മുതിര്‍ന്ന മോഡലുകളില്‍ ഉപയോഗിക്കാനും അധികം ഡെവലപ്പറുകള്‍ ഉപയോഗിക്കാം. ലക്ഷ്യം പിന്തുണയ്ക്കുന്ന പഴയ പൂർത്തിയാക്കൽ എൻഡ്‌പോയിന്റ് പിന്തുണയ്ക്കും ജനുവരി 4, 2024 ന് ഓഫ് ചെയ്യും.
പൂർത്തിയാക്കൽലക്ഷ്യംസാധാരണയായി നിങ്ങൾക്ക് നൽകിയ പ്രോംപ്റ്റുകളുടെ ഒരോ പ്രവർത്തനവും പ്രവർത്തിക്കും ഒരു പൂർത്തിയാക്കൽ സൃഷ്ടിക്കും.
അഭ്യർത്ഥനാ ശരിക്കും
മോഡൽ
സ്ട്രിംഗ്
ആവശ്യമാണ്

ഉപയോഗിക്കാനുള്ള മോഡൽയുടെ ഐഡി. നിങ്ങൾ നിങ്ങളുടെ ലഭ്യമായ മോഡലുകൾക്ക് എല്ലാം കാണാം അല്ലെങ്കിൽ അവയുടെ വിവരണം കാണാം നമ്മുടെ മോഡൽ അവലോകനം എന്നിവയിൽ.
പ്രോംപ്റ്റ്
സ്ട്രിംഗ് അല്ലെങ്കിൽ അറേയായി
ആവശ്യമാണ്

പൂർത്തിയാക്കലുകൾ സൃഷ്ടിക്കാൻ, ഒരു സ്ട്രിംഗ്, സ്ട്രിംഗുകളുടെ അറേയും, ടോക്കൺകളുടെ അറേയും, അല്ലെങ്കിൽ ടോക്കൺ അറേയുകളുടെ അറേയും ആയി എൻകോഡുചെയ്തിരിക്കാം.

ഗണിതശാസ്ത്രം പഠിക്കുന്നതിന് നിങ്ങൾക്ക് അറേയും പരിധിയിലെ പൂർത്തിയാക്കലുകൾ സൃഷ്ടിക്കാനും നിങ്ങൾക്ക് അറേയും പരിധിയിലെ പൂർത്തിയാക്കലുകൾ സൃഷ്ടിക്കാനും നിങ്ങൾക്ക് അറേയും പരിധിയിലെ ടോക്കൺ അറേയും സൃഷ്ടിക്കാനും നിങ്ങൾക്ക് അറേയും പരിധിയിലെ ടോക്കൺ അറേയും സൃഷ്ടിക്കാനും നിങ്ങൾക്ക് അറേയും പരിധിയിലെ ടോക്കൺ അറേയും സൃഷ്ടിക്കാനും നിങ്ങൾക്ക് അറേയും പരിധിയിലെ ടോക്കൺ അറേയും സൃഷ്ടിക്കാനും നിങ്ങൾക്ക് അറേയും പരിധിയിലെ ടോക്കൺ അറേയും സൃഷ്ടിക്കാനും നിങ്ങൾക്ക് അറേയും പരിധിയിലെ ടോക്കൺ അറേയും സൃഷ്ടിക്കാനും നിങ്ങൾക്ക് അറേയും പരിധിയിലെ ടോക്കൺ അറേയും സൃഷ്ടിക്കാനും നിങ്ങൾക്ക് അറേയു

That poor text shows that smaller tasks and more instruction is necessary, and you may need to limit to languages the AI has more training on.

My question is if there are 3000 words in a page is it possible to translate it using single request using gpt-3.5-turbo-instruct model

Because of the model context length, and the amplification of token usage in certain world languages, you might not even be able to SEND 3000 words, let alone have enough remaining space for formation of an answer.

Here is an online tool that will help you understand the words-to-token usage.

https://platform.openai.com/tokenizer

If languages were symmetric, the most you could expect is 2000 in, 2000 out. The AI will be hesitant and unable to write that much with high quality, though.

You should use chunking and splitting algorithms to have smaller passages translated at a time, and then reassemble them.

Would you mind sharing how you got access to ChatGPT-35?

Flux capacitor ate his . and drank his T

Edit: Actually, it’s called GPT-35 on azure

image

What are the gpt4 models for language translation.

All GPT-4 models can translate languages.

At 3x the input cost, the non-turbo gpt-4 or less safety-clouded gpt-4-0314 will give the highest quality.


I used this code for language translation in gpt-3.5-turbo-instruct . But when I am using gpt4 model its showing message like below

This is a chat model and not supported in the v1/completions endpoint. Did you mean to use v1/chat/completions? [type] => invalid_request_error [param] => model [code] => ) )

Language translation model for gpt 4 any solution to the above question?