mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-10 21:40:02 +00:00
[hotfix] fix typo change enabel to enable under colossalai/shardformer/ (#5317)
This commit is contained in:
@@ -181,7 +181,7 @@ class RotaryEmbedding(nn.Module):
|
||||
|
||||
cache = torch.stack([torch.cos(idx_theta), torch.sin(idx_theta)], dim=-1)
|
||||
|
||||
# this is to mimic the behaviour of complex32, else we will get different results
|
||||
# this is to mimic the behavior of complex32, else we will get different results
|
||||
if dtype in (torch.float16, torch.bfloat16, torch.int8):
|
||||
cache = cache.bfloat16() if dtype == torch.bfloat16 else cache.half()
|
||||
return cache
|
||||
@@ -290,7 +290,7 @@ class CoreAttention(torch.nn.Module):
|
||||
# [sk, b, np, hn] -> [sk, b * np, hn]
|
||||
key_layer = key_layer.view(output_size[3], output_size[0] * output_size[1], -1)
|
||||
|
||||
# preallocting input tensor: [b * np, sq, sk]
|
||||
# preallocating input tensor: [b * np, sq, sk]
|
||||
matmul_input_buffer = torch.empty(
|
||||
output_size[0] * output_size[1],
|
||||
output_size[2],
|
||||
@@ -1289,7 +1289,7 @@ class ChatGLMForConditionalGeneration(ChatGLMPreTrainedModel):
|
||||
if has_default_max_length and generation_config.max_new_tokens is None:
|
||||
warnings.warn(
|
||||
f"Using `max_length`'s default ({generation_config.max_length}) to control the generation length. "
|
||||
"This behaviour is deprecated and will be removed from the config in v5 of Transformers -- we"
|
||||
"This behavior is deprecated and will be removed from the config in v5 of Transformers -- we"
|
||||
" recommend using `max_new_tokens` to control the maximum length of the generation.",
|
||||
UserWarning,
|
||||
)
|
||||
|
Reference in New Issue
Block a user