HuggingFace镜像/CatPPT-base
模型介绍文件和版本分析
下载使用量0

😼 CatPPT

为您介绍“CatPPT”——它是城里那只总爱藏着掖着的“大猫”的绝佳替代品!我们这只“猫咪朋友”是通过 Gradient SLERP 方法融合 openchat 和 neuralchat 模型(成果为 rishiraj/CatPPT-base),然后在 no_robots 数据集上针对聊天功能进行微调而创建的。

这是排行榜上表现最佳的 7B 模型,完全没有评估数据污染的痕迹。

模型日期

rishiraj/CatPPT 的训练时间为 2023 年 12 月 15 日至 17 日。

评估

该模型在 [Open_LLM_Leaderboard] 上取得了以下结果。发布时,CatPPT 是排行榜上排名最高的 7B 聊天模型,并且完全没有评估数据污染。

模型平均ARCHellaSwagMMLUTruthfulQAWinograndeGSM8K
rishiraj/CatPPT72.3268.0986.6965.1661.5581.6170.81
Intel/neural-chat-7b-v3-369.8366.8985.2663.0763.0179.6461.11
openchat/openchat-3.5-121068.8964.9384.9264.6252.1580.7465.96
meta-math/MetaMath-Mistral-7B65.7860.6782.5861.9544.8975.7768.84
Deci/DeciLM-7B-instruct63.1961.0182.3760.2449.7579.7246.02
mistralai/Mistral-7B-Instruct-v0.265.7163.1484.8860.7868.2677.1940.03
mistralai/Mixtral-8x7B-Instruct-v0.172.6270.2287.6371.1664.5881.3760.73
meta-llama/Llama-2-70b-hf67.8767.3287.3369.8344.9283.7454.06
tiiuae/falcon-180B67.8569.4588.8670.545.4786.945.94

推理流程

以下是如何使用 🤗 Transformers 中的 pipeline() 函数运行模型的方法:

import argparse
import torch
from openmind import is_torch_npu_available,pipeline


def parse_args():
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--model_name_or_path",
        type=str,
        help="Path to model",
        default=None,
    )
    args = parser.parse_args()
    return args

def main():
    args = parse_args()
    model_path = args.model_name_or_path
    if is_torch_npu_available():
        device = "npu:0"
    else:
        device = "cpu"

    pipe = pipeline("text-generation", model=model_path, torch_dtype=torch.bfloat16,device=device)


    messages = [
        {
            "role": "system",
            "content": "You are a friendly chatbot who always responds in the style of a pirate"
        },
        {
            "role": "user",
            "content": "How many helicopters can a human eat in one sitting?"
        }
    ]
    prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
    outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
    print(outputs[0]["generated_text"])

if __name__ == "__main__":
    main()

训练过程

训练超参数

训练过程中使用了以下超参数:

  • learning_rate: 2e-05
  • train_batch_size: 4
  • eval_batch_size: 8
  • seed: 42
  • distributed_type: multi-GPU
  • gradient_accumulation_steps: 128
  • total_train_batch_size: 512
  • optimizer: Adam,betas=(0.9,0.999),epsilon=1e-08
  • lr_scheduler_type: cosine
  • num_epochs: 1

训练结果

训练损失轮次步数验证损失
1.99470.1632.0093

框架版本

  • Transformers 4.36.1
  • Pytorch 2.1.2+cu121
  • Datasets 2.14.6
  • Tokenizers 0.15.0
  • PEFT 0.6.1

引用信息

@misc{rishiraj2023catppt,
  author = {Rishiraj Acharya},
  title = {CatPPT},
  year = {2023},
  publisher = {Hugging Face},
  journal = {Hugging Face repository},
  howpublished = {\url{https://modelers.cn/models/changsha-aicc/CatPPT-base}}
}