Code Monkey home page Code Monkey logo

deep_training's Introduction

transformer is all you need.

  • Upstream and downstream training framework based on lightning and transformers
  • pure code

install and download

  • pip install -U deep_training
  • 源码安装
pip uninstall deep_training
pip install -U git+https://github.com/ssbuild/deep_training.git
  • 源码重装
pip install -U git+https://github.com/ssbuild/deep_training.git --no-deps --force-reinstall

examples

dev plan

  • 支持 datasets on the way
  • 支持 transformer Trainer on the way
  • 解耦 lightning on the way

optimizer

   lamb,adma,adamw_hf,adam,adamw,adamw_torch,adamw_torch_fused,adamw_torch_xla,adamw_apex_fused,
   adafactor,adamw_anyprecision,sgd,adagrad,adamw_bnb_8bit,adamw_8bit,lion,lion_8bit,lion_32bit,
   paged_adamw_32bit,paged_adamw_8bit,paged_lion_32bit,paged_lion_8bit,
   lamb_fused_dp adagrad_cpu_dp adam_cpu_dp adam_fused_dp

scheduler

  linear,WarmupCosine,CAWR,CAL,Step,ReduceLROnPlateau, cosine,cosine_with_restarts,polynomial,
  constant,constant_with_warmup,inverse_sqrt,reduce_lr_on_plateau

