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

Merge develop into main #58

Merged
merged 19 commits into from
Jan 2, 2025
Merged

Merge develop into main #58

merged 19 commits into from
Jan 2, 2025

Conversation

tanganke
Copy link
Owner

@tanganke tanganke commented Jan 2, 2025

No description provided.

@tanganke tanganke marked this pull request as ready for review January 2, 2025 07:45
@Copilot Copilot bot review requested due to automatic review settings January 2, 2025 07:45
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comments suppressed due to low confidence (2)

fusion_bench/programs/fabric_fusion_program.py:188

  • The previous implementation used 'pop' to remove the 'model' key from the dictionary, which is no longer present in the new implementation. This might lead to incorrect handling of the dictionary items.
report = {}

fusion_bench/method/task_singular_vector/utils/TSVM_utils.py:310

  • [nitpick] The parameter name 'exclude_keys' is ambiguous. It should be renamed to 'exclude_svd_keys' to be more descriptive.
exclude_keys: Optional[List[str]] = None,

fusion_bench/programs/fabric_fusion_program.py Outdated Show resolved Hide resolved
new_vector[key] = {}
for i, task_vector in enumerate(task_vectors):
vec = task_vector[key].to(accelerator)

if len(task_vector[key].shape) == 2 and "text_projection" not in key:
if len(task_vector[key].shape) == 2 and key not in exclude_keys:
Copy link
Preview

Copilot AI Jan 2, 2025

Choose a reason for hiding this comment

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

The check for 'exclude_keys' should be done before checking the shape of the tensor to avoid unnecessary computations.

Suggested change
if len(task_vector[key].shape) == 2 and key not in exclude_keys:
if key in exclude_keys:

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

Positive Feedback
Negative Feedback

Provide additional feedback

Please help us improve GitHub Copilot by sharing more details about this comment.

Please select one or more of the options
@tanganke tanganke merged commit b6628ec into main Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant