Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add block seq len and attention/activation dtype args to LLM export script #391

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sogartar
Copy link
Contributor

Some upcoming sharded tests don't use the default values.

…cript

Some upcomming sharded tests don't use the default values.
tensor_parallelism_size=tensor_parallelism_size,
use_hf=False,
static_tables=False, # Rely on the compiler for hoisting tables.
kv_cache_type="direct" if args.bs == [1] else "paged",
attention_kernel=args.attention_kernel,
attention_dtype=serialized_name_to_dtype(args.attention_dtype),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This depends on the other PR. It should be included there and not bleed into this PR

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I already merged the other PR.

@@ -121,7 +121,8 @@ class LlamaModelConfig:

# Block sequence stride for a paged KV cache. This must divide evenly
# into the context length.
block_seq_stride: int = 16
default_block_seq_stride: ClassVar[int] = 16
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need ClassVar here? Seeing the default_block_seq_stride default feels bad.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted a way to reference the default from the export script, so that the CLI argument has the same default.

@sogartar sogartar requested a review from rsuderman November 6, 2024 15:59
@ScottTodd ScottTodd removed their request for review November 16, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants