Skip to content

Llama2 FT - #2234

Closed
poonehmousavi wants to merge 14 commits into
speechbrain:unstable-v0.6from
poonehmousavi:llama2_ft_unstable_br
Closed

poonehmousavi wants to merge 14 commits into
speechbrain:unstable-v0.6from
poonehmousavi:llama2_ft_unstable_br

Conversation

@poonehmousavi

@poonehmousavi poonehmousavi commented Nov 7, 2023

Copy link
Copy Markdown
Collaborator

What does this PR do?

Finetuning Lamma2 for response generation task using MultiWOZ dataset.
List any dependencies that are required for this change.

  • accelerate
  • bitsandbytes
  • peft
  • sacrebleu

@poonehmousavi poonehmousavi changed the title Llama2 ft unstable br Llama2 FT Nov 7, 2023
@poonehmousavi

Copy link
Copy Markdown
Collaborator Author

I have added two versions: llama2.py is in the old format and llama2_new.py is in the new version. Also, I added a new version of huggingface_interface_new.py. which I added the quantization config and AUtomodelCasualLM. Let me know what you think of the changes @mhn226 .. When we finalize the best for this interface, I will update the recipe accordingly

@mhn226 mhn226 self-assigned this Nov 8, 2023
"""
is_sb, ckpt_file, is_local = self._check_model_source(source, save_path)
if is_sb:
config = config.from_pretrained(source, cache_dir=save_path,quantization_config=quantization_config)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@poonehmousavi : Do we also need quantization_config in the case when is_sb = False, i,e, adding quantization_config in the below else condition?

@mravanelli
mravanelli marked this pull request as ready for review November 9, 2023 22:45
@mravanelli

Copy link
Copy Markdown
Collaborator

Thank you @poonehmousavi for this PR. It's a valuable addition to SpeechBrain. Here are my comments from a first review of the code:

  1. Failing Tests:

    • It appears there are some failing tests, mainly related to style issues.
  2. Permission Issue in Recipe Tests:

    • The recipe tests seem to be failing due to a permission issue.
      python -c 'from tests.utils.recipe_tests import run_recipe_tests; print("TEST FAILED!") if not(run_recipe_tests(filters_fields=["Dataset"], filters=[["MultiWOZ"]], do_checks=True, run_opts="--device=cuda")) else print("TEST PASSED")'

I got the same issue when running the llama2 recipe. Are you able to replicate it?

  1. README Correction:
    • In the README file, there's a small typo in the directory path. Please correct:
      cd recipes/MultiWOZ/response_generation[LLM_model] => cd recipes/MultiWOZ/response_generation/[LLM_model]

@mhn226 do you have additional comments?

@mhn226

mhn226 commented Nov 10, 2023

Copy link
Copy Markdown
Collaborator

Thank you @poonehmousavi for this PR. It's a valuable addition to SpeechBrain. Here are my comments from a first review of the code:

1. **Failing Tests:**
   
   * It appears there are some failing tests, mainly related to style issues.

2. **Permission Issue in Recipe Tests:**
   
   * The recipe tests seem to be failing due to a permission issue.
     ```python
     python -c 'from tests.utils.recipe_tests import run_recipe_tests; print("TEST FAILED!") if not(run_recipe_tests(filters_fields=["Dataset"], filters=[["MultiWOZ"]], do_checks=True, run_opts="--device=cuda")) else print("TEST PASSED")'
     ```

I got the same issue when running the llama2 recipe. Are you able to replicate it?

3. **README Correction:**
   
   * In the README file, there's a small typo in the directory path. Please correct:
     ```shell
     cd recipes/MultiWOZ/response_generation[LLM_model] => cd recipes/MultiWOZ/response_generation/[LLM_model]
     ```

@mhn226 do you have additional comments?

Hi @mravanelli , maybe come back here next week because currently we're trying to figure out what is the best option for doing this. The PR is rather a draft version for now ^^
And yes for llama2 we need to ask meta for the access. So for testing we might need to skip or maybe use this.

@mravanelli mravanelli added the enhancement New feature or request label Nov 29, 2023
@poonehmousavi
poonehmousavi marked this pull request as draft December 7, 2023 17:26
@mravanelli
mravanelli marked this pull request as ready for review December 12, 2023 22:09
@poonehmousavi

Copy link
Copy Markdown
Collaborator Author

I closed this PR and transfer all the changes to this PR

@poonehmousavi
poonehmousavi deleted the llama2_ft_unstable_br branch July 29, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants