Open-source AI large models such as DeepSeek and Qwen perform excellently. With the help of tools like Ollama and LM Studio, we can easily build large model services locally and integrate them into various AI applications, such as video translation software.
However, limited by the video memory of personal computers, locally deployed large models are usually smaller, such as 1.5B, 7B, 14B, or 32B.
The DeepSeek official online AI service uses the r1 model, which has as many as 671B parameters. This huge difference means that the intelligence of local models is relatively limited. You can't use them as freely as online models, otherwise you may encounter various strange problems, such as the translation results containing prompts, mixed original and translated texts, and even garbled characters.
The root cause is that small models are not intelligent enough and have weak understanding and execution capabilities for complex prompts.
Therefore, when using local large models for video translation, you need to pay attention to the following points to obtain better translation results:
I. Correctly Configure the API Settings of the Video Translation Software
Fill in the API address of the locally deployed model in the API Interface Address
under Translation Settings --> Compatible AI and Local Large Models of the video translation software. Usually, the API interface address should end with /v1
.
- If your API interface is set with an API Key, please fill it in the SK text box. If it is not set, just fill in any value, such as
1234
, but do not leave it blank. - Fill in the model name in the Fill in all available models text box. Note: Some model names may have size information after them, such as
deepseek-r1:8b
, and the:8b
at the end also needs to be filled in.
II. Prioritize Larger and Newer Models
- It is recommended to choose models with at least 7B parameters. If conditions permit, try to choose models larger than 14B. Of course, the larger the model, the better the effect, provided your computer performance allows.
- If using the Tongyi Qianwen series models, prioritize the qwen2.5 series instead of the 1.5 or 2.0 series.
III. Uncheck the "Send Complete Subtitles" Option in the Video Translation Software
Unless the size of the model you deploy is greater than or equal to 70B, checking "Send Complete Subtitles" may cause errors in the subtitle translation results.
IV. Reasonably Set the Number of Subtitle Lines Parameter
Set both the Traditional Translation Subtitle Lines and AI Translation Subtitle Lines in the video translation software to smaller values, such as 1, 5, or 10. This can avoid the problem of too many blank lines and improve the reliability of the translation.
The smaller the value, the lower the possibility of translation errors, but the translation quality will also decrease; the larger the value, the better the translation quality when there are no errors, but it is also easier to make mistakes.
V. Simplify Prompts
When the model is small, it may not be able to understand or have poor instruction following. At this time, you can simplify the prompts to make them simple and clear.
For example, the prompt in the default Software Directory/videotrans/localllm.txt
file may be more complex. When you find that the translation results are not satisfactory, you can try to simplify it.
Simplified Example 1:
# Role
You are a translation assistant who can translate the text within the <INPUT> tags into {lang}.
## Requirements
- The number of translated lines must be equal to the number of original lines.
- Translate literally, do not interpret the original text.
- Only return the translated text, do not return the original text.
- If you cannot translate, please return a blank line, do not apologize, and do not explain the reason.
## Output Format:
Directly output the translated text, do not output any other prompts, such as explanations, guide characters, etc.
<INPUT></INPUT>
Translation result:
Simplified Example 2:
You are a translation assistant, translate the following text into {lang}, keep the number of lines unchanged, only return the translated text, and return a blank line if you cannot translate.
Text to be translated:
<INPUT></INPUT>
Translation result:
Simplified Example 3:
Translate the following text into {lang}, keep the number of lines consistent. Leave blank if you cannot translate.
<INPUT></INPUT>
Translation result:
You can also further simplify and optimize the prompts according to the actual situation.
Through the above optimizations, even smaller local large models can play a greater role in video translation, reduce errors, improve translation quality, and bring you a better local AI experience.