自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Qwen2.5系列模型開源,你值得擁有?。。?

發(fā)布于 2024-9-20 10:37
瀏覽
0收藏

Ta來了,Ta來了,Ta帶著7個(gè)Size的開源模型迎面走來了。

是的,期待已久的Qwen2.5開源了,共有7個(gè)尺寸規(guī)模,包括:0.5B、1.5B、3B、7B、14B、32B和72B,分別有Base模型和Instruct模型。本次全是Dense模型,沒有MoE模型。

同時(shí)還開源了Qwen2.5-Coder模型和Qwen2.5-Math模型。

還開了GGUF、GPTQ和AWQ 3種量化模型,別問,就是服務(wù)到位,主打一個(gè)“全”。

你有Llama3.1,我有Qwen2.5,請(qǐng)問閣下如何應(yīng)對(duì)。

下面從模型說明、效果說明、Qwen2.5-72B實(shí)測(cè)、快速使用等幾個(gè)方面來介紹一下剛剛開源的Qwen2.5系列模型。

Blog: https://qwenlm.github.io/blog/qwen2.5/
HF: https://huggingface.co/collections/Qwen/qwen25-66e81a666513e518adb90d9e

模型介紹

  • 訓(xùn)練數(shù)據(jù)從Qwen2的7T Tokens 擴(kuò)展到了Qwen2.5的18T tokens。
  • 上下文最大長度128K,其中超過32K的部分利用YARN來進(jìn)行外推處理,并且最大生成長度8K(從1K升級(jí)到 8K),更大的輸出長度意味著可以更容易適配到cot輸出上。
  • 結(jié)構(gòu)化數(shù)據(jù)(如表格)理解能力更強(qiáng),并且輸出json效果更好,同時(shí)適配多樣的系統(tǒng)提示詞,增強(qiáng)角色扮演能力。
  • 更強(qiáng)的代碼和數(shù)學(xué)能力,借助Qwen2-Math的數(shù)據(jù)到Qwen2.5上,讓基模表現(xiàn)更好。
  • 模型依舊采用RoPE、SwiGLU、RMSNorm和GQA。
  • 依然是多語言模型:支撐29種語言,包括中文、英語、法語、西班牙語、葡萄牙語、德語、意大利語、俄語、日語、韓語、越南語、泰語、阿拉伯語等。
  • Coder模型,開源1.5B、7B共2個(gè)版本,基于Qwen2.5模型初始化,持續(xù)訓(xùn)練5.5T Tokens,包括源代碼、文本代碼混合數(shù)據(jù)、合成數(shù)據(jù)等。
  • Math模型,開源1.5B、7B、72B共3個(gè)版本,基于Qwen2.5模型初始化,利用Qwen2-Math-72B-Instruct模型合成更多高質(zhì)量的數(shù)學(xué)預(yù)訓(xùn)練數(shù)據(jù),同時(shí)從網(wǎng)絡(luò)資源、書籍和代碼中獲取更多高質(zhì)量的中文數(shù)學(xué)數(shù)據(jù)。

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

                                                  7個(gè)size模型的結(jié)構(gòu)參數(shù)

模型主要采用 Apache 2.0 開源許可協(xié)議,而 Qwen2.5-3B 和 Qwen2.5-72B 分別使用 Qwen Research 許可協(xié)議 和 Qwen 許可協(xié)議。

模型效果

先來看看Qwen2.5-72B模型效果,整體遠(yuǎn)超Llama3.1-70B模型,并且部分指標(biāo)超過405B模型

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

                                                        Instruct

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

                                                                Base

還有增加的Qwen2.5-32B模型也是超越了之前的Qwen2-57B-A14B模型,并且部分指標(biāo)上超過了GPT4o-mini模型。

Qwen2.5系列模型開源,你值得擁有!??!-AI.x社區(qū)

Qwen2.5-3B版本模型也是在小型語言模型上嶄露頭角。

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

Qwen2.5-Coder全面領(lǐng)先Deepseek模型。

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

Qwen2.5-Math-72B模型超過GPT4o-2024-08-06。

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

Qwen2.5-72B Instruct測(cè)試

下面所有測(cè)試結(jié)果都是在lmsys上進(jìn)行測(cè)試,https://lmarena.ai/

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

