Improve metadata (pipeline tag, library name, correct typo) and add GitHub link

#2
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +17 -13
README.md CHANGED
@@ -1,21 +1,22 @@
1
  ---
2
- license: cc-by-nc-sa-4.0
 
3
  language:
4
  - en
5
  - zh
6
- base_model:
7
- - Qwen/Qwen2.5-14B-Instruct
 
8
  tags:
9
- - machine tranlsation
10
  - O1-like model
11
  - Chat
12
- pipeline_tag: text-generation
13
  ---
14
 
15
  # DRT
16
 
17
  <p align="center">
18
- 🤗 <a href="https://huggingface.co/Krystalan/DRT-7B">DRT-7B</a>&nbsp&nbsp | &nbsp&nbsp🤗 <a href="https://huggingface.co/Krystalan/DRT-8B">DRT-8B</a>&nbsp&nbsp | &nbsp&nbsp🤗 <a href="https://huggingface.co/Krystalan/DRT-14B">DRT-14B</a>&nbsp&nbsp | &nbsp&nbsp 📑 <a href="https://arxiv.org/abs/2412.17498">Paper</a>
19
 
20
  </p>
21
 
@@ -80,7 +81,8 @@ In this work, we introduce DRT, an attempt to bring the success of long thought
80
  ### Model Prompts
81
  During model inference, please use the following prompts:
82
  - System prompt: `You are a philosopher skilled in deep thinking, accustomed to exploring complex problems with profound insight.`
83
- - User prompt: `Please translate the following text from English to Chinese:\n[An English text]`
 
84
 
85
  DRT models will first generate the thought and then provide the final translation, with the following format:
86
  ```
@@ -107,7 +109,8 @@ model = AutoModelForCausalLM.from_pretrained(
107
  )
108
  tokenizer = AutoTokenizer.from_pretrained(model_name)
109
 
110
- prompt = "Please translate the following text from English to Chinese:\nThe mother, with her feet propped up on a stool, seemed to be trying to get to the bottom of that answer, whose feminine profundity had struck her all of a heap."
 
111
  messages = [
112
  {"role": "system", "content": "You are a philosopher skilled in deep thinking, accustomed to exploring complex problems with profound insight."},
113
  {"role": "user", "content": prompt}
@@ -154,7 +157,8 @@ chat_response = client.chat.completions.create(
154
  model=[model_name],
155
  messages=[
156
  {"role": "system", "content": "You are a philosopher skilled in deep thinking, accustomed to exploring complex problems with profound insight."},
157
- {"role": "user", "content": "Please translate the following text from English to Chinese:\nThe mother, with her feet propped up on a stool, seemed to be trying to get to the bottom of that answer, whose feminine profundity had struck her all of a heap."},
 
158
  ],
159
  temperature=0.1,
160
  top_p=0.8,
@@ -176,10 +180,10 @@ print("Chat response:", chat_response)
176
  |This cold officer upon a monument, who dropped epithets unconcernedly down, would be finer as a dead man, he thought. | 他认为,这个站在纪念碑上的冷漠官员,若死了会更好,他不带任何感情地抛下了一些称呼。 | 这个冷冰冰的官员站在纪念碑上,毫不在意地抛下一些称号,他想,如果作为一个死人会更出色。 | 纪念碑上的冷淡官员,漫不经心地吟咏那些修饰语,他心想,若化为亡者,或许更显尊贵。 |
177
 
178
 
 
179
 
180
- ## License
181
- This work is licensed under cc-by-nc-sa-4.0
182
-
183
-
184
 
185
 
 
 
 
1
  ---
2
+ base_model:
3
+ - Qwen/Qwen2.5-14B-Instruct
4
  language:
5
  - en
6
  - zh
7
+ license: cc-by-nc-sa-4.0
8
+ pipeline_tag: translation
9
+ library_name: transformers
10
  tags:
11
+ - machine translation
12
  - O1-like model
13
  - Chat
 
14
  ---
15
 
16
  # DRT
17
 
18
  <p align="center">
19
+ 🤗 <a href="https://huggingface.co/Krystalan/DRT-7B">DRT-7B</a>&nbsp&nbsp | &nbsp&nbsp🤗 <a href="https://huggingface.co/Krystalan/DRT-8B">DRT-8B</a>&nbsp&nbsp | &nbsp&nbsp🤗 <a href="https://huggingface.co/Krystalan/DRT-14B">DRT-14B</a>&nbsp&nbsp | &nbsp&nbsp 📑 <a href="https://arxiv.org/abs/2412.17498">Paper</a> | &nbsp;&nbsp 💻 <a href="https://github.com/krystalan/DRT-o1">Code</a>
20
 
21
  </p>
22
 
 
81
  ### Model Prompts
82
  During model inference, please use the following prompts:
83
  - System prompt: `You are a philosopher skilled in deep thinking, accustomed to exploring complex problems with profound insight.`
84
+ - User prompt: `Please translate the following text from English to Chinese:
85
+ [An English text]`
86
 
87
  DRT models will first generate the thought and then provide the final translation, with the following format:
88
  ```
 
109
  )
110
  tokenizer = AutoTokenizer.from_pretrained(model_name)
111
 
112
+ prompt = "Please translate the following text from English to Chinese:
113
+ The mother, with her feet propped up on a stool, seemed to be trying to get to the bottom of that answer, whose feminine profundity had struck her all of a heap."
114
  messages = [
115
  {"role": "system", "content": "You are a philosopher skilled in deep thinking, accustomed to exploring complex problems with profound insight."},
116
  {"role": "user", "content": prompt}
 
157
  model=[model_name],
158
  messages=[
159
  {"role": "system", "content": "You are a philosopher skilled in deep thinking, accustomed to exploring complex problems with profound insight."},
160
+ {"role": "user", "content": "Please translate the following text from English to Chinese:
161
+ The mother, with her feet propped up on a stool, seemed to be trying to get to the bottom of that answer, whose feminine profundity had struck her all of a heap."},
162
  ],
163
  temperature=0.1,
164
  top_p=0.8,
 
180
  |This cold officer upon a monument, who dropped epithets unconcernedly down, would be finer as a dead man, he thought. | 他认为,这个站在纪念碑上的冷漠官员,若死了会更好,他不带任何感情地抛下了一些称呼。 | 这个冷冰冰的官员站在纪念碑上,毫不在意地抛下一些称号,他想,如果作为一个死人会更出色。 | 纪念碑上的冷淡官员,漫不经心地吟咏那些修饰语,他心想,若化为亡者,或许更显尊贵。 |
181
 
182
 
183
+ ## Data
184
 
185
+ We release the synthesized data (named ```MetaphorTrans```), please refer to `data/MetaphorTrans_*.jsonl`, where `text` and `trans` denote the source English sentences and the target Chinese translations, respectively. `thought` indicates the thought content for MT.
 
 
 
186
 
187
 
188
+ # License
189
+ This work is licensed under cc-by-nc-sa-4.0