Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qwen2.5-math系列模型生成问题 #34

Open
Moyhub opened this issue Nov 13, 2024 · 1 comment
Open

qwen2.5-math系列模型生成问题 #34

Moyhub opened this issue Nov 13, 2024 · 1 comment

Comments

@Moyhub
Copy link

Moyhub commented Nov 13, 2024

我这里使用qwen2.5-math-7b/72b-Instruct尝试生成数据,但是生成数据往往不可用。

  1. 使用了qwen2.5的默认system。https://huggingface.co/Qwen/Qwen2.5-Math-7B-Instruct
  2. 也使用了自己编写的system prompt

截图如下:
image

@zhangchen-xu
Copy link
Member

Sorry for the late reply as Github didn't give me issue notifications... 😔

I tried Qwen/Qwen2.5-Math-72B-Instruct and it works well from my side:

  {
    "id": 0,
    "pre_query_template": "<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n<|im_start|>user\n",
    "instruction": "Given the equation \\(x^2 + y^2 - 4x + 6y + 5 = 0\\), how can I determine the center and the radius of the circle it represents?",
    "response": null,
    "created": 1735442754,
    "gen_input_configs": {
      "temperature": 0.6,
      "top_p": 1.0,
      "input_generator": "Qwen/Qwen2.5-Math-72B-Instruct",
      "seed": null
    },
    "gen_response_configs": null
  },

You can add this to the model config:

  "Qwen/Qwen2.5-Math-72B-Instruct": {
    "model_name": "Qwen/Qwen2.5-Math-72B-Instruct",
    "stop_tokens": [
      "<|im_start|>",
      "<|im_end|>",
      "<|endoftext|>"
    ],
    "stop_token_ids": [
      151643,
      151644,
      151645
    ],
    "stop_tokens_assistant": [
      "Assistant",
      "assistant"
    ],
    "pre_query_template": "<|im_start|>system\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\n<|im_start|>user\n"
  },

I also checked tokenizer configs of Qwen2.5 math. It is weird... Maybe they use different system templates during the post training. Anyway, this system template for Qwen2 can work well in this case. You are Qwen, created by Alibaba Cloud. You are a helpful assistant.

I used Temperature=0.6. You may also need to decrease the temperature for this model family. I will release a dataset for Qwen2.5 Math once I have available GPUs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants