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

[OBCQ Recipe UX Change] Remove target_ids #1804

Merged
merged 7 commits into from
Nov 13, 2023
Merged

[OBCQ Recipe UX Change] Remove target_ids #1804

merged 7 commits into from
Nov 13, 2023

Conversation

rahul-tuli
Copy link
Member

@rahul-tuli rahul-tuli commented Oct 31, 2023

This PR removes target_ids param from OBCQ modifier; now this param is not needed and will be inferred automatically

Test plan: Run obcq on both llama, and opt-1.3b; and assert we do not drop in perplexity

Expected perplexity:

  • opt - b/w 18-20
  • llama - b/w 7-8

Test commands:

  • OPT
python3 src/sparseml/transformers/sparsification/obcq/obcq.py faceb
ook/opt-1.3b c4 --recipe src/sparseml/transformers/sparsification/obcq/example.yaml --eval wikitext2 

Output: (Truncated)

2023-10-31 10:55:11 sparseml.modifiers.obcq.utils.helpers INFO     Perplexity: 18.037699
  • LLama-7B
python src/sparseml/transformers/sparsification/obcq/obcq.py /home/rahul/llama/training open_platypus --recipe src/sparseml/transformers/sparsification/obcq/example_llama.yaml --eval wikitext2

Output: (Truncated)

2023-11-01 09:12:28 sparseml.modifiers.obcq.utils.helpers INFO     Perplexity: 7.168426

Changes in existing recipes: Look at example.yaml/example_llama.yaml but TLDR; just remove target_ids field altogether

@rahul-tuli rahul-tuli marked this pull request as ready for review November 1, 2023 13:16
@rahul-tuli rahul-tuli self-assigned this Nov 1, 2023
src/sparseml/modifiers/obcq/pytorch.py Outdated Show resolved Hide resolved
src/sparseml/modifiers/obcq/utils/helpers.py Outdated Show resolved Hide resolved
src/sparseml/modifiers/obcq/utils/helpers.py Show resolved Hide resolved
@Satrat
Copy link
Contributor

Satrat commented Nov 9, 2023

LGTM pending the other PR comments, I agree having a list of default ids would be useful

* Make default target ids a global
* use named arguments
@rahul-tuli rahul-tuli merged commit c7cb2ce into main Nov 13, 2023
11 checks passed
@rahul-tuli rahul-tuli deleted the remove-target-id branch November 13, 2023 14:12
bfineran pushed a commit that referenced this pull request Nov 16, 2023
* Remove target_ids

* Define target ids based on inputs

* Fix cache

* Remove remaining instances of target_ids

* Address review comments!
* Make default target ids a global
* use named arguments
bfineran pushed a commit that referenced this pull request Nov 16, 2023
* Remove target_ids

* Define target ids based on inputs

* Fix cache

* Remove remaining instances of target_ids

* Address review comments!
* Make default target ids a global
* use named arguments
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.

None yet

5 participants