能不能給個 ollama的下載

#1
README.md CHANGED
@@ -24,7 +24,7 @@ library_name: transformers
24
  因為簡體中文和繁體中文在語法和語義相似度高,往往只是差在文字本身看起來不一樣。另外,千問 (Qwen) 的模型中文的能力是很強的 (很可惜 3B 的 license 不是 apache)。我們利用[繁化姬](https://zhconvert.org) 將簡體中文所對應的 token 和 繁體中文的 token 做代換。更多關於 tokenizer 帶換掉哪些單詞,可以查看 [benchang1110/DeepSeek-R1-Distill-Qwen-1.5B-zhtw](https://huggingface.co/benchang1110/DeepSeek-R1-Distill-Qwen-1.5B-zhtw) 中的 convert.txt。
25
 
26
  ### SFT
27
- 因為前面的繁簡轉換並無法轉換所有單詞,這個階段我們用 [lianghsun/tw-instruct-500k](https://huggingface.co/datasets/lianghsun/tw-instruct-500k) 這個資料集做微調。但為了保持模型原先強大的性能,避免更改太多模型參數,我們用 LoRA 微調。
28
 
29
  ### DPO
30
  這個階段我們用 [zake7749/kyara-chinese-preference-rl-dpo-s0-30K](https://huggingface.co/datasets/zake7749/kyara-chinese-preference-rl-dpo-s0-30K) 這個資料集做 alignment,目標讓模型能夠條列式的輸出,並且能夠在輸出的時候保持一定的邏輯性。
@@ -130,7 +130,8 @@ ASSISTANT:在我的時代,即18世紀,音樂風格經歷了顯著的發展
130
 
131
  ## Bias, Risks, and Limitations
132
 
133
- 修改 system prompt 會調整模型輸出的偏見和立場。
 
134
 
135
  ## How to Get Started with the Model
136
 
@@ -358,8 +359,7 @@ GPU Hours: A100*3h
358
 
359
 
360
  ## Summary
361
- 這個模型借用了 base model 強大的能力,和同級的模型相比在 TMLU 和 TMMLU+ 上有更好的表現,甚至可以和 8B 的模型相比 (完全是靠 base model 的中文理解能力)
362
- 開發成本也比上述的模型低非常多。在日常對話和繁體中文上表現都相當優異。感謝提供 base model 和資料集的團隊。
363
 
364
  ## Citation
365
 
 
24
  因為簡體中文和繁體中文在語法和語義相似度高,往往只是差在文字本身看起來不一樣。另外,千問 (Qwen) 的模型中文的能力是很強的 (很可惜 3B 的 license 不是 apache)。我們利用[繁化姬](https://zhconvert.org) 將簡體中文所對應的 token 和 繁體中文的 token 做代換。更多關於 tokenizer 帶換掉哪些單詞,可以查看 [benchang1110/DeepSeek-R1-Distill-Qwen-1.5B-zhtw](https://huggingface.co/benchang1110/DeepSeek-R1-Distill-Qwen-1.5B-zhtw) 中的 convert.txt。
25
 
26
  ### SFT
27
+ 這個階段我們用 [lianghsun/tw-instruct-500k](https://huggingface.co/datasets/lianghsun/tw-instruct-500k) 這個資料集做微調,目標讓模型知道一點台灣的在地文化和一些台灣常用的慣用語,但為了保持模型原先強大的性能,我們用 LoRA 微調。
28
 
29
  ### DPO
30
  這個階段我們用 [zake7749/kyara-chinese-preference-rl-dpo-s0-30K](https://huggingface.co/datasets/zake7749/kyara-chinese-preference-rl-dpo-s0-30K) 這個資料集做 alignment,目標讓模型能夠條列式的輸出,並且能夠在輸出的時候保持一定的邏輯性。
 
130
 
131
  ## Bias, Risks, and Limitations
132
 
133
+ 修改 system prompt 會調整模型輸出的偏見和立場(~~這裡就不多提了,各位自己調調看~~)。
134
+
135
 
136
  ## How to Get Started with the Model
137
 
 
359
 
360
 
361
  ## Summary
362
+ 這個模型借用了 base model 強大的能力,和同級的模型相比在 TMLU 和 TMMLU+ 上有更好的表現,甚至可以和 8B 的模型相比。開發成本也比上述的模型低非常多。撇除一些撇除一些小缺點(小機率出現簡體中文),在日常對話和對台灣的理解上表現都相當優異。感謝提供 base model 和資料集的團隊。
 
363
 
364
  ## Citation
365
 
config.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "_name_or_path": "./DPO/export",
3
  "architectures": [
4
  "Qwen2ForCausalLM"
5
  ],
@@ -20,9 +20,9 @@
20
  "rope_scaling": null,
21
  "rope_theta": 1000000.0,
22
  "sliding_window": null,
23
- "tie_word_embeddings": false,
24
  "torch_dtype": "bfloat16",
25
- "transformers_version": "4.49.0",
26
  "use_cache": true,
27
  "use_sliding_window": false,
28
  "vocab_size": 151936
 
1
  {
2
+ "_name_or_path": "./DPO/Qwen_3B_tw_dpo_phase2",
3
  "architectures": [
4
  "Qwen2ForCausalLM"
5
  ],
 
20
  "rope_scaling": null,
21
  "rope_theta": 1000000.0,
22
  "sliding_window": null,
23
+ "tie_word_embeddings": true,
24
  "torch_dtype": "bfloat16",
25
+ "transformers_version": "4.48.0",
26
  "use_cache": true,
27
  "use_sliding_window": false,
28
  "vocab_size": 151936
generation_config.json CHANGED
@@ -10,5 +10,5 @@
10
  "temperature": 0.7,
11
  "top_k": 20,
12
  "top_p": 0.8,
13
- "transformers_version": "4.49.0"
14
  }
 
10
  "temperature": 0.7,
11
  "top_k": 20,
12
  "top_p": 0.8,
13
+ "transformers_version": "4.48.0"
14
  }
model-00001-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3d8719d04ab9d28af6194109ed8091a98d295fe8549929d0c7555d3a1b139b38
3
  size 4957560304
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3f87325420b90d2446553839391755109367dcd961636cb9a1f8c271c23dff0f
3
  size 4957560304
model-00002-of-00002.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:98fc7f21daa5bea89ab4d87a3c1042347c53eb61043b09c64b195e7fa07ed72c
3
- size 1836696752
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6df34840f566355e74762a79b4512065f703c5737259083536acea92100308c2
3
+ size 1214366696
model.safetensors.index.json CHANGED
@@ -1,9 +1,8 @@
1
  {
2
  "metadata": {
3
- "total_size": 6794207232
4
  },
5
  "weight_map": {
6
- "lm_head.weight": "model-00002-of-00002.safetensors",
7
  "model.embed_tokens.weight": "model-00001-of-00002.safetensors",
8
  "model.layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
9
  "model.layers.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
 
1
  {
2
  "metadata": {
3
+ "total_size": 6171877376
4
  },
5
  "weight_map": {
 
6
  "model.embed_tokens.weight": "model-00001-of-00002.safetensors",
7
  "model.layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
8
  "model.layers.0.mlp.down_proj.weight": "model-00001-of-00002.safetensors",
tokenizer_config.json CHANGED
@@ -195,7 +195,7 @@
195
  "<|video_pad|>"
196
  ],
197
  "bos_token": null,
198
- "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- '你是 Qwen-Taiwan-3B, 來自臺灣。你是一位樂於回答問題的助手。' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\n你是 Qwen-Taiwan-3B, 來自臺灣。你是一位樂於回答問題的助手。<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
199
  "clean_up_tokenization_spaces": false,
200
  "eos_token": "<|im_end|>",
201
  "errors": "replace",
 
195
  "<|video_pad|>"
196
  ],
197
  "bos_token": null,
198
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- '你是 Qwen-Taiwan-3B, 來自台灣新竹市。你是一位樂於回答問題的助手。' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\n你是 Qwen-Taiwan-3B, 來自台灣新竹市。你是一位樂於回答問題的助手。<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n",
199
  "clean_up_tokenization_spaces": false,
200
  "eos_token": "<|im_end|>",
201
  "errors": "replace",