Skip to content

Open-source AI large models like DeepSeek and Qwen have shown excellent performance. With tools such as Ollama and LM Studio, we can easily set up large model services locally and integrate them into various AI applications, such as video translation software.

However, due to the limited VRAM of personal computers, locally deployed large models are usually smaller, such as 1.5B, 7B, 14B, or 32B.

The r1 model used by DeepSeek's official online AI service has a massive parameter count of 671B. This significant difference means that local models have relatively limited intelligence and cannot be used as freely as online models. Otherwise, you may encounter various strange issues, such as translation results containing prompt words, a mix of source and translated text, or even garbled characters.

The root cause is that smaller models lack sufficient intelligence and have weaker capabilities in understanding and executing complex prompts.

Therefore, when using local large models for video translation, pay attention to the following points to achieve better translation results:

1. Correctly Configure the API Settings in the Video Translation Software

Enter the API address of the locally deployed model into the API Interface Address field under Translation Settings --> Compatible AI and Local Large Models in the video translation software. Typically, the API interface address should end with /v1.

  • If your API interface requires an API Key, enter it in the SK text box. If no API Key is set, you can enter any value, such as 1234, but do not leave it blank.
  • Enter the model name in the Fill in All Available Models text box. Note: Some model names may include size information, such as deepseek-r1:8b. Make sure to include the suffix, like :8b.

image.png

image.png

2. Prioritize Models with More Parameters and Newer Versions

  1. It is recommended to choose a model with at least 7B parameters. If possible, try to select a model larger than 14B. Of course, the larger the model, the better the performance, provided your computer can handle it.
  2. If using the Tongyi Qianwen series of models, prioritize the qwen2.5 series over the 1.5 or 2.0 series.

image.png

3. Uncheck the "Send Full Subtitles" Option in the Video Translation Software

Unless the model you deploy is 70B or larger, checking the "Send Full Subtitles" option may cause errors in the subtitle translation results.

image.png

4. Set the Subtitle Line Count Parameter Appropriately

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 helps avoid issues with excessive blank lines and improves translation reliability.

A smaller value reduces the likelihood of translation errors but may lower translation quality; a larger value may yield better translation quality when no errors occur but is more prone to mistakes.

image.png

5. Simplify the Prompt

When the model is small, it may struggle to understand or follow complex instructions. In such cases, simplify the prompt to make it clear and straightforward.

For example, the default prompt in the software directory/videotrans/localllm.txt file might be too complex. If the translation results are unsatisfactory, try simplifying it.

Simplified Example 1:

# Role
You are a translation assistant capable of translating the text within the <INPUT> tags into {lang}.

## Requirements

- The number of lines in the translation must match the number of lines in the original text.
- Translate literally; do not interpret the original text.
- Return only the translation; do not include the original text.
- If translation is not possible, return empty lines without apologizing or explaining.

## Output Format:
Output the translation directly; do not include any additional prompts, explanations, or guiding characters.

<INPUT></INPUT>

Translation Result:

Simplified Example 2:

You are a translation assistant. Translate the following text into {lang}, keeping the number of lines unchanged. Return only the translation; if unable to translate, return empty lines.

Text to Translate:
<INPUT></INPUT>

Translation Result:

Simplified Example 3:

Translate the following text into {lang}, keeping the number of lines consistent. If unable to translate, leave it blank.

<INPUT></INPUT>

Translation Result:

You can further simplify and optimize the prompt based on your actual situation.

By optimizing the above points, even smaller local large models can play a greater role in video translation, reducing errors, improving translation quality, and providing a better local AI experience.