1. 09 Nov, 2023 1 commit
    • Wenhao Chen's avatar
      [moe]: fix ep/tp tests, add hierarchical all2all (#4982) · 72444127
      Wenhao Chen authored
      * fix: add warning for EP different behavior
      
      * fix: use shard_data in ep & tp model
      
      * to: add used_capacity
      
      * fix: fix router test
      
      * feat: add create_ep_node_group
      
      * feat: add create_ep_hierarchical_group fn
      
      * feat: add HierarchicalAllToAll
      
      * test: add hierarchical all2all test
      
      * fix: fix test errors
      
      * fix: simplify create_ep_hierarchical_group
      
      * fix: add hierarchical_alltoall arg
      
      * fix: fix environ typo
      
      * revert: revert process mesh order
      
      * to: add todo mark
      
      * fix: skip hierarchical_comm if torch < 1.13.1
      72444127
  2. 08 Nov, 2023 1 commit
    • Xuanlei Zhao's avatar
      [moe] support optimizer checkpoint (#5015) · f71e63b0
      Xuanlei Zhao authored
      * Refactor MoE Manager setup method
      
      * unshard optim ckpt
      
      * optim io
      
      * update transformer version
      
      * update requirements
      
      * update ckpt
      
      * update ckpt
      
      * update ckpt
      
      * fix engine
      
      * fix engine
      f71e63b0
  3. 07 Nov, 2023 1 commit
  4. 06 Nov, 2023 1 commit
  5. 03 Nov, 2023 1 commit
    • littsk's avatar
      [hotfix] Add layer norm gradients all-reduce for sequence parallel (#4926) · 1a3315e3
      littsk authored
      
      
      * [hotfix] Add layer norm gradients all-reduce for sequence parallel. (#4915)
      
      * Add layer norm gradients all-reduce for sequence parallel.
      
      * skip pipeline inference test
      
      * [hotfix] fixing polices of sequence parallel (#4922)
      
      * Add layer norm gradients all-reduce for sequence parallel.
      
      * fix parameter passing when calling get_autopolicy
      
      ---------
      Co-authored-by: default avatarlittsk <1214689160@qq.com>
      
      * Hotfix/add grad all reduce for sequence parallel (#4927)
      
      * Add layer norm gradients all-reduce for sequence parallel.
      
      
      * fix parameter passing when calling get_autopolicy
      
      * fix bug using wrong variables
      
      ---------
      Co-authored-by: default avatarlittsk <1214689160@qq.com>
      
      * fix policy initialization
      
      * fix bloom and chatglm policices
      
      * polish code of handling layernorm
      
      * fix moe module
      
      * polish code of class initializing
      
      ---------
      Co-authored-by: default avatarZhongkai Zhao <kanezz620@gmail.com>
      1a3315e3
  6. 02 Nov, 2023 2 commits
  7. 01 Nov, 2023 1 commit
    • Bin Jia's avatar
      [Pipeline Inference] Merge pp with tp (#4993) · b6696beb
      Bin Jia authored
      * refactor pipeline into new CaiInferEngine
      
      * updata llama modeling forward
      
      * merge tp with pp
      
      * update docstring
      
      * optimize test workflow and example
      
      * fix typo
      
      * add assert and todo
      b6696beb
  8. 30 Oct, 2023 2 commits
    • Cuiqing Li's avatar
      [Kernels]Updated Triton kernels into 2.1.0 and adding flash-decoding for llama... · 459a88c8
      Cuiqing Li authored
      
      [Kernels]Updated Triton kernels into 2.1.0 and adding flash-decoding for llama token attention  (#4965)
      
      * adding flash-decoding
      
      * clean
      
      * adding kernel
      
      * adding flash-decoding
      
      * add integration
      
      * add
      
      * adding kernel
      
      * adding kernel
      
      * adding triton 2.1.0 features for inference
      
      * update bloom triton kernel
      
      * remove useless vllm kernels
      
      * clean codes
      
      * fix
      
      * adding files
      
      * fix readme
      
      * update llama flash-decoding
      
      ---------
      Co-authored-by: default avatarcuiqing.li <lixx336@gmail.com>
      459a88c8
    • Jianghai's avatar
      [Inference] Dynamic Batching Inference, online and offline (#4953) · cf579ff4
      Jianghai authored
      
      
      * [inference] Dynamic Batching for Single and Multiple GPUs (#4831)
      
      * finish batch manager
      
      * 1
      
      * first
      
      * fix
      
      * fix dynamic batching
      
      * llama infer
      
      * finish test
      
      * support different lengths generating
      
      * del prints
      
      * del prints
      
      * fix
      
      * fix bug
      
      ---------
      
      Co-authored-by: CjhHa1 <cjh18671720497outlook.com>
      
      * [inference] Async dynamic batching  (#4894)
      
      * finish input and output logic
      
      * add generate
      
      * test forward
      
      * 1
      
      * [inference]Re push async dynamic batching (#4901)
      
      * adapt to ray server
      
      * finish async
      
      * finish test
      
      * del test
      
      ---------
      Co-authored-by: default avataryuehuayingxueluo <867460659@qq.com>
      
      * Revert "[inference]Re push async dynamic batching (#4901)" (#4905)
      
      This reverts commit fbf3c09e673794ed18c91d4bab1a7dfea052e95a.
      
      * Revert "[inference] Async dynamic batching  (#4894)"
      
      This reverts commit fced14025043e29ce816b315f440601188f7f79f.
      
      * Revert "[inference] Async dynamic batching  (#4894)" (#4909)
      
      This reverts commit fced14025043e29ce816b315f440601188f7f79f.
      
      * Add Ray Distributed Environment Init Scripts
      
      * support DynamicBatchManager base function
      
      * revert _set_tokenizer version
      
      * add driver async generate
      
      * add async test
      
      * fix bugs in test_ray_dist.py
      
      * add get_tokenizer.py
      
      * fix code style
      
      * fix bugs about No module named 'pydantic' in ci test
      
      * fix bugs in ci test
      
      * fix bugs in ci test
      
      * fix bugs in ci test
      
      * [infer]Add Ray Distributed Environment Init Scripts (#4911)
      
      * Revert "[inference] Async dynamic batching  (#4894)"
      
      This reverts commit fced14025043e29ce816b315f440601188f7f79f.
      
      * Add Ray Distributed Environment Init Scripts
      
      * support DynamicBatchManager base function
      
      * revert _set_tokenizer version
      
      * add driver async generate
      
      * add async test
      
      * fix bugs in test_ray_dist.py
      
      * add get_tokenizer.py
      
      * fix code style
      
      * fix bugs about No module named 'pydantic' in ci test
      
      * fix bugs in ci test
      
      * fix bugs in ci test
      
      * fix bugs in ci test
      
      * support dynamic batch for bloom model and is_running function
      
      * [Inference]Test for new Async engine (#4935)
      
      * infer engine
      
      * infer engine
      
      * test engine
      
      * test engine
      
      * new manager
      
      * change step
      
      * add
      
      * test
      
      * fix
      
      * fix
      
      * finish test
      
      * finish test
      
      * finish test
      
      * finish test
      
      * add license
      
      ---------
      Co-authored-by: default avataryuehuayingxueluo <867460659@qq.com>
      
      * add assertion for config (#4947)
      
      * [Inference] Finish dynamic batching offline test (#4948)
      
      * test
      
      * fix test
      
      * fix quant
      
      * add default
      
      * fix
      
      * fix some bugs
      
      * fix some bugs
      
      * fix
      
      * fix bug
      
      * fix bugs
      
      * reset param
      
      ---------
      Co-authored-by: default avataryuehuayingxueluo <867460659@qq.com>
      Co-authored-by: default avatarCuiqing Li <lixx3527@gmail.com>
      Co-authored-by: CjhHa1 <cjh18671720497outlook.com>
      cf579ff4
  9. 27 Oct, 2023 1 commit
    • Bin Jia's avatar
      [Pipeline inference] Combine kvcache with pipeline inference (#4938) · 1db67276
      Bin Jia authored
      * merge kvcache with pipeline inference and refactor the code structure
      
      * support ppsize > 2
      
      * refactor pipeline code
      
      * do pre-commit
      
      * modify benchmark
      
      * fix bench mark
      
      * polish code
      
      * add docstring and update readme
      
      * refactor the code
      
      * fix some logic bug of ppinfer
      
      * polish readme
      
      * fix typo
      
      * skip infer test
      1db67276
  10. 20 Oct, 2023 1 commit
  11. 19 Oct, 2023 1 commit
    • Cuiqing Li's avatar
      [Refactor] Integrated some lightllm kernels into token-attention (#4946) · 3a41e830
      Cuiqing Li authored
      
      
      * add some req for inference
      
      * clean codes
      
      * add codes
      
      * add some lightllm deps
      
      * clean codes
      
      * hello
      
      * delete rms files
      
      * add some comments
      
      * add comments
      
      * add doc
      
      * add lightllm deps
      
      * add lightllm cahtglm2 kernels
      
      * add lightllm cahtglm2 kernels
      
      * replace rotary embedding with lightllm kernel
      
      * add some commnets
      
      * add some comments
      
      * add some comments
      
      * add
      
      * replace fwd kernel att1
      
      * fix a arg
      
      * add
      
      * add
      
      * fix token attention
      
      * add some comments
      
      * clean codes
      
      * modify comments
      
      * fix readme
      
      * fix bug
      
      * fix bug
      
      ---------
      Co-authored-by: default avatarcuiqing.li <lixx336@gmail.com>
      Co-authored-by: default avatarCjhHa1 <cjh18671720497@outlook.com>
      3a41e830
  12. 18 Oct, 2023 3 commits
  13. 17 Oct, 2023 1 commit
    • Baizhou Zhang's avatar
      [gemini] support gradient accumulation (#4869) · 21ba89ca
      Baizhou Zhang authored
      * add test
      
      * fix no_sync bug in low level zero plugin
      
      * fix test
      
      * add argument for grad accum
      
      * add grad accum in backward hook for gemini
      
      * finish implementation, rewrite tests
      
      * fix test
      
      * skip stuck model in low level zero test
      
      * update doc
      
      * optimize communication & fix gradient checkpoint
      
      * modify doc
      
      * cleaning codes
      
      * update cpu adam fp16 case
      21ba89ca
  14. 16 Oct, 2023 2 commits
    • Hongxin Liu's avatar
      [kernel] support pure fp16 for cpu adam and update gemini optim tests (#4921) · 4f68b3f1
      Hongxin Liu authored
      * [kernel] support pure fp16 for cpu adam (#4896)
      
      * [kernel] fix cpu adam kernel for pure fp16 and update tests (#4919)
      
      * [kernel] fix cpu adam
      
      * [test] update gemini optim test
      4f68b3f1
    • Xu Kai's avatar
      [inference] Add smmoothquant for llama (#4904) · 611a5a80
      Xu Kai authored
      * [inference] add int8 rotary embedding kernel for smoothquant (#4843)
      
      * [inference] add smoothquant llama attention (#4850)
      
      * add smoothquant llama attention
      
      * remove uselss code
      
      * remove useless code
      
      * fix import error
      
      * rename file name
      
      * [inference] add silu linear fusion for smoothquant llama mlp  (#4853)
      
      * add silu linear
      
      * update skip condition
      
      * catch smoothquant cuda lib exception
      
      * prcocess exception for tests
      
      * [inference] add llama mlp for smoothquant (#4854)
      
      * add llama mlp for smoothquant
      
      * fix down out scale
      
      * remove duplicate lines
      
      * add llama mlp check
      
      * delete useless code
      
      * [inference] add smoothquant llama (#4861)
      
      * add smoothquant llama
      
      * fix attention accuracy
      
      * fix accuracy
      
      * add kv cache and save pretrained
      
      * refactor example
      
      * delete smooth
      
      * refactor code
      
      * [inference] add smooth function and delete useless code for smoothquant (#4895)
      
      * add smooth function and delete useless code
      
      * update datasets
      
      * remove duplicate import
      
      * delete useless file
      
      * refactor codes (#4902)
      
      * rafactor code
      
      * add license
      
      * add torch-int and smoothquant license
      611a5a80
  15. 13 Oct, 2023 1 commit
  16. 12 Oct, 2023 3 commits
  17. 11 Oct, 2023 3 commits
    • littsk's avatar
      ffd9a3cb
    • Xu Kai's avatar
      fix test llama (#4884) · fdec650b
      Xu Kai authored
      fdec650b
    • Bin Jia's avatar
      [Pipeline Inference] Sync pipeline inference branch to main (#4820) · 08a9f76b
      Bin Jia authored
      * [pipeline inference] pipeline inference (#4492)
      
      * add pp stage manager as circle stage
      
      * fix a bug when create process group
      
      * add ppinfer basic framework
      
      * add micro batch manager and support kvcache-pp gpt2 fwd
      
      * add generate schedule
      
      * use mb size to control mb number
      
      * support generate with kv cache
      
      * add output, remove unused code
      
      * add test
      
      * reuse shardformer to build model
      
      * refactor some code and use the same attribute name of hf
      
      * fix review and add test for generation
      
      * remove unused file
      
      * fix CI
      
      * add cache clear
      
      * fix code error
      
      * fix typo
      
      * [Pipeline inference] Modify to tieweight (#4599)
      
      * add pp stage manager as circle stage
      
      * fix a bug when create process group
      
      * add ppinfer basic framework
      
      * add micro batch manager and support kvcache-pp gpt2 fwd
      
      * add generate schedule
      
      * use mb size to control mb number
      
      * support generate with kv cache
      
      * add output, remove unused code
      
      * add test
      
      * reuse shardformer to build model
      
      * refactor some code and use the same attribute name of hf
      
      * fix review and add test for generation
      
      * remove unused file
      
      * modify the way of saving newtokens
      
      * modify to tieweight
      
      * modify test
      
      * remove unused file
      
      * solve review
      
      * add docstring
      
      * [Pipeline inference] support llama pipeline inference (#4647)
      
      * support llama pipeline inference
      
      * remove tie weight operation
      
      * [pipeline inference] Fix the blocking of communication when ppsize is 2 (#4708)
      
      * add benchmark verbose
      
      * fix export tokens
      
      * fix benchmark verbose
      
      * add P2POp style to do p2p communication
      
      * modify schedule as p2p type when ppsize is 2
      
      * remove unused code and add docstring
      
      * [Pipeline inference] Refactor code, add docsting, fix bug (#4790)
      
      * add benchmark script
      
      * update argparse
      
      * fix fp16 load
      
      * refactor code style
      
      * add docstring
      
      * polish code
      
      * fix test bug
      
      * [Pipeline inference] Add pipeline inference docs (#4817)
      
      * add readme doc
      
      * add a ico
      
      * Add performance
      
      * update table of contents
      
      * refactor code (#4873)
      08a9f76b
  18. 07 Oct, 2023 1 commit
  19. 05 Oct, 2023 1 commit
  20. 04 Oct, 2023 2 commits
  21. 26 Sep, 2023 2 commits
  22. 22 Sep, 2023 2 commits
    • Jianghai's avatar
      [inference] chatglm2 infer demo (#4724) · ce7ade38
      Jianghai authored
      * add chatglm2
      
      * add
      
      * gather needed kernels
      
      * fix some bugs
      
      * finish context forward
      
      * finish context stage
      
      * fix
      
      * add
      
      * pause
      
      * add
      
      * fix bugs
      
      * finish chatglm
      
      * fix bug
      
      * change some logic
      
      * fix bugs
      
      * change some logics
      
      * add
      
      * add
      
      * add
      
      * fix
      
      * fix tests
      
      * fix
      ce7ade38
    • Xu Kai's avatar
      [feature] add gptq for inference (#4754) · 946ab56c
      Xu Kai authored
      * [gptq] add gptq kernel (#4416)
      
      * add gptq
      
      * refactor code
      
      * fix tests
      
      * replace auto-gptq
      
      * rname inferance/quant
      
      * refactor test
      
      * add auto-gptq as an option
      
      * reset requirements
      
      * change assert and check auto-gptq
      
      * add import warnings
      
      * change test flash attn version
      
      * remove example
      
      * change requirements of flash_attn
      
      * modify tests
      
      * [skip ci] change requirements-test
      
      * [gptq] faster gptq cuda kernel (#4494)
      
      * [skip ci] add cuda kernels
      
      * add license
      
      * [skip ci] fix max_input_len
      
      * format files & change test size
      
      * [skip ci]
      
      * [gptq] add gptq tensor parallel (#4538)
      
      * add gptq tensor parallel
      
      * add gptq tp
      
      * delete print
      
      * add test gptq check
      
      * add test auto gptq check
      
      * [gptq] combine gptq and kv cache manager (#4706)
      
      * combine gptq and kv cache manager
      
      * add init bits
      
      * delete useless code
      
      * add model path
      
      * delete usless print and update test
      
      * delete usless import
      
      * move option gptq to shard config
      
      * change replace linear to shardformer
      
      * update bloom policy
      
      * delete useless code
      
      * fix import bug and delete uselss code
      
      * change colossalai/gptq to colossalai/quant/gptq
      
      * update import linear for tests
      
      * delete useless code and mv gptq_kernel to kernel directory
      
      * fix triton kernel
      
      * add triton import
      946ab56c
  23. 21 Sep, 2023 1 commit
    • Hongxin Liu's avatar
      [lazy] support torch 2.0 (#4763) · 3e05c07b
      Hongxin Liu authored
      * [lazy] support _like methods and clamp
      
      * [lazy] pass transformers models
      
      * [lazy] fix device move and requires grad
      
      * [lazy] fix requires grad and refactor api
      
      * [lazy] fix requires grad
      3e05c07b
  24. 20 Sep, 2023 1 commit
  25. 19 Sep, 2023 1 commit
  26. 18 Sep, 2023 1 commit
    • Hongxin Liu's avatar
      [legacy] clean up legacy code (#4743) · b5f9e37c
      Hongxin Liu authored
      * [legacy] remove outdated codes of pipeline (#4692)
      
      * [legacy] remove cli of benchmark and update optim (#4690)
      
      * [legacy] remove cli of benchmark and update optim
      
      * [doc] fix cli doc test
      
      * [legacy] fix engine clip grad norm
      
      * [legacy] remove outdated colo tensor (#4694)
      
      * [legacy] remove outdated colo tensor
      
      * [test] fix test import
      
      * [legacy] move outdated zero to legacy (#4696)
      
      * [legacy] clean up utils (#4700)
      
      * [legacy] clean up utils
      
      * [example] update examples
      
      * [legacy] clean up amp
      
      * [legacy] fix amp module
      
      * [legacy] clean up gpc (#4742)
      
      * [legacy] clean up context
      
      * [legacy] clean core, constants and global vars
      
      * [legacy] refactor initialize
      
      * [example] fix examples ci
      
      * [example] fix examples ci
      
      * [legacy] fix tests
      
      * [example] fix gpt example
      
      * [example] fix examples ci
      
      * [devops] fix ci installation
      
      * [example] fix examples ci
      b5f9e37c
  27. 15 Sep, 2023 1 commit
  28. 12 Sep, 2023 1 commit