Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion mlc_llm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def mod_transform_before_build(
) # pylint: disable=not-callable

if "num_attention_heads" in config and "hidden_size" in config:
if args.max_seq_len:
if args.max_seq_len != -1:
mod = fuse_split_rotary_embedding(mod, config["num_attention_heads"], config["hidden_size"], args.max_seq_len)
else:
mod = fuse_split_rotary_embedding(mod, config["num_attention_heads"], config["hidden_size"])
Expand Down
1 change: 0 additions & 1 deletion mlc_llm/transform/fuse_split_rotary_embedding.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def split_rotary(

def fuse_split_rotary_embedding(mod, num_attention_heads, hidden_size, max_sequence_length=2048):
head_dim = hidden_size // num_attention_heads
print(f"fuse_split_rotary_embedding {max_sequence_length}")

mod["split_rotary"] = get_split_rotary(num_attention_heads, head_dim, max_sequence_length)

Expand Down