GithubHelp home page GithubHelp logo

pai-megatron-patch's Introduction

简介

Pai-Megatron-Patch工具是阿里云机器学习平台PAI算法团队研发,基于灵骏智算平台的大模型最佳实践解决方案配套工具,旨在帮助大模型开发者快速上手灵骏产品,完成大语言模型(LLM)的高效分布式训练,有监督指令微调,模型离线推理验证等完整大模型开发链路。该项目提供了基于Megatron-LM的大模型训练&离线推理验证流程,方便用户快速上手大模型训练。

Pai-Megatron-Patch工具基于英伟达的Megatron-LM框架来构建大模型开发链路。设计上对Megatron-LM源码非侵入式修改,采用补丁方式对接Megatron-LM训练加速库。patch中包含模型库,分词器,模型转换,强化学习,离线文本生成以及使用示例和工具集。在模型库中包含热门大模型的Megatron版本实现以及对应的数据ID化流程。同时patch提供了huggingface模型权重到megatron模型权重的转换,方便用户加载huggingface的权重进行继续预训练或者微调。patch还提供了对训练好的megatron模型权重到huggingface模型权重的转换,方便用户使用huggingface的评估流程对模型质量进行客观评估或者使用huggingface的离线文本生成流水线。在强化学习部分,patch提供了PPO训练流程等,方便用户使用SFT模型和RM模型进行强化学习。同时patch提供了大量的使用示例帮助用户快速开始大模型训练&离线推理。目前patch中支持的大模型有主要baichuan,bloom,chatglm,falcon,galactica,glm,llama,qwen和starcoder,后续还会根据需要及时添加新的Megatron版大模型实现。 具体在阿里云灵骏产品的使用流程请参考: 智算服务PAI灵骏大模型分布式训练方案

快速开始

环境准备

数据准备

HFDS有监督微调&继续预训练

Megatron有监督微调&继续预训练

人类反馈强化学习

模型离线推理

License

This project is licensed under the Apache License (Version 2.0). This toolkit also contains some code modified from other repos under other open-source licenses. See the NOTICE file for more information.

pai-megatron-patch's People

Contributors

alibaba-oss avatar jerryli1981 avatar lwmlyy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.