safetensors gemma2 translation thinking-turn ja en dataset:custom license:apache-2.0 region:us
---
datasets:
- custom
language:
- ja
- en
license: apache-2.0
tags:
- translation
- thinking-turn
---

# Translation Task Thinking Test Model

## Model Description

This model is based on "[google/gemma-2-2b-jpn-it](https://huggingface.co/google/gemma-2-2b-jpn-it)" and fine-tuned for Japanese-English and English-Japanese translation tasks. It includes a "thinking" turn in the chat template to potentially extend the model's reasoning time.  
このモデルは「[google/gemma-2-2b-jpn-it](https://huggingface.co/google/gemma-2-2b-jpn-it)」に基づいており、日本語から英語、英語から日本語への翻訳タスク向けに微調整されています。チャット テンプレートに「考える」ターンが含まれており、モデルの推論時間を延長する可能性があります。  

## Intended Uses & Limitations

This model is intended for research purposes in the field of machine translation. It explores the impact of adding a thinking turn on translation quality and benchmark scores. The model may produce repetitions or ignore instructions in a small percentage of cases.  
このモデルは、機械翻訳の分野での研究を目的としています。思考ターンの追加が翻訳の品質とベンチマーク スコアに与える影響を調査します。モデルは、わずかな割合で繰り返しを生成したり、指示を無視したりすることがあります。  

Also, due to some glitch when merging the LoRA adapter, the model size of this model has doubled.  
また、このモデルはLoRAアダプターのマージの際に何等かの不具合でモデルサイズが倍増してしまっています。  

## Training and Evaluation Data

The model was trained using a custom dataset. Evaluation was performed using WMT20 and WMT23 benchmark datasets.  
モデルはカスタム データセットを使用してトレーニングされました。評価は WMT20 および WMT23 ベンチマーク データセットを使用して実行されました。  

## Training Procedure

The model was fine-tuned using LoRA (Low-Rank Adaptation) techniques. Two versions were created:
1. Standard version: normal gemma chat template.  
2. Thinking version: add thinking turn to normal chat template.  

このモデルは、LoRA (Low-Rank Adaptation) 技術を使用して微調整されました。2 つのバージョンが作成されました:  
1. Standardバージョン: 通常のgemmaのチャットテンプレートを使った版  
2. Thinkingバージョン: チャット テンプレートにThinkingターンを追加した版   

## Evaluation Results 

Benchmark results show that the thinking version generally scored lower on traditional metrics (spBLEU, chrF2++, COMET, XLCOMET) compared to the standard version. 
However, evaluation using LLM Comparator showed mixed results depending on the judge model used.  
ベンチマーク結果によると、Thinkingバージョンは、Standardバージョンと比較して、従来の指標 (spBLEU、chrF2++、COMET、XLCOMET) で一般的に低いスコアを示しました。  
ただし、LLM Comparator を使用した評価では、使用した審査モデルに応じて結果がまちまちでした。  

| Version   | File   | Direction | spBLEU | chrF2++ | comet  | xlcomet |
|-----------|--------|-----------|--------|---------|--------|---------|
| Standard  | wmt20  | enja      | 17.12  | 29.7    | 0.8765 | 0.8010  |
| Standard  | wmt20  | jaen      | 18.09  | 44.2    | 0.7940 | 0.7942  |
| Standard  | wmt23  | enja      | 17.96  | 29.6    | 0.8588 | 0.8283  |
| Standard  | wmt23  | jaen      | 18.19  | 43.2    | 0.7962 | 0.8723  |
| Thinking  | wmt20  | enja      | 16.45  | 28.4    | 0.8650 | 0.7662  |
| Thinking  | wmt20  | jaen      | 18.76  | 45.9    | 0.7927 | 0.7774  |
| Thinking  | wmt23  | enja      | 16.25  | 28.0    | 0.8464 | 0.8058  |
| Thinking  | wmt23  | jaen      | 18.04  | 43.3    | 0.7862 | 0.8467  |


## [LLM Comparator](https://github.com/PAIR-code/llm-comparator) wmt23 result

[LLM Comparator](https://github.com/PAIR-code/llm-comparator) is a visualization tool being developed by Google researchers that allows for a side-by-side comparison of responses from two LLMs.  

Blue is thinking version. Brown is standards version.  
The thought process and judges' decisions can be seen in the online demo.  

[LLM Comparator](https://github.com/PAIR-code/llm-comparator)は、Googleの研究者が開発中の視覚化ツールで、2つのLLMの応答を並べて比較できます。  

青はThinkingバージョン、茶色はStandardバージョンです。  
思考の過程、及びジャッジの判断はオンラインデモで確認する事ができます。  

- gemini 1.5 flash as Judge.
  ![image/png](flash_judge.png)
  [gemini 1.5 flash as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_gemini-1.5-flash_judge.json)

 It cost about \44 yen.  
 約\44円かかりました  

- gemini 1.5 Pro as Judge.
  ![image/png](pro_judge.png)
  [gemini 1.5 pro as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_gemini-1.5-pro_judge.json)

 It cost about \360 yen.  
 おおよそ\360円かかりました  

- gemini 1.5 flash-8b as Judge.
  ![image/png](flash-8b_judge.png)
  [gemini 1.5 flash-8b as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_gemini-1.5-flash-8b_judge.json)

 It cost about \15 yen.  
 おおよそ\15円かかりました  

- gemini 2.0 flash as Judge.
  ![image/png](flash2.0_judge.png)
  [gemini 2.0 flash as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_gemini-2.0-flash_judge.json)

 It cost about \63 yen.  
 約\63円かかりました  
 
- gpt-4o-mini as Judge.
  ![image/png](gpt-4o-mini_judge.png)
  [gpt-4o-mini as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_gpt4-o-mini_judge.json)
  
 I measured it using batchAPI and it came to $0.34.  
 batchAPIを使って計測したところ0.34ドルでした。

- gpt-4o as Judge.
  ![image/png](gpt-4o_judge.png)
  [gpt-4o as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_gpt4-o_judge.json)

 I measured it using batchAPI and it came to $5.62.  
 batchAPIを使って計測したところ5.62ドルでした。
  
- claude-3-5-sonnet-20241022 as Judge.
  ![image/png](sonnet-3.5_202410.png)
  [claude-3-5-sonnet-20241022 as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_sonnet-3.5_202410_judge.json)

 I measured it using batchAPI and it came to $8.05.  
 batchAPIを使って計測したところ8.05ドルでした。  

- claude-3-5-haiku-20241022 as Judge.
  ![image/png](haiku-3.5_202410.png)
  [claude-3-5-haiku-20241022 as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_haiku-3.5_202410_judge.json)

 I measured it using batchAPI and it came to $3.35.  
 batchAPIを使って計測したところ3.35ドルでした。  

 - grok-2-1212 as as Judge.
  ![image/png](grok2-1212.png)  
  [grok-2-1221 as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_grok-2-1221_judge.json)
 
 There is no batch API, so I used the regular API, which cost $9.97.  
 バッチAPIなどはないため通常のAPIを使い9.97ドルかかりました。  

 - deepseek-v3 as as Judge.
  ![image/png](deepseek-v3.png)  
  [deepseek-v3 as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_deepseek-chat-v3_judge.json)  
 
 Since there is no batch API, it costs $0.22 to use the regular API. The current API price is a limited time offer and is expected to increase to $0.72 after 2025-02-08.  
 バッチAPIなどはないため通常のAPIを使い$0.22ドルになりました。現在のAPI価格は期間限定オファーであり2025-02-08以降は値上げされ、0.72ドルになると見込まれます  


### Open model results オープンモデルの結果

With the help of [shisa-ai](https://huggingface.co/shisa-ai), we were able to perform a similar comparison on the following large-scale models.  
The scripts used during the experiment can be found [shisa-ai github depo](https://github.com/shisa-ai/shisa-v2/tree/main/eval/dahara1-llmjudge)  
[shisa-ai](https://huggingface.co/shisa-ai)の助けを得て、以下の大規模モデルでも同様の比較を行うことができました。  
実験時に使用されたスクリプトは [shisa-ai github depo](https://github.com/shisa-ai/shisa-v2/tree/main/eval/dahara1-llmjudge)でご覧いただけます

- Llama-3.3-70B-Instruct
  ![image/png](Llama-3.3-70B-Instruct.png)
  [Llama-3.3-70B-Instruct as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Llama-3.3-70B-Instruct_judge.json)  

- unsloth_phi-4
  ![image/png](unsloth_phi-4.png)
  [unsloth_phi-4 as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_unsloth_phi-4_judge.json)  

- Mistral-Small-24B-Instruct-2501
  ![image/png](Mistral-Small-24B-Instruct-2501.png)
  [Mistral-Small-24B-Instruct-2501 as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Mistral-Small-24B-Instruct-2501_judge.json)  

- Tulu-3-405B-FP8-Dynamic
  ![image/png](Tulu-3-405B-FP8-Dynamic.png)
  [Tulu-3-405B-FP8-Dynamic as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Tulu-3-405B-FP8-Dynamic_judge.json)  

- Hermes-3-Llama-3.1-405B
  ![image/png](Hermes-3-Llama-3.1-405B.png)
  [Hermes-3-Llama-3.1-405B as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Hermes-3-Llama-3.1-405B_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_Hermes-3-Llama-3.1-405B_outputs.jsonl)
 
- Llama-3.1-405B-Instruct
  ![image/png](Llama-3.1-405B-Instruct.png)
  [Llama-3.1-405B-Instruct as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Llama-3.1-405B-Instruct_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_Llama-3.1-405B-Instruct_outputs.jsonl)

- Llama-3.1-70B-Instruct
  ![image/png](Llama-3.1-70B-Instruct.png)
  [Llama-3.1-70B-Instruct as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Llama-3.1-70B-Instruct_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_Llama-3.1-70B-Instruct_outputs.jsonl)

- Llama-3.1-8B-Instruct
  ![image/png](Llama-3.1-8B-Instruct.png)
  [Llama-3.1-8B-Instruct as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Llama-3.1-8B-Instruct_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_Llama-3.1-8B-Instruct_outputs.jsonl)

- Llama-3.1-Nemotron-70B-Instruct-HF
  ![image/png](Llama-3.1-Nemotron-70B-Instruct-HF.png)
  [Llama-3.1-Nemotron-70B-Instruct-HF as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Llama-3.1-Nemotron-70B-Instruct-HF_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_Llama-3.1-Nemotron-70B-Instruct-HF_outputs.jsonl)

- Mistral-Large-Instruct-2407
  ![image/png](Mistral-Large-Instruct-2407.png)
  [Mistral-Large-Instruct-2407 as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Mistral-Large-Instruct-2407_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_Mistral-Large-Instruct-2407_outputs.jsonl)

- Mistral-Nemo-Instruct-2407
  ![image/png](Mistral-Nemo-Instruct-2407.png)
  [Mistral-Nemo-Instruct-2407 as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Mistral-Nemo-Instruct-2407_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_Mistral-Nemo-Instruct-2407_outputs.jsonl)

- Mixtral-8x7B-Instruct-v0.1
  ![image/png](Mixtral-8x7B-Instruct-v0.1.png)
  [Mixtral-8x7B-Instruct-v0.1 as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Mixtral-8x7B-Instruct-v0.1_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_Mixtral-8x7B-Instruct-v0.1_outputs.jsonl)

- Nemotron-4-340B-Instruct-hf
  ![image/png](Nemotron-4-340B-Instruct-hf.png)
  [Nemotron-4-340B-Instruct-hf as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Nemotron-4-340B-Instruct-hf_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_Nemotron-4-340B-Instruct-hf_outputs.jsonl)

- Qwen2.5-32B-Instruct
  ![image/png](Qwen2.5-32B-Instruct.png)
  [Qwen2.5-32B-Instruct as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Qwen2.5-32B-Instruct_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_Qwen2.5-32B-Instruct_outputs.jsonl)
  
- Qwen2.5-72B-Instruct
  ![image/png](Qwen2.5-72B-Instruct.png)
  [Qwen2.5-72B-Instruct as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_Qwen2.5-72B-Instruct_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_Qwen2.5-72B-Instruct_outputs.jsonl)

- WizardLM-2-8x22B
  ![image/png](WizardLM-2-8x22B.png)
  [WizardLM-2-8x22B as a judge online demo](https://pair-code.github.io/llm-comparator/?results_path=https%3A%2F%2Fhuggingface.co%2Fdahara1%2Ftranslate-task-thinking-test%2Fraw%2Fmain%2Fwmt23_WizardLM-2-8x22B_judge.json)  
  [raw result](https://github.com/shisa-ai/shisa-v2/blob/main/eval/dahara1-llmjudge/llm_judge_wm23_WizardLM-2-8x22B_outputs.jsonl)


#### Correlation of each model score with gpt-4o score 各モデルのスコアとgpt-4oのスコアの相関

We have summarized the correlation between gpt-4o, which is thought to be the most commonly used, and each model.  
最も良く使われていると思われるgpt-4oのスコアと各モデルのスコアの相関をまとめました

![image/png](correlations.png)

![image/png](gpt4-o_correlations.png)

In this experiment, we used the default prompt of the LLM Comparator almost as it is.   
It is expected that the results will vary greatly depending on how the prompt is written, so it is important to note that this correlation does not represent an absolute performance difference.  

本実験ではほぼLLM Comparatorのディフォルトのプロンプトをそのまま使っています。  
プロンプトの書き方で結果は大きく変わる事が予想されるため、この相関が絶対的な性能差を表しているわけではない事に注意が必要です。  


## Ethical Considerations

This model is a research prototype and should be used with caution in real-world applications. It may produce biased or inaccurate translations.  
このモデルは研究用のプロトタイプであり、実際のアプリケーションでは注意して使用する必要があります。偏った翻訳や不正確な翻訳が生成される場合があります。  

## Sample Script

sample script for thinking version.  
for [standard version](https://huggingface.co/dahara1/translate-task-thinking-test/tree/main/standard_version), remove thinking turn.  
This model is trained to translate sentence by sentence, so when translating long sentences, please refer to the sample code in [gemma-2-2b-jpn-it-translate](https://huggingface.co/webbigdata/gemma-2-2b-jpn-it-translate) and divide it into sentences.  

Thinkingバージョンのサンプル スクリプト。  
[Standardバージョン](https://huggingface.co/dahara1/translate-task-thinking-test/tree/main/standard_version)の場合は、Thinkingターンを削除してください。  
このモデルを1文単位で翻訳する事を学習していますので長文を翻訳する際は[gemma-2-2b-jpn-it-translate](https://huggingface.co/webbigdata/gemma-2-2b-jpn-it-translate)のサンプルコードを参考に文単位で区切ってください  

```
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "dahara1/translate-task-thinking-test"

model = AutoModelForCausalLM.from_pretrained(
  model_name,
  torch_dtype=torch.bfloat16,
  device_map="auto",
  use_cache=True,
)

tokenizer = AutoTokenizer.from_pretrained(model_name)

def trans(instruction,  input):
    system =  f"""あなたは熟練した日英・英日翻訳者です。与えられたテキストを文脈や特定の指示を考慮して正確で自然な翻訳を提供してく ださい。指示には[]で囲まれたヒントが含まれることがあり、キーと値が:で区切られています。追加の指示や文脈がない場合は、最も適切な文脈を判断し、自然な翻訳を提供してください。翻訳する際は、原文の意味とトーンを忠実に反映し、文化的なニュアンスや言語使用の違いに注意を 払います。専門用語や固有名詞は、必要に応じて原語のままか適切な訳語を使用してください。1. まず、与えられたテキストについて考え（thinking）、翻訳の方針や注意点を整理してください。 2. その後、整理した内容に基づいて実際の翻訳を行ってください。深呼吸をして落ち着いて から、翻訳を始めてください。"""

    print(f"input: [{input}]")
    messages =  [
        {"role": "user", "content": system + "\n\n" + instruction},
        {"role": "thinking", "content": "ユーザー入力を翻訳するモードに切り替えます"},
        {"role": "assistant", "content": "ok"},
        {"role": "user", "content": input},
    ]

    inputs = tokenizer.apply_chat_template(
        messages,
        tokenize=True,
        add_thinking_prompt=True,  # Must add for thinking
        return_tensors="pt",
    ).to("cuda")

    with torch.no_grad():
        generated_ids = model.generate(
            input_ids=inputs,
            num_beams=3, max_new_tokens=200, do_sample=False
        )
    full_outputs = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)

    model_marker = "thinking\n"
    thining_response = full_outputs[0].split(model_marker)[-1].strip()
    print(f"thining: [{thining_response}]")

    messages.append(
        {"role": "thinking", "content": thining_response},
    )

    inputs = tokenizer.apply_chat_template(
        messages,
        tokenize=True,
        add_generation_prompt=True,  # Must add for generation
        return_tensors="pt",
    ).to("cuda")

    with torch.no_grad():
        generated_ids = model.generate(
            input_ids=inputs,
            num_beams=3, max_new_tokens=200, do_sample=False
        )
    full_outputs = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)

    model_marker = "model\n"
    model_response = full_outputs[0].split(model_marker)[-1].strip()

    return model_response


ret = trans("Translate English to Japanese.\nWhen translating, please use the following hints:\n[writing_style: casual]", "Whoever said that money does't buy happiness don't know where to shop.")
print(f"output: [{ret}]")
print("----------------------------------------------")
ret = trans("Translate Japanese to English.\nWhen translating, please use the following hints:\n[web-fiction]","さっきも思ったんですけど…もっと血が出てた方がもっとかっこいいよ、出久君！")
print(f"output: [{ret}]")

```

Thinking version result

```
input: [Whoever said that money does't buy happiness don't know where to shop.]
thining: [翻訳方向（英日）を確認。ヒント「writing_style: casual」より、砕けた表現で翻訳する。元文は一般的な文体で、専門用語なし。文化的な要素や慣用句はなし。省略情報なし。著者の意図は、お金が幸せを買えないという主張を、ユーモラスに反論する意図。  「don't know where to shop」を「買い物が上手じゃない」と表現することで、カジュアルなニュアンスを出す。]
output: [誰かが「お金は幸せを買わない」と言っている人は、買い物が上手じゃないよ。]
----------------------------------------------
input: [さっきも思ったんですけど…もっと血が出てた方がもっとかっこいいよ、出久君！]
thining: [翻訳方向（日英）を確認。ヒント「web-fiction」から、小説風な表現を意識する。元文は口語で、感情的なニュアンスを含む。直前の文脈がないため、文脈からの推測は不要。省略された情報はない。著者の意図は、キャラクターの表現を強調すること。  "もっと血が出てた方がもっとかっこいいよ"を"more blood would make you look cooler"と表現することで、小説風な表現に。


I thought the same thing the other day...more blood would make you look cooler, Deku-kun!]
output: [I thought the same thing the other day...more blood would make you look cooler, Deku-kun!]
```

Standard version result

```
output: [「お金で幸せは買えない」なんて言ってる人は、どこで買い物してるんだろうね。]
----------------------------------------------
output: [I thought about it earlier, but... you'd be more cool if you bled more, Deguchi-kun!]
```

The thinking version is not as accurate, but it feels like it's trying to get closer to a fluent translation.  
The standard version is semantically accurate, but feels like a machine translation.  

thinking版は厳密ではありませんが、流暢な翻訳に近づけようとしているように感じられます。  
standard版は意味的に厳密ですが、機械翻訳っぽさを感じます。  

## Additional Information

For more detailed information and discussion about this model, please refer to the associated [Reddit post](https://www.reddit.com/r/LocalLLaMA/comments/1g7y74t/adding_a_thinking_turn_to_extend_llms_reasoning/).  
We welcome further experiments and insights building on this work. The model and evaluation results are made public to contribute to the advancement of machine translation research.  

このモデルに関するより詳しい情報と議論については、関連する [Reddit の投稿](https://www.reddit.com/r/LocalLLaMA/comments/1g7y74t/adding_a_thinking_turn_to_extend_llms_reasoning/)を参照してください。  
この研究を基にしたさらなる実験と洞察を歓迎します。モデルと評価結果は、機械翻訳研究の進歩に貢献するために公開されます。  

### 謝辞 Acknowledgements

Thanks to [u/RealKingNish](https://www.reddit.com/user/RealKingNish/) for the motivation.  
モチベーションをくれた [u/RealKingNish](https://www.reddit.com/user/RealKingNish/) に感謝します  

Thanks to [shisa-ai](https://huggingface.co/shisa-ai) for helping with benchmarking large-scale models.  
大規模モデルのベンチマークを支援してくれた[shisa-ai](https://huggingface.co/shisa-ai)に感謝します  

I do not know all the inventors of each method, so please point out any that I have missed.  
各手法の考案者については私はすべてを把握できているわけではないので漏れていたら指摘してください  

- **Developed by:** [dahara1@webbigdata]
- **Language(s) (NLP):** [English, Japanese]
- **base model [optional]:** [gemma-2-2b-jpn-it](https://huggingface.co/google/gemma-2-2b-jpn-it)

**BibTeX:**
```
@misc{dahara2024 thinking turn,
  author       = {dahara1@webbigdata},
  title        = {translate-task-thinking turn test},
  year         = {2024},
  howpublished = {\url{https://huggingface.co/dahara1/translate-task-thinking-test}},
  note         = {Accessed: 2024-10-19},
  abstract     = {This model demonstrates the effectiveness of thinking turn for models, especially for improving performance in translation task.},
}
```
