mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-28 13:05:26 +00:00
[shardformer] chatglm support sequence parallel (#4482)
* [shardformer] chatglm support sequence parallel [shardformer] chatglm support sequence parallel [shardformer] chatglm support sequence parallel [shardformer] chatglm support sequence parallel [shardformer] chatglm support sequence parallel [shardformer] chatglm support sequence parallel * fix fix fix fix
This commit is contained in:
@@ -105,9 +105,11 @@ class LlamaPolicy(Policy):
|
||||
target_key=LlamaModel)
|
||||
|
||||
if self.shard_config.enable_flash_attention:
|
||||
policy[LlamaAttention] = ModulePolicyDescription(method_replacement={
|
||||
self.append_or_create_method_replacement(description={
|
||||
'forward': get_llama_flash_attention_forward(),
|
||||
})
|
||||
},
|
||||
policy=policy,
|
||||
target_key=LlamaAttention)
|
||||
|
||||
return policy
|
||||
|
||||
|
Reference in New Issue
Block a user