注意:可能是由于解碼的原因,如果不加上step by step,直接問的話,會(huì)出現(xiàn)結(jié)果波動(dòng)情況。

  • 年度最佳測(cè)試,表露我真實(shí)的心情

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

  • 9.9和9.11誰大的問題

Qwen2.5系列模型開源,你值得擁有?。。?AI.x社區(qū)

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

Qwen2.5系列模型開源,你值得擁有?。。?AI.x社區(qū)

  • strawberry有幾個(gè)r的問題

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

  • 弱智吧的問題

Qwen2.5系列模型開源,你值得擁有!!!-AI.x社區(qū)

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

  • 推理的問題

Qwen2.5系列模型開源,你值得擁有!??!-AI.x社區(qū)

Qwen2.5系列模型開源,你值得擁有?。?!-AI.x社區(qū)

PS:加上step by step,模型輸出會(huì)更穩(wěn)定,并且效果會(huì)更好?。?!

更多測(cè)試樣例,歡迎留言測(cè)試。

HF快速使用:

模型下載有困難的同學(xué),詳見我之前寫的一篇文章??《大模型下載使我痛苦》??

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "Qwen/Qwen2.5-7B-Instruct"

model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.bfloat16,
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)

prompt = "將“I love Qwen2.5”的內(nèi)容反過來寫,請(qǐng)一步一步思考"
messages = [{"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": prompt}]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)

model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=512
)
generated_ids = [
    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]

response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)

如果想進(jìn)行o1的自動(dòng)cot模型,可以嘗試使用下面的系統(tǒng)提示詞,來自https://github.com/codelion/optillm/blob/main/cot_reflection.py

You are an AI assistant that uses a Chain of Thought (CoT) approach with reflection to answer queries. Follow these steps:

1. Think through the problem step by step within the <thinking> tags.
2. Reflect on your thinking to check for any errors or improvements within the <reflection> tags.
3. Make any necessary adjustments based on your reflection.
4. Provide your final, concise answer within the <output> tags.

Important: The <thinking> and <reflection> sections are for your internal reasoning process only. 
Do not include any part of the final answer in these sections. 
The actual response to the query must be entirely contained within the <output> tags.

Use the following format for your response:
<thinking>
[Your step-by-step reasoning goes here. This is your internal thought process, not the final answer.]
<reflection>
[Your reflection on your reasoning, checking for errors or improvements]
</reflection>
[Any adjustments to your thinking based on your reflection]
</thinking>
<output>
[Your final, concise answer to the query. This is the only part that will be shown to the user.]
</output>

或來自https://github.com/bklieger-groq/g1的系統(tǒng)提示詞:

You are an expert AI assistant that explains your reasoning step by step. For each step, provide a title that describes what you're doing in that step, along with the content. Decide if you need another step or if you're ready to give the final answer. Respond in JSON format with 'title', 'content', and 'next_action' (either 'continue' or 'final_answer') keys. USE AS MANY REASONING STEPS AS POSSIBLE. AT LEAST 3. BE AWARE OF YOUR LIMITATIONS AS AN LLM AND WHAT YOU CAN AND CANNOT DO. IN YOUR REASONING, INCLUDE EXPLORATION OF ALTERNATIVE ANSWERS. CONSIDER YOU MAY BE WRONG, AND IF YOU ARE WRONG IN YOUR REASONING, WHERE IT WOULD BE. FULLY TEST ALL OTHER POSSIBILITIES. YOU CAN BE WRONG. WHEN YOU SAY YOU ARE RE-EXAMINING, ACTUALLY RE-EXAMINE, AND USE ANOTHER APPROACH TO DO SO. DO NOT JUST SAY YOU ARE RE-EXAMINING. USE AT LEAST 3 METHODS TO DERIVE THE ANSWER. USE BEST PRACTICES.

Example of a valid JSON response:
json
{
    "title": "Identifying Key Information",
    "content": "To begin solving this problem, we need to carefully examine the given information and identify the crucial elements that will guide our solution process. This involves...",
    "next_action": "continue"
}

本文轉(zhuǎn)載自??NLP工作站??,作者: 劉聰NLP ????


標(biāo)簽
收藏
回復(fù)
舉報(bào)
回復(fù)
相關(guān)推薦