zazaman commited on
Commit
31aee82
·
1 Parent(s): bb5b92d

Simplify translation prompt to reduce reasoning time

Browse files
Files changed (1) hide show
  1. llm_clients/qwen_translator.py +2 -1
llm_clients/qwen_translator.py CHANGED
@@ -12,7 +12,7 @@ from pathlib import Path
12
  from .base import LlmClient
13
 
14
 
15
- TRANSLATION_SYSTEM_INSTRUCTIONS = """You are a professional translator. Translate the user's text to English. Preserve the meaning, tone, and intent exactly. Return only the English translation, no additional commentary or explanation."""
16
 
17
 
18
  class QwenTranslatorClient(LlmClient):
@@ -316,6 +316,7 @@ class QwenTranslatorClient(LlmClient):
316
 
317
  def _build_translation_prompt(self, user_text: str) -> str:
318
  """Build a prompt for translation to English using Qwen's chat format."""
 
319
  prompt = f"""<|im_start|>system
320
  {TRANSLATION_SYSTEM_INSTRUCTIONS}<|im_end|>
321
  <|im_start|>user
 
12
  from .base import LlmClient
13
 
14
 
15
+ TRANSLATION_SYSTEM_INSTRUCTIONS = """Translate the text to English. Output only the translation, nothing else."""
16
 
17
 
18
  class QwenTranslatorClient(LlmClient):
 
316
 
317
  def _build_translation_prompt(self, user_text: str) -> str:
318
  """Build a prompt for translation to English using Qwen's chat format."""
319
+ # Use a very simple, direct prompt to minimize reasoning
320
  prompt = f"""<|im_start|>system
321
  {TRANSLATION_SYSTEM_INSTRUCTIONS}<|im_end|>
322
  <|im_start|>user