1. 15 Sep, 2023 7 commits
  2. 14 Sep, 2023 3 commits
  3. 13 Sep, 2023 2 commits
  4. 12 Sep, 2023 4 commits
  5. 11 Sep, 2023 4 commits
    • Cuiqing Li's avatar
      [Feature] The first PR to Add TP inference engine, kv-cache manager and... · bce0f167
      Cuiqing Li authored
      
      [Feature] The first PR to Add TP inference engine, kv-cache manager and related kernels for our inference system (#4577)
      
      * [infer] Infer/llama demo (#4503)
      
      * add
      
      * add infer example
      
      * finish
      
      * finish
      
      * stash
      
      * fix
      
      * [Kernels]  add inference token attention kernel (#4505)
      
      * add token forward
      
      * fix tests
      
      * fix comments
      
      * add try import triton
      
      * add adapted license
      
      * add tests check
      
      * [Kernels] add necessary kernels (llama & bloom) for attention forward and kv-cache manager  (#4485)
      
      * added _vllm_rms_norm
      
      * change place
      
      * added tests
      
      * added tests
      
      * modify
      
      * adding kernels
      
      * added tests:
      
      * adding kernels
      
      * modify
      
      * added
      
      * updating kernels
      
      * adding tests
      
      * added tests
      
      * kernel change
      
      * submit
      
      * modify
      
      * added
      
      * edit comments
      
      * change name
      
      * change commnets and fix import
      
      * add
      
      * added
      
      * combine codes (#4509)
      
      * [feature] add KV cache manager for llama & bloom inference (#4495)
      
      * add kv cache memory manager
      
      * add stateinfo during inference
      
      * format
      
      * format
      
      * rename file
      
      * add kv cache test
      
      * revise on BatchInferState
      
      * file dir change
      
      * [Bug FIx] import llama context ops fix (#4524)
      
      * added _vllm_rms_norm
      
      * change place
      
      * added tests
      
      * added tests
      
      * modify
      
      * adding kernels
      
      * added tests:
      
      * adding kernels
      
      * modify
      
      * added
      
      * updating kernels
      
      * adding tests
      
      * added tests
      
      * kernel change
      
      * submit
      
      * modify
      
      * added
      
      * edit comments
      
      * change name
      
      * change commnets and fix import
      
      * add
      
      * added
      
      * fix
      
      * add ops into init.py
      
      * add
      
      * [Infer] Add TPInferEngine and fix file path (#4532)
      
      * add engine for TP inference
      
      * move file path
      
      * update path
      
      * fix TPInferEngine
      
      * remove unused file
      
      * add engine test demo
      
      * revise TPInferEngine
      
      * fix TPInferEngine, add test
      
      * fix
      
      * Add Inference test for llama (#4508)
      
      * add kv cache memory manager
      
      * add stateinfo during inference
      
      * add
      
      * add infer example
      
      * finish
      
      * finish
      
      * format
      
      * format
      
      * rename file
      
      * add kv cache test
      
      * revise on BatchInferState
      
      * add inference test for llama
      
      * fix conflict
      
      * feature: add some new features for llama engine
      
      * adapt colossalai triton interface
      
      * Change the parent class of llama  policy
      
      * add nvtx
      
      * move llama inference code to tensor_parallel
      
      * fix __init__.py
      
      * rm tensor_parallel
      
      * fix: fix bugs in auto_policy.py
      
      * fix:rm some unused codes
      
      * mv colossalai/tpinference to colossalai/inference/tensor_parallel
      
      * change __init__.py
      
      * save change
      
      * fix engine
      
      * Bug fix: Fix hang
      
      * remove llama_infer_engine.py
      
      ---------
      Co-authored-by: default avataryuanheng-zhao <jonathan.zhaoyh@gmail.com>
      Co-authored-by: default avatarCjhHa1 <cjh18671720497@outlook.com>
      
      * [infer] Add Bloom inference policy and replaced methods (#4512)
      
      * add bloom inference methods and policy
      
      * enable pass BatchInferState from model forward
      
      * revise bloom infer layers/policies
      
      * add engine for inference (draft)
      
      * add test for bloom infer
      
      * fix bloom infer policy and flow
      
      * revise bloom test
      
      * fix bloom file path
      
      * remove unused codes
      
      * fix bloom modeling
      
      * fix dir typo
      
      * fix trivial
      
      * fix policy
      
      * clean pr
      
      * trivial fix
      
      * Revert "[infer] Add Bloom inference policy and replaced methods (#4512)" (#4552)
      
      This reverts commit 17cfa5714083a81a505c097f1c411cd28162d922.
      
      * [Doc] Add colossal inference doc (#4549)
      
      * create readme
      
      * add readme.md
      
      * fix typos
      
      * [infer] Add Bloom inference policy and replaced methods (#4553)
      
      * add bloom inference methods and policy
      
      * enable pass BatchInferState from model forward
      
      * revise bloom infer layers/policies
      
      * add engine for inference (draft)
      
      * add test for bloom infer
      
      * fix bloom infer policy and flow
      
      * revise bloom test
      
      * fix bloom file path
      
      * remove unused codes
      
      * fix bloom modeling
      
      * fix dir typo
      
      * fix trivial
      
      * fix policy
      
      * clean pr
      
      * trivial fix
      
      * trivial
      
      * Fix Bugs In Llama Model Forward (#4550)
      
      * add kv cache memory manager
      
      * add stateinfo during inference
      
      * add
      
      * add infer example
      
      * finish
      
      * finish
      
      * format
      
      * format
      
      * rename file
      
      * add kv cache test
      
      * revise on BatchInferState
      
      * add inference test for llama
      
      * fix conflict
      
      * feature: add some new features for llama engine
      
      * adapt colossalai triton interface
      
      * Change the parent class of llama  policy
      
      * add nvtx
      
      * move llama inference code to tensor_parallel
      
      * fix __init__.py
      
      * rm tensor_parallel
      
      * fix: fix bugs in auto_policy.py
      
      * fix:rm some unused codes
      
      * mv colossalai/tpinference to colossalai/inference/tensor_parallel
      
      * change __init__.py
      
      * save change
      
      * fix engine
      
      * Bug fix: Fix hang
      
      * remove llama_infer_engine.py
      
      * bug fix: fix bugs about infer_state.is_context_stage
      
      * remove pollcies
      
      * fix: delete unused code
      
      * fix: delete unused code
      
      * remove unused coda
      
      * fix conflict
      
      ---------
      Co-authored-by: default avataryuanheng-zhao <jonathan.zhaoyh@gmail.com>
      Co-authored-by: default avatarCjhHa1 <cjh18671720497@outlook.com>
      
      * [doc] add colossal inference fig (#4554)
      
      * create readme
      
      * add readme.md
      
      * fix typos
      
      * upload fig
      
      * [NFC] fix docstring for colossal inference (#4555)
      
      Fix docstring and comments in kv cache manager and bloom modeling
      
      * fix docstring in llama modeling (#4557)
      
      * [Infer] check import vllm (#4559)
      
      * change import vllm
      
      * import apply_rotary_pos_emb
      
      * change import location
      
      * [DOC] add installation req (#4561)
      
      * add installation req
      
      * fix
      
      * slight change
      
      * remove empty
      
      * [Feature] rms-norm transfer into inference llama.py  (#4563)
      
      * add installation req
      
      * fix
      
      * slight change
      
      * remove empty
      
      * add rmsnorm polciy
      
      * add
      
      * clean codes
      
      * [infer] Fix tp inference engine (#4564)
      
      * fix engine prepare data
      
      * add engine test
      
      * use bloom for testing
      
      * revise on test
      
      * revise on test
      
      * reset shardformer llama (#4569)
      
      * [infer] Fix engine - tensors on different devices (#4570)
      
      
      * fix diff device in engine
      
      * [codefactor] Feature/colossal inference (#4579)
      
      * code factors
      
      * remove
      
      * change coding (#4581)
      
      * [doc] complete README of colossal inference (#4585)
      
      * complete fig
      
      * Update README.md
      
      * [doc]update readme (#4586)
      
      * update readme
      
      * Update README.md
      
      * bug fix: fix bus in llama and bloom (#4588)
      
      * [BUG FIX]Fix test engine in CI and non-vllm kernels llama forward  (#4592)
      
      * fix tests
      
      * clean
      
      * clean
      
      * fix bugs
      
      * add
      
      * fix llama non-vllm kernels bug
      
      * modify
      
      * clean codes
      
      * [Kernel]Rmsnorm fix (#4598)
      
      * fix tests
      
      * clean
      
      * clean
      
      * fix bugs
      
      * add
      
      * fix llama non-vllm kernels bug
      
      * modify
      
      * clean codes
      
      * add triton rmsnorm
      
      * delete vllm kernel flag
      
      * [Bug Fix]Fix bugs in llama (#4601)
      
      * fix tests
      
      * clean
      
      * clean
      
      * fix bugs
      
      * add
      
      * fix llama non-vllm kernels bug
      
      * modify
      
      * clean codes
      
      * bug fix: remove rotary_positions_ids
      
      ---------
      Co-authored-by: default avatarcuiqing.li <lixx3527@gmail.com>
      
      * [kernel] Add triton layer norm & replace norm for bloom (#4609)
      
      * add layernorm for inference
      
      * add test for layernorm kernel
      
      * add bloom layernorm replacement policy
      
      * trivial: path
      
      * [Infer] Bug fix rotary embedding in llama (#4608)
      
      * fix rotary embedding
      
      * delete print
      
      * fix init seq len bug
      
      * rename pytest
      
      * add benchmark for llama
      
      * refactor codes
      
      * delete useless code
      
      * [bench] Add bloom inference benchmark (#4621)
      
      * add bloom benchmark
      
      * readme - update benchmark res
      
      * trivial - uncomment for testing (#4622)
      
      * [Infer] add check triton and cuda version for tests (#4627)
      
      * fix rotary embedding
      
      * delete print
      
      * fix init seq len bug
      
      * rename pytest
      
      * add benchmark for llama
      
      * refactor codes
      
      * delete useless code
      
      * add check triton and cuda
      
      * Update sharder.py (#4629)
      
      * [Inference] Hot fix some bugs and typos (#4632)
      
      * fix
      
      * fix test
      
      * fix conflicts
      
      * [typo]Comments fix (#4633)
      
      * fallback
      
      * fix commnets
      
      * bug fix: fix some bugs in test_llama and test_bloom (#4635)
      
      * [Infer] delete benchmark in tests and fix bug for llama and bloom (#4636)
      
      * fix rotary embedding
      
      * delete print
      
      * fix init seq len bug
      
      * rename pytest
      
      * add benchmark for llama
      
      * refactor codes
      
      * delete useless code
      
      * add check triton and cuda
      
      * delete benchmark and fix infer bugs
      
      * delete benchmark for tests
      
      * delete useless code
      
      * delete bechmark function in utils
      
      * [Fix] Revise TPInferEngine, inference tests and benchmarks (#4642)
      
      * [Fix] revise TPInferEngine methods and inference tests
      
      * fix llama/bloom infer benchmarks
      
      * fix infer tests
      
      * trivial fix: benchmakrs
      
      * trivial
      
      * trivial: rm print
      
      * modify utils filename for infer ops test (#4657)
      
      * [Infer] Fix TPInferEngine init & inference tests, benchmarks (#4670)
      
      * fix engine funcs
      
      * TPInferEngine: receive shard config in init
      
      * benchmarks: revise TPInferEngine init
      
      * benchmarks: remove pytest decorator
      
      * trivial fix
      
      * use small model for tests
      
      * [NFC] use args for infer benchmarks (#4674)
      
      * revise infer default (#4683)
      
      * [Fix] optimize/shard model in TPInferEngine init (#4684)
      
      * remove using orig model in engine
      
      * revise inference tests
      
      * trivial: rename
      
      ---------
      Co-authored-by: default avatarJianghai <72591262+CjhHa1@users.noreply.github.com>
      Co-authored-by: default avatarXu Kai <xukai16@foxmail.com>
      Co-authored-by: default avatarYuanheng Zhao <54058983+yuanheng-zhao@users.noreply.github.com>
      Co-authored-by: default avataryuehuayingxueluo <867460659@qq.com>
      Co-authored-by: default avataryuanheng-zhao <jonathan.zhaoyh@gmail.com>
      Co-authored-by: default avatarCjhHa1 <cjh18671720497@outlook.com>
      bce0f167
    • flybird11111's avatar
      [shardformer]fix gpt2 double head (#4663) · eedaa3e1
      flybird11111 authored
      * [shardformer]fix gpt2 test
      
      [shardformer]fix gpt2 test
      
      [shardformer]fix gpt2 test
      
      * fix
      
      * [shardformer] add todo
      
      * [shardformer] add todo
      eedaa3e1
    • Hongxin Liu's avatar
      [legacy] move communication and nn to legacy and refactor logger (#4671) · 554aa959
      Hongxin Liu authored
      * [legacy] move communication to legacy (#4640)
      
      * [legacy] refactor logger and clean up legacy codes (#4654)
      
      * [legacy] make logger independent to gpc
      
      * [legacy] make optim independent to registry
      
      * [legacy] move test engine to legacy
      
      * [legacy] move nn to legacy (#4656)
      
      * [legacy] move nn to legacy
      
      * [checkpointio] fix save hf config
      
      * [test] remove useledd rpc pp test
      
      * [legacy] fix nn init
      
      * [example] skip tutorial hybriad parallel example
      
      * [devops] test doc check
      
      * [devops] test doc check
      554aa959
    • Hongxin Liu's avatar
      [devops] fix concurrency group (#4667) · 536397cc
      Hongxin Liu authored
      536397cc
  6. 09 Sep, 2023 1 commit
    • flybird11111's avatar
      [shardformer] update llama2/opt finetune example and fix llama2 policy (#4645) · 7486ed7d
      flybird11111 authored
      * [shardformer] update shardformer readme
      
      [shardformer] update shardformer readme
      
      [shardformer] update shardformer readme
      
      * [shardformer] update llama2/opt finetune example and shardformer update to llama2
      
      * [shardformer] update llama2/opt finetune example and shardformer update to llama2
      
      * [shardformer] update llama2/opt finetune example and shardformer update to llama2
      
      * [shardformer] change dataset
      
      * [shardformer] change dataset
      
      * [shardformer] fix CI
      
      * [shardformer] fix
      
      * [shardformer] fix
      
      * [shardformer] fix
      
      * [shardformer] fix
      
      * [shardformer] fix
      
      [example] update opt example
      
      [example] resolve comments
      
      fix
      
      fix
      7486ed7d
  7. 08 Sep, 2023 1 commit
  8. 07 Sep, 2023 3 commits
  9. 06 Sep, 2023 1 commit
  10. 05 Sep, 2023 10 commits
  11. 04 Sep, 2023 4 commits
    • Hongxin Liu's avatar
      Merge branch 'main' into feature/shardformer · a39a5c66
      Hongxin Liu authored
      a39a5c66
    • Baizhou Zhang's avatar
    • flybird11111's avatar
      [shardformer] update bert finetune example with HybridParallelPlugin (#4584) · 0a94fcd3
      flybird11111 authored
      
      
      * [shardformer] fix opt test hanging
      
      * fix
      
      * test
      
      * test
      
      * test
      
      * fix test
      
      * fix test
      
      * remove print
      
      * add fix
      
      * [shardformer] add bert finetune example
      
      * [shardformer] add bert finetune example
      
      * [shardformer] add bert finetune example
      
      * [shardformer] add bert finetune example
      
      * [shardformer] add bert finetune example
      
      * [shardformer] add bert finetune example
      
      * [shardformer] fix epoch change
      
      * [shardformer] broadcast add pp group
      
      * [shardformer] fix opt test hanging
      
      * fix
      
      * test
      
      * test
      
      * [shardformer] zero1+pp and the corresponding tests (#4517)
      
      * pause
      
      * finish pp+zero1
      
      * Update test_shard_vit.py
      
      * [shardformer/fix overlap bug] fix overlap bug, add overlap as an option in shardco… (#4516)
      
      * fix overlap bug and support bert, add overlap as an option in shardconfig
      
      * support overlap for chatglm and bloom
      
      * [shardformer] fix emerged bugs after updating transformers (#4526)
      
      * test
      
      * fix test
      
      * fix test
      
      * remove print
      
      * add fix
      
      * [shardformer] add bert finetune example
      
      * [shardformer] add bert finetune example
      
      * [shardformer] Add overlap support for gpt2 (#4535)
      
      * add overlap support for gpt2
      
      * remove unused code
      
      * remove unused code
      
      * [shardformer] support pp+tp+zero1 tests (#4531)
      
      * [shardformer] fix opt test hanging
      
      * fix
      
      * test
      
      * test
      
      * test
      
      * fix test
      
      * fix test
      
      * remove print
      
      * add fix
      
      * [shardformer] pp+tp+zero1
      
      [shardformer] pp+tp+zero1
      
      [shardformer] pp+tp+zero1
      
      [shardformer] pp+tp+zero1
      
      [shardformer] pp+tp+zero1
      
      [shardformer] pp+tp+zero1
      
      * [shardformer] pp+tp+zero1
      
      * [shardformer] pp+tp+zero1
      
      * [shardformer] pp+tp+zero1
      
      * [shardformer] pp+tp+zero1
      
      * [shardformer] fix submodule replacement bug when enabling pp (#4544)
      
      * [shardformer] support sharded optimizer checkpointIO of HybridParallelPlugin (#4540)
      
      * implement sharded optimizer saving
      
      * add more param info
      
      * finish implementation of sharded optimizer saving
      
      * fix bugs in optimizer sharded saving
      
      * add pp+zero test
      
      * param group loading
      
      * greedy loading of optimizer
      
      * fix bug when loading
      
      * implement optimizer sharded saving
      
      * add optimizer test & arrange checkpointIO utils
      
      * fix gemini sharding state_dict
      
      * add verbose option
      
      * add loading of master params
      
      * fix typehint
      
      * fix master/working mapping in fp16 amp
      
      * [shardformer] add bert finetune example
      
      * [shardformer] add bert finetune example
      
      * [shardformer] add bert finetune example
      
      * [shardformer] add bert finetune example
      
      * [shardformer] fix epoch change
      
      * [shardformer] broadcast add pp group
      
      * rebase feature/shardformer
      
      * update pipeline
      
      * [shardformer] fix
      
      * [shardformer] fix
      
      * [shardformer] bert finetune fix
      
      * [shardformer] add all_reduce operation to loss
      
      add all_reduce operation to loss
      
      * [shardformer] make compatible with pytree.
      
      make compatible with pytree.
      
      * [shardformer] disable tp
      
      disable tp
      
      * [shardformer] add 3d plugin to ci test
      
      * [shardformer] update num_microbatches to None
      
      * [shardformer] update microbatchsize
      
      * [shardformer] update assert
      
      * update scheduler
      
      * update scheduler
      
      ---------
      Co-authored-by: default avatarJianghai <72591262+CjhHa1@users.noreply.github.com>
      Co-authored-by: default avatarBin Jia <45593998+FoolPlayer@users.noreply.github.com>
      Co-authored-by: default avatarBaizhou Zhang <eddiezhang@pku.edu.cn>
      0a94fcd3
    • Jianghai's avatar
      [shardformer] Pytree fix (#4533) · 24c07687
      Jianghai authored
      * pytree test
      
      * test bert
      
      * test bert
      
      * test bert
      
      * revise
      
      * add register
      
      * add register
      24c07687