[GH-ISSUE #9001] how to use deepseek for translate #52359

Closed
opened 2026-04-28 23:05:40 -05:00 by GiteaMirror · 12 comments
Owner

Originally created by @leizhu1989 on GitHub (Feb 11, 2025).
Original GitHub issue: https://github.com/ollama/ollama/issues/9001

When I use Deepseek for translation tasks, I always randomly output Chinese or English. Is it possible that the prompt words are written incorrectly

my prompt is {"content": "你是一个中英文翻译专家,将用户输入的中文翻译成英文,或将用户输入的英文翻译成中文","role": "system"}, {"content": "You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag", "role":"user"}

result:
"role":"assistant","content":"\n好,我现在需要帮用户翻译这句话。首先看一下原文:“You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.” 这段话有点长,内容是关于DeepSeek-R1模型和Ollama模型的提示引导。\n\n首先,我要确定这句话的结构。第一句说他们可能在使用DeepSeek-R1模型。第二句解释了标签出现的原因,是因为DeepSeek本身产生的,而不是Ollama控制的。第三句建议通过定制Ollama模型来避免这个标签,具体方法是添加一个提示来指导模型不生成该标签。\n\n翻译时需要注意专业术语和准确性。“DeepSeek-R1 model”可以译为“DeepSeek-R1 模型”,保持原样。“tag”在这里可能指的是特定的输出或标记,所以用“标记”比较合适。避免直译,确保意思清晰。\n\n接下来是句子的结构,“To avoid this tag in the output, you can try...”翻译成英文时要自然流畅。建议部分可以用“you can try”或者“you might consider”,保持口语化但不失正式感。\n\n最后检查整个翻译是否通顺,信息是否有遗漏或误译的地方。“customizing the Ollama model by adding a prompt”可以翻译为“通过向 Ollama 模型添加提示来定制模型”。这里的“customizing”用“customizing”比较准确,“prompt”直译为“提示”也合适。\n\n整体来看,用户的需求是将一段中文技术性的句子翻译成英文,可能用于AI模型的使用或技术支持。深层需求可能是希望保持专业性和准确性,同时让对方理解到具体的解决方法。\n\n\nYou are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.\n\n(建议:使用“customizing”而不是直译为中文的“定制”;“prompt”直接翻译成“提示”比较准确。

"role":"assistant","content":"\n好,我现在需要帮用户翻译这句话。首先看原文:“你可能是在使用DeepSeek-R1模型。标签似乎是DeepSeek模型本身输出的一部分,而不是由Ollama控制的。为了避免这个标签在输出中出现,你可以尝试通过添加一个提示来定制Ollama模型,引导它避免生成这个标签。” \n\n这句话有点长,结构也比较复杂。首先,要确定用户的需求是什么。他们可能是在使用Ollama,所以想了解如何防止DeepSeek-R1模型的标签出现在输出里。或者他们可能对AI模型有疑问,想要控制生成内容。\n\n接下来,分析句子中的关键点:“DeepSeek-R1模型”、“标签”、“Ollama”、“添加提示”、“定制模型”。翻译时要准确表达这些���语和概念。比如,“DeepSeek-R1 model”应该直译成“DeepSeek-R1 模型”,保持技术细节的准确性。\n\n然后,考虑句子的逻辑关系。“You are probably using...” 这部分是推测用户的使用场景,所以用“Probably”比较合适。“The tag seems to be part of the output”翻译成“标签似乎是输出的一部分”更自然。后面的建议部分,“try customizing Ollama model by adding a prompt”要表达得清楚,可以译为“尝试通过添加一个提示来定制 Ollama 模型”。\n\n还要注意句子的流畅性,避免直译导致的生硬感。例如,原文中的“引导它避免生成”在中文里可以说成“引导模型避开生成”,这样更符合中文表达习惯。\n\n最后,检查整个翻译是否准确传达了原意,有没有遗漏关键信息。确保技术术语正确,语气友好,适合用户阅读。\n\n\nProbably you're using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides it to avoid generating the label.

"role":"assistant","content":"\nAlright, so I've got this query here where the user wants me to translate some content from Chinese to English or vice versa based on what's provided. Let me break it down.\n\nFirst, I see the user is using an AI assistant from Tianjiayuan Cloud Tech Co., Ltd., which translates to "AIGenius-R1" in English. My role here is to assist them by translating content they provide, but only in Chinese if needed.\n\nLooking at their specific request: they want me to handle a translation where I should check if the content is in Chinese or English and then translate it accordingly. If it's already in one language, I translate it into the other. That makes sense because sometimes users might switch between languages without realizing it.\n\nNow, the actual text provided for translation is:\n"You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag."\n\nWait, hold on. This text is actually in English, so I should translate it into Chinese as per their instruction.\n\nBut before translating, let me understand the context. It seems like they're talking about using an AI model (DeepSeek-R1) and facing an issue with a specific output tag generated by DeepSeek itself. They suggest customizing Ollama to prevent that tag from appearing in outputs by adding a prompt.\n\nSo my task is straightforward: take this English text, translate it into Chinese accurately, ensuring the technical terms like "model," "tag," "Ollama," and "prompt" are correctly translated.\n\nI should make sure the translation maintains the original meaning without losing any technical details. It's important to convey that they're using DeepSeek-R1, which is their AI model, and there's an issue with a tag from DeepSeek; to fix it, they can adjust Ollama by adding a specific prompt.\n\nAdditionally, I need to ensure proper grammar and readability in the translated text so that the message comes across clearly. Since this seems like documentation or technical communication, clarity is key.\n\nOnce translated, I'll present it back to them in Chinese, as per their instructions, without any additional tags unless necessary.\n\n\n你可能在使用DeepSeek-R1模型。标签似乎来自DeepSeek模型的输出,而不是由Ollama控制的部分。要避免此标签出现在输出中,你可以尝试通过添加引导模型避免生成该标签的提示来定制Ollama模型。

whis is the reason?

Originally created by @leizhu1989 on GitHub (Feb 11, 2025). Original GitHub issue: https://github.com/ollama/ollama/issues/9001 When I use Deepseek for translation tasks, I always randomly output Chinese or English. Is it possible that the prompt words are written incorrectly my prompt is {"content": "你是一个中英文翻译专家,将用户输入的中文翻译成英文,或将用户输入的英文翻译成中文","role": "system"}, {"content": "You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag", "role":"user"} result: "role":"assistant","content":"<think>\n好,我现在需要帮用户翻译这句话。首先看一下原文:“You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.” 这段话有点长,内容是关于DeepSeek-R1模型和Ollama模型的提示引导。\n\n首先,我要确定这句话的结构。第一句说他们可能在使用DeepSeek-R1模型。第二句解释了标签出现的原因,是因为DeepSeek本身产生的,而不是Ollama控制的。第三句建议通过定制Ollama模型来避免这个标签,具体方法是添加一个提示来指导模型不生成该标签。\n\n翻译时需要注意专业术语和准确性。“DeepSeek-R1 model”可以译为“DeepSeek-R1 模型”,保持原样。“tag”在这里可能指的是特定的输出或标记,所以用“标记”比较合适。避免直译,确保意思清晰。\n\n接下来是句子的结构,“To avoid this tag in the output, you can try...”翻译成英文时要自然流畅。建议部分可以用“you can try”或者“you might consider”,保持口语化但不失正式感。\n\n最后检查整个翻译是否通顺,信息是否有遗漏或误译的地方。“customizing the Ollama model by adding a prompt”可以翻译为“通过向 Ollama 模型添加提示来定制模型”。这里的“customizing”用“customizing”比较准确,“prompt”直译为“提示”也合适。\n\n整体来看,用户的需求是将一段中文技术性的句子翻译成英文,可能用于AI模型的使用或技术支持。深层需求可能是希望保持专业性和准确性,同时让对方理解到具体的解决方法。\n</think>\n\nYou are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.\n\n(建议:使用“customizing”而不是直译为中文的“定制”;“prompt”直接翻译成“提示”比较准确。 "role":"assistant","content":"<think>\n好,我现在需要帮用户翻译这句话。首先看原文:“你可能是在使用DeepSeek-R1模型。标签似乎是DeepSeek模型本身输出的一部分,而不是由Ollama控制的。为了避免这个标签在输出中出现,你可以尝试通过添加一个提示来定制Ollama模型,引导它避免生成这个标签。” \n\n这句话有点长,结构也比较复杂。首先,要确定用户的需求是什么。他们可能是在使用Ollama,所以想了解如何防止DeepSeek-R1模型的标签出现在输出里。或者他们可能对AI模型有疑问,想要控制生成内容。\n\n接下来,分析句子中的关键点:“DeepSeek-R1模型”、“标签”、“Ollama”、“添加提示”、“定制模型”。翻译时要准确表达这些���语和概念。比如,“DeepSeek-R1 model”应该直译成“DeepSeek-R1 模型”,保持技术细节的准确性。\n\n然后,考虑句子的逻辑关系。“You are probably using...” 这部分是推测用户的使用场景,所以用“Probably”比较合适。“The tag seems to be part of the output”翻译成“标签似乎是输出的一部分”更自然。后面的建议部分,“try customizing Ollama model by adding a prompt”要表达得清楚,可以译为“尝试通过添加一个提示来定制 Ollama 模型”。\n\n还要注意句子的流畅性,避免直译导致的生硬感。例如,原文中的“引导它避免生成”在中文里可以说成“引导模型避开生成”,这样更符合中文表达习惯。\n\n最后,检查整个翻译是否准确传达了原意,有没有遗漏关键信息。确保技术术语正确,语气友好,适合用户阅读。\n</think>\n\nProbably you're using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides it to avoid generating the label. "role":"assistant","content":"<think>\nAlright, so I've got this query here where the user wants me to translate some content from Chinese to English or vice versa based on what's provided. Let me break it down.\n\nFirst, I see the user is using an AI assistant from Tianjiayuan Cloud Tech Co., Ltd., which translates to \"AIGenius-R1\" in English. My role here is to assist them by translating content they provide, but only in Chinese if needed.\n\nLooking at their specific request: they want me to handle a translation where I should check if the content is in Chinese or English and then translate it accordingly. If it's already in one language, I translate it into the other. That makes sense because sometimes users might switch between languages without realizing it.\n\nNow, the actual text provided for translation is:\n\"You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.\"\n\nWait, hold on. This text is actually in English, so I should translate it into Chinese as per their instruction.\n\nBut before translating, let me understand the context. It seems like they're talking about using an AI model (DeepSeek-R1) and facing an issue with a specific output tag generated by DeepSeek itself. They suggest customizing Ollama to prevent that tag from appearing in outputs by adding a prompt.\n\nSo my task is straightforward: take this English text, translate it into Chinese accurately, ensuring the technical terms like \"model,\" \"tag,\" \"Ollama,\" and \"prompt\" are correctly translated.\n\nI should make sure the translation maintains the original meaning without losing any technical details. It's important to convey that they're using DeepSeek-R1, which is their AI model, and there's an issue with a tag from DeepSeek; to fix it, they can adjust Ollama by adding a specific prompt.\n\nAdditionally, I need to ensure proper grammar and readability in the translated text so that the message comes across clearly. Since this seems like documentation or technical communication, clarity is key.\n\nOnce translated, I'll present it back to them in Chinese, as per their instructions, without any additional tags unless necessary.\n</think>\n\n你可能在使用DeepSeek-R1模型。标签似乎来自DeepSeek模型的输出,而不是由Ollama控制的部分。要避免此标签出现在输出中,你可以尝试通过添加引导模型避免生成该标签的提示来定制Ollama模型。 whis is the reason?
GiteaMirror added the feature request label 2026-04-28 23:05:40 -05:00
Author
Owner

@leizhu1989 commented on GitHub (Feb 11, 2025):

I use 7b model

<!-- gh-comment-id:2649757831 --> @leizhu1989 commented on GitHub (Feb 11, 2025): I use 7b model
Author
Owner

@rick-github commented on GitHub (Feb 11, 2025):

This is mostly the "reasoning" part of what the model does - it evaluates various approaches before generating the final output, which in this case, appear to be correctly translated: "你可能在使用DeepSeek-R1模型。标签似乎来自DeepSeek模型的输出,而不是由Ollama控制的部分。要避免此标签出现在输出中,你可以尝试通过添加引导模型避免生成该标签的提示来定制Ollama模型。". However, it looks like you have already followed this advice, because the "reasoning" part is normally surrounded by <think></think> tags that would allow you to distinguish the "reasoning" from the the final answer. Also, because this output is neither a stream nor the single output of an API call with "stream":false, there is presumably some processing done by your client. This may be why the think tags are missing.

<!-- gh-comment-id:2650285916 --> @rick-github commented on GitHub (Feb 11, 2025): This is mostly the "reasoning" part of what the model does - it evaluates various approaches before generating the final output, which in this case, appear to be correctly translated: "你可能在使用DeepSeek-R1模型。标签似乎来自DeepSeek模型的输出,而不是由Ollama控制的部分。要避免此标签出现在输出中,你可以尝试通过添加引导模型避免生成该标签的提示来定制Ollama模型。". However, it looks like you have already followed this advice, because the "reasoning" part is normally surrounded by `<think></think>` tags that would allow you to distinguish the "reasoning" from the the final answer. Also, because this output is neither a stream nor the single output of an API call with `"stream":false`, there is presumably some processing done by your client. This may be why the `think` tags are missing.
Author
Owner

@leizhu1989 commented on GitHub (Feb 12, 2025):

Sorry, maybe I didn't explain it clearly. I want to express why when translating from English to Chinese, the output often remains in English. There seems to be no problem with the format of my prompt words, and I would like to know what might be the reason

input: {"content": "你是一个中英文翻译专家,将用户输入的中文翻译成英文,或将用户输入的英文翻译成中文","role": "system"}, {"content": "You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag", "role":"user"}

output:
"role":"assistant","content":"\n好,我现在需要帮用户翻译这句话。首先看一下原文:“You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.” 这段话有点长,内容是关于DeepSeek-R1模型和Ollama模型的提示引导。\n\n首先,我要确定这句话的结构。第一句说他们可能在使用DeepSeek-R1模型。第二句解释了标签出现的原因,是因为DeepSeek本身产生的,而不是Ollama控制的。第三句建议通过定制Ollama模型来避免这个标签,具体方法是添加一个提示来指导模型不生成该标签。\n\n翻译时需要注意专业术语和准确性。“DeepSeek-R1 model”可以译为“DeepSeek-R1 模型”,保持原样。“tag”在这里可能指的是特定的输出或标记,所以用“标记”比较合适。避免直译,确保意思清晰。\n\n接下来是句子的结构,“To avoid this tag in the output, you can try...”翻译成英文时要自然流畅。建议部分可以用“you can try”或者“you might consider”,保持口语化但不失正式感。\n\n最后检查整个翻译是否通顺,信息是否有遗漏或误译的地方。“customizing the Ollama model by adding a prompt”可以翻译为“通过向 Ollama 模型添加提示来定制模型”。这里的“customizing”用“customizing”比较准确,“prompt”直译为“提示”也合适。\n\n整体来看,用户的需求是将一段中文技术性的句子翻译成英文,可能用于AI模型的使用或技术支持。深层需求可能是希望保持专业性和准确性,同时让对方理解到具体的解决方法。\n\n\nYou are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.\n\n(建议:使用“customizing”而不是直译为中文的“定制”;“prompt”直接翻译成“提示”比较准确。)"

<!-- gh-comment-id:2652794347 --> @leizhu1989 commented on GitHub (Feb 12, 2025): Sorry, maybe I didn't explain it clearly. I want to express why when translating from English to Chinese, the output often remains in English. There seems to be no problem with the format of my prompt words, and I would like to know what might be the reason input: {"content": "你是一个中英文翻译专家,将用户输入的中文翻译成英文,或将用户输入的英文翻译成中文","role": "system"}, {"content": "You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag", "role":"user"} output: "role":"assistant","content":"<think>\n好,我现在需要帮用户翻译这句话。首先看一下原文:“You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.” 这段话有点长,内容是关于DeepSeek-R1模型和Ollama模型的提示引导。\n\n首先,我要确定这句话的结构。第一句说他们可能在使用DeepSeek-R1模型。第二句解释了标签出现的原因,是因为DeepSeek本身产生的,而不是Ollama控制的。第三句建议通过定制Ollama模型来避免这个标签,具体方法是添加一个提示来指导模型不生成该标签。\n\n翻译时需要注意专业术语和准确性。“DeepSeek-R1 model”可以译为“DeepSeek-R1 模型”,保持原样。“tag”在这里可能指的是特定的输出或标记,所以用“标记”比较合适。避免直译,确保意思清晰。\n\n接下来是句子的结构,“To avoid this tag in the output, you can try...”翻译成英文时要自然流畅。建议部分可以用“you can try”或者“you might consider”,保持口语化但不失正式感。\n\n最后检查整个翻译是否通顺,信息是否有遗漏或误译的地方。“customizing the Ollama model by adding a prompt”可以翻译为“通过向 Ollama 模型添加提示来定制模型”。这里的“customizing”用“customizing”比较准确,“prompt”直译为“提示”也合适。\n\n整体来看,用户的需求是将一段中文技术性的句子翻译成英文,可能用于AI模型的使用或技术支持。深层需求可能是希望保持专业性和准确性,同时让对方理解到具体的解决方法。\n</think>\n\nYou are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.\n\n(建议:使用“customizing”而不是直译为中文的“定制”;“prompt”直接翻译成“提示”比较准确。)"
Author
Owner

@leizhu1989 commented on GitHub (Feb 12, 2025):

@rick-github thank you for your reply

<!-- gh-comment-id:2652795054 --> @leizhu1989 commented on GitHub (Feb 12, 2025): @rick-github thank you for your reply
Author
Owner

@leizhu1989 commented on GitHub (Feb 12, 2025):

@rick-github My goodness, the "" and "" I entered are missing, and the GitHub page cannot display them
the “” is before "\n\nYou are probably using"

output:
"role":"assistant","content":"“”\n好,我现在需要帮用户翻译这句话。首先看一下原文:“You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.” 这段话有点长,内容是关于DeepSeek-R1模型和Ollama模型的提示引导。\n\n首先,我要确定这句话的结构。第一句说他们可能在使用DeepSeek-R1模型。第二句解释了标签出现的原因,是因为DeepSeek本身产生的,而不是Ollama控制的。第三句建议通过定制Ollama模型来避免这个标签,具体方法是添加一个提示来指导模型不生成该标签。\n\n翻译时需要注意专业术语和准确性。“DeepSeek-R1 model”可以译为“DeepSeek-R1 模型”,保持原样。“tag”在这里可能指的是特定的输出或标记,所以用“标记”比较合适。避免直译,确保意思清晰。\n\n接下来是句子的结构,“To avoid this tag in the output, you can try...”翻译成英文时要自然流畅。建议部分可以用“you can try”或者“you might consider”,保持口语化但不失正式感。\n\n最后检查整个翻译是否通顺,信息是否有遗漏或误译的地方。“customizing the Ollama model by adding a prompt”可以翻译为“通过向 Ollama 模型添加提示来定制模型”。这里的“customizing”用“customizing”比较准确,“prompt”直译为“提示”也合适。\n\n整体来看,用户的需求是将一段中文技术性的句子翻译成英文,可能用于AI模型的使用或技术支持。深层需求可能是希望保持专业性和准确性,同时让对方理解到具体的解决方法。\n””\n\nYou are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.\n\n(建议:使用“customizing”而不是直译为中文的“定制”;“prompt”直接翻译成“提示”比较准确。)"

<!-- gh-comment-id:2652889917 --> @leizhu1989 commented on GitHub (Feb 12, 2025): @rick-github My goodness, the "<think>" and "</think>" I entered are missing, and the GitHub page cannot display them the “</think>” is before "\n\nYou are probably using" output: "role":"assistant","content":"“<think>”\n好,我现在需要帮用户翻译这句话。首先看一下原文:“You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.” 这段话有点长,内容是关于DeepSeek-R1模型和Ollama模型的提示引导。\n\n首先,我要确定这句话的结构。第一句说他们可能在使用DeepSeek-R1模型。第二句解释了标签出现的原因,是因为DeepSeek本身产生的,而不是Ollama控制的。第三句建议通过定制Ollama模型来避免这个标签,具体方法是添加一个提示来指导模型不生成该标签。\n\n翻译时需要注意专业术语和准确性。“DeepSeek-R1 model”可以译为“DeepSeek-R1 模型”,保持原样。“tag”在这里可能指的是特定的输出或标记,所以用“标记”比较合适。避免直译,确保意思清晰。\n\n接下来是句子的结构,“To avoid this tag in the output, you can try...”翻译成英文时要自然流畅。建议部分可以用“you can try”或者“you might consider”,保持口语化但不失正式感。\n\n最后检查整个翻译是否通顺,信息是否有遗漏或误译的地方。“customizing the Ollama model by adding a prompt”可以翻译为“通过向 Ollama 模型添加提示来定制模型”。这里的“customizing”用“customizing”比较准确,“prompt”直译为“提示”也合适。\n\n整体来看,用户的需求是将一段中文技术性的句子翻译成英文,可能用于AI模型的使用或技术支持。深层需求可能是希望保持专业性和准确性,同时让对方理解到具体的解决方法。\n”</think>”\n\nYou are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.\n\n(建议:使用“customizing”而不是直译为中文的“定制”;“prompt”直接翻译成“提示”比较准确。)"
Author
Owner

@leizhu1989 commented on GitHub (Feb 12, 2025):

@rick-github My goodness, the "think" and "think" I entered are missing, and the GitHub page cannot display them
the “think” is before "\n\nYou are probably using"

output:
"role":"assistant","content":"“think”\n好,我现在需要帮用户翻译这句话。首先看一下原文:“You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.” 这段话有点长,内容是关于DeepSeek-R1模型和Ollama模型的提示引导。\n\n首先,我要确定这句话的结构。第一句说他们可能在使用DeepSeek-R1模型。第二句解释了标签出现的原因,是因为DeepSeek本身产生的,而不是Ollama控制的。第三句建议通过定制Ollama模型来避免这个标签,具体方法是添加一个提示来指导模型不生成该标签。\n\n翻译时需要注意专业术语和准确性。“DeepSeek-R1 model”可以译为“DeepSeek-R1 模型”,保持原样。“tag”在这里可能指的是特定的输出或标记,所以用“标记”比较合适。避免直译,确保意思清晰。\n\n接下来是句子的结构,“To avoid this tag in the output, you can try...”翻译成英文时要自然流畅。建议部分可以用“you can try”或者“you might consider”,保持口语化但不失正式感。\n\n最后检查整个翻译是否通顺,信息是否有遗漏或误译的地方。“customizing the Ollama model by adding a prompt”可以翻译为“通过向 Ollama 模型添加提示来定制模型”。这里的“customizing”用“customizing”比较准确,“prompt”直译为“提示”也合适。\n\n整体来看,用户的需求是将一段中文技术性的句子翻译成英文,可能用于AI模型的使用或技术支持。深层需求可能是希望保持专业性和准确性,同时让对方理解到具体的解决方法。\n”think”\n\nYou are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.\n\n(建议:使用“customizing”而不是直译为中文的“定制”;“prompt”直接翻译成“提示”比较准确。)"

<!-- gh-comment-id:2652892912 --> @leizhu1989 commented on GitHub (Feb 12, 2025): @rick-github My goodness, the "think" and "think" I entered are missing, and the GitHub page cannot display them the “think” is before "\n\nYou are probably using" output: "role":"assistant","content":"“think”\n好,我现在需要帮用户翻译这句话。首先看一下原文:“You are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.” 这段话有点长,内容是关于DeepSeek-R1模型和Ollama模型的提示引导。\n\n首先,我要确定这句话的结构。第一句说他们可能在使用DeepSeek-R1模型。第二句解释了标签出现的原因,是因为DeepSeek本身产生的,而不是Ollama控制的。第三句建议通过定制Ollama模型来避免这个标签,具体方法是添加一个提示来指导模型不生成该标签。\n\n翻译时需要注意专业术语和准确性。“DeepSeek-R1 model”可以译为“DeepSeek-R1 模型”,保持原样。“tag”在这里可能指的是特定的输出或标记,所以用“标记”比较合适。避免直译,确保意思清晰。\n\n接下来是句子的结构,“To avoid this tag in the output, you can try...”翻译成英文时要自然流畅。建议部分可以用“you can try”或者“you might consider”,保持口语化但不失正式感。\n\n最后检查整个翻译是否通顺,信息是否有遗漏或误译的地方。“customizing the Ollama model by adding a prompt”可以翻译为“通过向 Ollama 模型添加提示来定制模型”。这里的“customizing”用“customizing”比较准确,“prompt”直译为“提示”也合适。\n\n整体来看,用户的需求是将一段中文技术性的句子翻译成英文,可能用于AI模型的使用或技术支持。深层需求可能是希望保持专业性和准确性,同时让对方理解到具体的解决方法。\n”think”\n\nYou are probably using the DeepSeek-R1 model. The tag seems to be part of the output from the DeepSeek model itself, rather than something controlled by Ollama. To avoid this tag in the output, you can try customizing the Ollama model by adding a prompt that guides the model to avoid generating the tag.\n\n(建议:使用“customizing”而不是直译为中文的“定制”;“prompt”直接翻译成“提示”比较准确。)"
Author
Owner

@rick-github commented on GitHub (Feb 12, 2025):

OK, I understand: <> are interpreted as HTML so are not properly rendered. You can either prefix with a backslash: \<think\>, or use code markdown: `<think>` or
```
<think>
```
The reason it outputs English is that is the way it was trained to reason. Strictly speaking, it's not outputting English - the corpus of knowledge it was trained in was converted to tokens and embedded in the model weights, so internally it's using its own language - the tokens - that happens to overlap both English and Chinese.

<!-- gh-comment-id:2653143973 --> @rick-github commented on GitHub (Feb 12, 2025): OK, I understand: \<\> are interpreted as HTML so are not properly rendered. You can either prefix with a backslash: \\\<think\\\>, or use code markdown: \`\<think\>\` or \`\`\` \<think\> \`\`\` The reason it outputs English is that is the way it was trained to reason. Strictly speaking, it's not outputting English - the corpus of knowledge it was trained in was converted to tokens and embedded in the model weights, so internally it's using its own language - the tokens - that happens to overlap both English and Chinese.
Author
Owner

@leizhu1989 commented on GitHub (Feb 12, 2025):

thank you for your reply.
Is there a solution to this? Because the input language is uncertain whether it is Chinese or English, it needs to be translated between Chinese and English. I want to solve it through prompt words, but I don't know if it can be resolved

<!-- gh-comment-id:2653189871 --> @leizhu1989 commented on GitHub (Feb 12, 2025): thank you for your reply. Is there a solution to this? Because the input language is uncertain whether it is Chinese or English, it needs to be translated between Chinese and English. I want to solve it through prompt words, but I don't know if it can be resolved
Author
Owner

@rick-github commented on GitHub (Feb 12, 2025):

Which model (specifically) are you using?

<!-- gh-comment-id:2653197480 --> @rick-github commented on GitHub (Feb 12, 2025): Which model (specifically) are you using?
Author
Owner

@leizhu1989 commented on GitHub (Feb 13, 2025):

@rick-github deepseek-r1:7b

<!-- gh-comment-id:2656472220 --> @leizhu1989 commented on GitHub (Feb 13, 2025): @rick-github deepseek-r1:7b
Author
Owner

@rick-github commented on GitHub (Feb 13, 2025):

deepseek-r1:7b is a distilled version of qwen2.5:7b. If you don't like the reasoning that deepseek-r1:7b does, try the Qwen model.

<!-- gh-comment-id:2656487950 --> @rick-github commented on GitHub (Feb 13, 2025): deepseek-r1:7b is a distilled version of [qwen2.5:7b](https://ollama.com/library/qwen2.5:7b). If you don't like the reasoning that deepseek-r1:7b does, try the Qwen model.
Author
Owner

@leizhu1989 commented on GitHub (Feb 14, 2025):

ok,I will try it. thank you

<!-- gh-comment-id:2658485496 --> @leizhu1989 commented on GitHub (Feb 14, 2025): ok,I will try it. thank you
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#52359