Tess-v2.5 (Qwen2-72B) 是基于新发布的 Qwen2-72B 基础调整,使用了包含 30 万个样本的 Tess-v2.5 数据集,这些样本涉及多个主题。

93 次拉取请求 更新于 2 个月前

2 个月前

e4d7302b81bd · 47GB

model
qwen2
·
72.7B
·
Q4_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,这是 Tesoro 系列大型语言模型 (LLM) 中的最新最先进模型。Tesoro 是意大利语中的“宝藏”,是 Migel Tissera 创建的旗舰 LLM 系列。Tess-v2.5 在推理能力、编码能力和数学方面带来了显著的改进。目前,在 MMLU(大量多任务语言理解)评估中,它是排名第一的开源权重模型。它在 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 基础上微调的,使用了包含 30 万个样本的 Tess-v2.5 数据集,这些样本涉及包括商业和管理、市场营销、历史、社会科学、艺术、STEM 学科和计算机编程在内的多个主题。该数据集使用 Sensei 框架和多个前沿模型(如 GPT-4-Turbo、Claude-Opus 和 Mistral-Large)合成生成。

此模型的计算得到了 KindoAI 的慷慨赞助

在 AGIEval(Nous)子集上的评估中,此模型与首席之父 GPT-4-0314 模型相比也表现非常出色。

训练过程

通过使用Qwen2-72B的基础权重启动Tess-v2.5模型,随后使用Tess-v2.5数据集进行微调,其中Axolotl作为训练框架。大多数Tess模型遵循一个常见的微调方法:低学习率、低迭代次数和采用极高质量和多样化的数据。该模型在微软Azure的4xA100 VM上进行了4天的训练。该模型尚未与RLHF或DPO对齐。

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

评估结果

Tess-v2.5模型是一个整体平衡良好的模型。与该模型相关的所有评估结果均可通过Evals文件夹访问。

完整的评估比较表可以在以下位置访问:Google Spreadsheet

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

限制与偏差

虽然这个模型旨在提高精度,但它有时可能会产生不准确或误导性结果。

尽管对预训练数据进行过仔细的优化,仍有可能生成不适当、有偏见或冒犯性内容。

在必要时请谨慎并交叉验证信息。这是一个未经审查的模型。