Tess-v2.5 (Qwen2-72B) 是在最新发布的 Qwen2-72B 基础上微调,使用包含 300K 个样本的多主题 datasets。

93 拉取 更新于 2 个月前

2 个月前

5c88aad386a1 · 38GB

model
qwen2
·
72.7B
·
Q3_K_M
params
{"stop":["<|im_start|>","<|im_end|>"]}
template
{{ if .System }}<|im_start|>system {{ .System }}<|im_end|> {{ end }}{{ if .Prompt }}<|im_start|>user {{ .Prompt }}<|im_end|> {{ end }}<|im_start|>assistant {{ .Response }}<|im_end|>
license
Tongyi Qianwen LICENSE AGREEMENT Tongyi Qianwen Release Date: August 3, 2023 By clicking to agree or by using or distributing any portion or element of the Tongyi Qianwen Materials, you will be deemed to have recognized and accepted the content of this Agreement, which is effective immediately. 1. Definitions a. This Tongyi Qianwen LICENSE AGREEMENT (this "Agreement") shall mean the terms and conditions for use, reproduction, distribution and modification of the Materials as defined by this Agreement. b. "We"(or "Us") shall mean Alibaba Cloud. c. "You" (or "Your") shall mean a natural person or legal entity exercising the rights granted by this Agreement and/or using the Materials for any purpose and in any field of use. d. "Third Parties" shall mean individuals or legal entities that are not under common control with Us or You. e. "Tongyi Qianwen" shall mean the large language models (including Qwen model and Qwen-Chat model), and software and algorithms, consisting of trained model weights, parameters (including optimizer states), machine-learning model code, inference-enabling code, training-enabling code, fine-tuning enabling code and other elements of the foregoing distributed by Us. f. "Materials" shall mean, collectively, Alibaba Cloud's proprietary Tongyi Qianwen and Documentation (and any portion thereof) made available under this Agreement. g. "Source" form shall mean the preferred form for making modifications, including but not limited to model source code, documentation source, and configuration files. h. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. 2. Grant of Rights You are granted a non-exclusive, worldwide, non-transferable and royalty-free limited license under Alibaba Cloud's intellectual property or other rights owned by Us embodied in the Materials to use, reproduce, distribute, copy, create derivative works of, and make modifications to the Materials. 3. Redistribution You may reproduce and distribute copies of the Materials or derivative works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: a. You shall give any other recipients of the Materials or derivative works a copy of this Agreement; b. You shall cause any modified files to carry prominent notices stating that You changed the files; c. You shall retain in all copies of the Materials that You distribute the following attribution notices within a "Notice" text file distributed as a part of such copies: "Tongyi Qianwen is licensed under the Tongyi Qianwen LICENSE AGREEMENT, Copyright (c) Alibaba Cloud. All Rights Reserved."; and d. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such derivative works as a whole, provided Your use, reproduction, and distribution of the work otherwise complies with the terms and conditions of this Agreement. 4. Restrictions If you are commercially using the Materials, and your product or service has more than 100 million monthly active users, You shall request a license from Us. You cannot exercise your rights under this Agreement without our express authorization. 5. Rules of use a. The Materials may be subject to export controls or restrictions in China, the United States or other countries or regions. You shall comply with applicable laws and regulations in your use of the Materials. b. You can not use the Materials or any output therefrom to improve any other large language model (excluding Tongyi Qianwen or derivative works thereof). 6. Intellectual Property a. We retain ownership of all intellectual property rights in and to the Materials and derivatives made by or for Us. Conditioned upon compliance with the terms and conditions of this Agreement, with respect to any derivative works and modifications of the Materials that are made by you, you are and will be the owner of such derivative works and modifications. b. No trademark license is granted to use the trade names, trademarks, service marks, or product names of Us, except as required to fulfill notice requirements under this Agreement or as required for reasonable and customary use in describing and redistributing the Materials. c. If you commence a lawsuit or other proceedings (including a cross-claim or counterclaim in a lawsuit) against Us or any entity alleging that the Materials or any output therefrom, or any part of the foregoing, infringe any intellectual property or other right owned or licensable by you, then all licences granted to you under this Agreement shall terminate as of the date such lawsuit or other proceeding is commenced or brought. 7. Disclaimer of Warranty and Limitation of Liability a. We are not obligated to support, update, provide training for, or develop any further version of the Tongyi Qianwen Materials or to grant any license thereto. b. THE MATERIALS ARE PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTY OF ANY KIND INCLUDING WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT, OR FITNESS FOR A PARTICULAR PURPOSE. WE MAKE NO WARRANTY AND ASSUME NO RESPONSIBILITY FOR THE SAFETY OR STABILITY OF THE MATERIALS AND ANY OUTPUT THEREFROM. c. IN NO EVENT SHALL WE BE LIABLE TO YOU FOR ANY DAMAGES, INCLUDING, BUT NOT LIMITED TO ANY DIRECT, OR INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING FROM YOUR USE OR INABILITY TO USE THE MATERIALS OR ANY OUTPUT OF IT, NO MATTER HOW IT���������S CAUSED. d. You will defend, indemnify and hold harmless Us from and against any claim by any third party arising out of or related to your use or distribution of the Materials. 8. Survival and Termination. a. The term of this Agreement shall commence upon your acceptance of this Agreement or access to the Materials and will continue in full force and effect until terminated in accordance with the terms and conditions herein. b. We may terminate this Agreement if you breach any of the terms or conditions of this Agreement. Upon termination of this Agreement, you must delete and cease use of the Materials. Sections 7 and 9 shall survive the termination of this Agreement. 9. Governing Law and Jurisdiction. a. This Agreement and any dispute arising out of or relating to it will be governed by the laws of China, without regard to conflict of law principles, and the UN Convention on Contracts for the International Sale of Goods does not apply to this Agreement. b. The People's Courts in Hangzhou City shall have exclusive jurisdiction over any dispute arising out of this Agreement.