update

  • 2023-08-16

    • 0.1.21 release 增加 5种 rope scale 方法 , fix chatglm2-6b-32k 推理 rope_ratio
    • 0.1.21.post1 fix moss rope
  • 2023-08-09

    • 0.1.17 update qwen model
    • 0.1.17.post0 update qwen config
  • 2023-08-08

  • 2023-08-05

    • support qwen(千问) 完整训练 qwen_finetuning
    • 0.1.13.post2 fix quantization bug
    • 0.1.14 release fix qwen stream
  • 2023-07-18

  • 2023-07-11

    • 2023-07-11 support baichuan v2 完整训练 baichuan2_finetuning
    • 2023-07-11 fix adalora some bugs
    • 2023-07-16 support rwkv world training
    • 2023-07-16 0.1.12 release
  • 2023-07-04

    • 0.1.11 release
      • fix baichuan and chatglm2 some bugs
      • support conv2d for lora
      • support arrow parquet dataset
  • 2023-06-06

  • 2023-06-06

    • 0.1.9 is merged into 0.1.10
    • 0.1.10
      • release add qlora and support more optimizer and scheduler
      • support lora prompt for deepspeed training
      • support rwkv4 完整训练 rwkv_finetuning
    • 0.1.10.post0
      • fix package setup for cpp and cu code for rwkv4
    • 0.1.10.post1
      • fix infer for rwkv4
  • 2023-05-24

    • 0.1.8 release fix load weight in prompt_tuning,p_tuning,prefix_tuning,adaption_prompt
  • 2023-05-19

    • 0.1.7 release fix 0.1.5 rl bugs
    • 0.1.7.post0 release fix chatglm-6b-int4,chatglm-6b-int4 p-tuning-v2 training , fix ilql lightning import
    • 0.1.7.post1 release fix load weight in prompt_tuning,p_tuning,prefix_tuning,adaption_prompt
  • 2023-05-10

    • 0.1.5 release
    • fix lora v2 modules_to_save 自定义额外训练模块
    • 增加reward ppo llm 完整训练 rlhf_llm
    • 增加reward ppo chatglm 完整训练 rlhf_chatglm
    • 增加reward ppo chatyuan 完整训练 rlhf_chatyuan
    • 0.1.5.post2 release
    • fix prompt modules_to_save 自定义额外训练模块
    • 增加 ilql 离线模式训练 ilql 完整训练 rlhf_llm
    • 0.1.5.post4 release
    • fix opt model hidden_size for ppo ilql
    • fix ppotrainer ilqltrainer deepspeed save weight
    • import AdmaW from transformers or but torch firstly
  • 2023-05-02

    • 0.1.4 增加 prompt_tuning,p_tuning,prefix_tuning,adaption_prompt
  • 2023-04-28

    • 0.1.3.post0 新版本基于lightning
    • pytorch-lightning 更名 lightning
    • 分离numpy-io模块
  • 2023-04-21

    • 0.1.3rc0 增加 moss chat模型 完整训练参考 moss_finetuning
    • moss 量化int4 int8推理
  • 2023-04-11

    • 0.1.2 重构lora v2, 增加adalora
    • 0.1.2.post0 fix lova v1,lova v2 load_in_8bit
  • 2023-04-07

    • deep_training 0.1.1 同步更新chatglm 词表配置信息
  • 2023-04-02

    • release 0.1.0 and lightning >= 2
  • 2023-03-15

    • 增加ChatGLM模型(稳定版>=0.0.18.post7) 完整训练参考 chatglm_finetuning
    • 0.0.18.post8 解决deepspeed进程数据平衡
    • 0.0.18.post9 增加流式输出接口stream_chat接口
    • 0.0.20 ChatGLM lora 加载权重继续训练 , 修改数据数据编码 ,权重自适应
    • 0.0.21.post0 fix ChatGLM deepspeed stage 3 权重加载
  • 2023-03-09

  • 2023-03-08

    • 增加LLaMA 模型(非模型并行版) 完整训练参考 poetry_training
  • 2023-03-02

  • 2023-02-15

    • 增加诗歌PaLM预训练模型
  • 2023-02-13

    • 增加中文语法纠错模型gector, seq2seq语法纠错模型
  • 2023-02-09

    • 增加诗歌t5decoder预训练, 诗歌laMDA预训练模型 , t5encoder 预训练模型
  • 2023-02-07

    • 增加层次分解位置编码选项,让transformer可以处理超长文本
  • 2023-01-24

    • 增加诗歌gpt2预训练,诗歌t5预训练,诗歌unilm预训练
  • 2023-01-20

    • 增加对抗训练 FGM, FGSM_Local,FreeAT, PGD, FGSM,FreeAT_Local, 其中FreeAT推荐使用FreeAT_Local,FGSM 推荐使用 FGSM_Local
  • 2023-01-19

    • 增加promptbertcse监督和非监督模型
  • 2023-01-16

    • 增加diffcse 监督和非监督模型
  • 2023-01-13

    • 增加ESimcse 模型
  • 2023-01-11

    • 增加TSDAE句向量模型
  • 2023-01-09

    • 增加infonce监督和非监督,simcse监督和非监督,SPN4RE关系模型抽取
  • 2023-01-06

    • 增加onerel关系模型抽取,prgc关系模型抽取,pure实体模型提取
  • 2022-12-24

    • 增加unilm模型蒸馏和事件抽取模型
  • 2022-12-16

    • crf_cascad crf级联抽取实体
    • span ner 可重叠多标签,非重叠多标签两种实现方式抽取实体
    • mhs_ner 多头选择实体抽取模型
    • w2ner 实体抽取模型
    • tplinkerplus 实体抽取
    • tpliner 关系抽取模型
    • tplinkerplus 关系抽取模型
    • mhslinker 多头选择关系抽取模型
  • 2022-11-17:

    • simcse-unilm 系列
    • simcse-bert-wwm 系列
    • tnews circle loss
    • afqmc siamese net similar
  • 2022-11-15:

    • unilm autotitle seq2seq autotitle
    • 普通分类,指针提取命名实体,crf提取命名实体
    • prefixtuning 分类 , prefixtuning 分类 , prefixtuning 指针提取命名实体 , prefixtuning crf 提取命名实体
  • 2022-11-12:

    • gplinker (全局指针提取)
    • casrel (A Novel Cascade Binary Tagging Framework for Relational Triple Extraction 参考 https://github.com/weizhepei/CasRel)
    • spliner (指针提取关系 sigmoid pointer or simple pointer)
  • 2022-11-11:

    • cluener_pointer 中文命名实体提取 和 cluener crf 中文命名实体提取
    • tnews 中文分类
  • 2022-11-06:

    • mlm,gpt2,t5等模型预训练任务

tasks

  • 预训练:
    • 数据参考 THUCNews新闻文本分类数据集的子集
    • mlm预训练例子 bert roberta等一些列中文预训练
    • lm预训练例子 gpt2等一些列中文预训练
    • seq2seq 预训练例子 t5 small等一些列中文预训练   
    • unilm 预训练例子 unilm bert roberta 等一些列中文预训练  &nbsp
  • 中文分类:
    • 例子 tnews 中文分类
  • 命名实体提取:
    • 参考数据 cluner
    • cluener 全局指针提取
    • cluener crf提取
    • cluener crf prompt提取
    • cluener mhs ner多头选择提取
    • cluener span指针提取
    • cluener crf 级联提取
    • cluener tplinkerplus 提取
    • pure 提取
    • cluener w2ner 提取
  • 关系提取
    • 参考数据 duie和法研杯第一阶段数据
    • gplinker 关系提取
    • casrel 关系提取
    • spliner 关系提取
    • mhslinker 关系提取
    • tplinker 关系提取
    • tplinkerplus 关系提取
    • onerel 关系抽取
    • prgc 关系提取
    • spn4re 关系提取
  • 事件提取
  • prompt 系列:
    • 例子 prefixprompt tnews中文分类
    • 例子 prefixtuning tnews 中文分类
    • 例子 prefixtuning cluener 命名实体全局指针提取
    • 例子 prefixtuning cluener 命名实体crf提取
    • 例子 prompt mlm 自行构建数据模板集,训练参考 pretrain/mlm_pretrain
    • 例子 prompt lm 自行构建数据模板集,训练参考 pretrain/seq2seq_pretrain , pretrain/lm_pretrain
  • simcse 系列:
  • sentense embeding:
    • circle loss 例子 tnews circle loss
    • siamese net 例子 afqmc siamese net similar

works

Create a model factory, lightweight and efficient training program and make it easier, training model easier to get started.

Star History

Star History Chart

discuss

QQ group:185144988

deep_training's People

Contributors

ssbuild avatar liuxiaocs7 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.