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

[LLAMA] Export Pathway + clean-up other imports/pathways #279

Merged
merged 4 commits into from
Sep 15, 2023
Merged

Conversation

dsikka
Copy link
Contributor

@dsikka dsikka commented Sep 13, 2023

Summary

  • Maybe this better belongs in scripts ? Uses the TransformerExportArgs schema
  • Specific command for llama exporting which allows the user to export the model without having to go through any of the other auto pathways. Also sets majority of the exporting variables for them.
  • Also clean-up imports for transformers tasks, fix typo in setup.py for for nm packages, and update the finetune command to be called sparsify.llm_finetune in setup.py (i.e. small changes for somewhat unrelated things which came up while putting up this PR)

Testing

Tested locally using the newly added command:

sparisfy.llama_export --model_path ./training/ --sequence_length 2048

This exports a model which successfully goes through KV Cache injection and is able to run in our pipeline (tested end-to-end)

bfineran
bfineran previously approved these changes Sep 13, 2023
setup.py Show resolved Hide resolved
src/sparsify/auto/tasks/transformers/llama.py Show resolved Hide resolved
src/sparsify/auto/tasks/transformers/llama.py Show resolved Hide resolved
src/sparsify/auto/tasks/transformers/llama.py Outdated Show resolved Hide resolved
src/sparsify/auto/tasks/transformers/llama.py Show resolved Hide resolved
src/sparsify/auto/tasks/transformers/llama.py Show resolved Hide resolved
@rahul-tuli
Copy link
Member

Code looks nice and clean, approved from my side pending nits

rahul-tuli
rahul-tuli previously approved these changes Sep 13, 2023
Copy link
Member

@rahul-tuli rahul-tuli left a comment

Choose a reason for hiding this comment

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

LGTM!

@dsikka dsikka merged commit 4dc749d into main Sep 15, 2023
3 checks passed
@dsikka dsikka deleted the llama_export branch September 15, 2023 18:06
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.

None yet

3 participants