README

原始模型文件可在此处找到。

GGUF 文件可在此处找到,Q4_K_M 在此处

Tess-v2.5 (Qwen2-72B)

Tess-v2.5

我们创建了 Tess-v2.5,这是 Large Language Models (LLMs) 的 Tess 系列中的最新最先进的模型。Tess 是由 Migel Tissera 创建的旗舰级 LLM 系列,简称 Tesoro(意大利语中的宝藏)。Tess-v2.5 在推理能力、编码能力和数学能力方面取得了显著进展。它在 MMLU (Massive Multitask Language Understanding) 评估中是目前排名第一的开源权重模型。它在所有其他开源权重模型上的得分都高于 Qwen2-72B-Instruct,Llama3-70B-Instruct,Mixtral-8x22B-Instruct 和 DBRX-Instruct。进一步来说,当在 MMLU 评估时,Tess-v2.5 (Qwen2-72B) 模型的表现甚至超过了前沿的封闭模型 Gemini-1.0-Ultra,Gemini-1.5-Pro,Mistral-Large 和 Claude-3-Sonnet。

Tess-v2.5 (Qwen2-72B) 在新发布的 Qwen2-72B 基础上进行了微调,使用了包含 300K 样本的数据集 Tess-v2.5,这些样本覆盖了多个主题,包括商业和管理、市场营销、历史、社会科学、艺术、STEM 学科和计算机编程。此数据集是使用 Sensei 框架合成的,使用了多个前沿模型,例如 GPT-4-Turbo、Claude-Opus 和 Mistral-Large。

该模型的计算工作得到了 KindoAI 的大方赞助。

当在 AGIEval (Nous) 的子集上评估时,该模型与父模型 GPT-4-0314 的表现非常出色。

训练过程

Tess-v2.5 模型使用 Qwen2-72B 的基本权重启动。然后使用 Axolotl 作为训练框架,使用 Tess-v2.5 数据集进行微调。Tess 模型的大部分遵循共同微调方法:低学习率、低 epoch 数,并使用非常高质量且多样化的数据。该模型在 Microsoft Azure 上的 4xA100 VM 上进行了 4 天的微调。该模型尚未与 RLHF 或 DPO 一致。

作者认为,模型的能力似乎主要来自预训练过程。这是 Tess 模型每次微调的基础,而保留基础模型的熵对于作者是至关重要的。

评估结果

Tess-v2.5 模型是一个整体均衡良好的模型。有关该模型的所有评估结果都可以在 评估 文件夹中访问。

完整的评估比较表可以在此处访问: 谷歌表格

MMLU (大量多任务语言理解)

MMLU_open

MMLU_closed

AGIEval

AGIEval

运行推理的示例代码

请注意,此模型使用 ChatML 提示格式。

import torch, json
from transformers import AutoModelForCausalLM, AutoTokenizer
from stop_word import StopWordCriteria

model_path = "migtissera/Tess-v2.5-Qwen2-72B"
output_file_path = "/home/migel/conversations.jsonl"

model = AutoModelForCausalLM.from_pretrained(
    model_path,
    torch_dtype=torch.float16,
    device_map="auto",
    load_in_4bit=False,
    trust_remote_code=True,
)

tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)

terminators = [
    tokenizer.convert_tokens_to_ids("<|im_end|>")
]

def generate_text(instruction):
    tokens = tokenizer.encode(instruction)
    tokens = torch.LongTensor(tokens).unsqueeze(0)
    tokens = tokens.to("cuda")

    instance = {
        "input_ids": tokens,
        "top_p": 1.0,
        "temperature": 0.75,
        "generate_len": 1024,
        "top_k": 50,
    }

    length = len(tokens[0])
    with torch.no_grad():
        rest = model.generate(
            input_ids=tokens,
            max_length=length + instance["generate_len"],
            use_cache=True,
            do_sample=True,
            top_p=instance["top_p"],
            temperature=instance["temperature"],
            top_k=instance["top_k"],
            num_return_sequences=1,
            pad_token_id=tokenizer.eos_token_id,
            eos_token_id=terminators,
        )
    output = rest[0][length:]
    string = tokenizer.decode(output, skip_special_tokens=True)
    return f"{string}"

conversation = f"""<|im_start|>system\nYou are Tesoro, a helful AI assitant. You always provide detailed answers without hesitation.<|im_end|>\n<|im_start|>user\n"""

while True:
    user_input = input("You: ")
    llm_prompt = f"{conversation}{user_input}<|im_end|>\n<|im_start|>assistant\n"
    answer = generate_text(llm_prompt)
    print(answer)
    conversation = f"{llm_prompt}{answer}\n"
    json_data = {"prompt": user_input, "answer": answer}

    with open(output_file_path, "a") as output_file:
        output_file.write(json.dumps(json_data) + "\n")

加入我的通用人工智能 Discord (NeuroLattice)

https://discord.gg/Hz6GrwGFKD

局限性 & 偏见

尽管该模型旨在提高准确性,但它偶尔可能会生成不准确或误导性的结果。

尽管对预训练数据进行了精心的优化,但仍然存在生成不当、有偏见或有冒犯性内容的可能性。

在必要时小心行事并进行交叉验证。这是一个未审核的模型。