Skip to content

Commit

Permalink
udpate example
Browse files Browse the repository at this point in the history
  • Loading branch information
Xu-Kai committed Nov 16, 2023
1 parent 5446fb7 commit 2a493b6
Show file tree
Hide file tree
Showing 20 changed files with 161 additions and 548 deletions.
11 changes: 9 additions & 2 deletions colossalai/inference/hybridengine/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,14 @@

PP_AXIS, TP_AXIS = 0, 1

_supported_models = ["LlamaForCausalLM", "BloomForCausalLM", "LlamaGPTQForCausalLM", "SmoothLlamaForCausalLM", "ChatGLMForConditionalGeneration"]
_supported_models = [
"LlamaForCausalLM",
"BloomForCausalLM",
"LlamaGPTQForCausalLM",
"SmoothLlamaForCausalLM",
"ChatGLMForConditionalGeneration",
]


class CaiInferEngine:
"""
Expand Down Expand Up @@ -161,7 +168,7 @@ def _shardformer(self, model, model_policy, stage_manager, tp_group):
enable_flash_attention=False,
enable_jit_fused=False,
enable_sequence_parallelism=False,
quant=self.quant,
extra_kwargs={"quant": self.quant},
)
shardformer = ShardFormer(shard_config=shardconfig)
shard_model, _ = shardformer.optimize(model, model_policy)
Expand Down
File renamed without changes.
84 changes: 0 additions & 84 deletions examples/inference/bench_bloom.py

This file was deleted.

118 changes: 0 additions & 118 deletions examples/inference/bench_chatglm2.py

This file was deleted.

119 changes: 0 additions & 119 deletions examples/inference/bench_llama.py

This file was deleted.

Loading

0 comments on commit 2a493b6

Please sign in to comment.