Skip to content

Reforging LLaMA lobe (code from Samsung AI Center-Cambridge)#2850

Merged
Adel-Moumen merged 14 commits intospeechbrain:developfrom
TParcollet:llama_family_revamp
Apr 7, 2025
Merged

Reforging LLaMA lobe (code from Samsung AI Center-Cambridge)#2850
Adel-Moumen merged 14 commits intospeechbrain:developfrom
TParcollet:llama_family_revamp

Conversation

@TParcollet
Copy link
Copy Markdown
Collaborator

@TParcollet TParcollet commented Mar 4, 2025

This PR refactor our LLaMA lobe to become generic enough and version agnostic. I cannot share the associated recipe for now, but it works ok. I still may have a few question open w.r.t checkpointing, but I think that this should be ok. I think that the current state of our LLaMA lobe is a real problem as it may hide the capacity of SB to adapt and to enable people to develop their custom code.

@poonehmousavi Multiwoz will need to be slightly refactor around this code I think. As a rule of thumb here are the potential changes:

  1. BNB and PeFT are not expected to be on the lobe. These are external things that must be managed at the yaml level.
  2. SB has its own adapter scheme, we should rely on this as it's more transparent than PeFT. This does not prevent function like preparation of kbit training to be applied in the training recipe, but not in the lobe. We can also use PeFT adapter class with our adapter method.

To-do:

  • refactor multiwoz
  • dive into the tests that touch llama2.py and change them.

@TParcollet TParcollet changed the title Reforging LLaMA lobe Reforging LLaMA lobe (code from Samsung AI Center-Cambridge) Mar 4, 2025
@TParcollet
Copy link
Copy Markdown
Collaborator Author

@pplantinga do you have any idea why the doctest keep running on the llama file while I excluded it? This is frustrating ahah

@Adel-Moumen
Copy link
Copy Markdown
Collaborator

Adel-Moumen commented Mar 17, 2025

@pplantinga do you have any idea why the doctest keep running on the llama file while I excluded it? This is frustrating ahah

You need to add # doctest: +SKIP (see:

>>> ssl_model.encode_file("samples/audio_samples/example_fr.wav") # doctest: +SKIP
)

@TParcollet
Copy link
Copy Markdown
Collaborator Author

@Adel-Moumen But like, isn't my change to the pytest file supposed to avoid testing llama.py? this sounds weird to me.

@TParcollet TParcollet added the ready to review Waiting on reviewer to provide feedback label Mar 25, 2025
Copy link
Copy Markdown
Collaborator

@Adel-Moumen Adel-Moumen left a comment

Choose a reason for hiding this comment

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

LGTM

@Adel-Moumen Adel-Moumen merged commit 00b981c into speechbrain:develop Apr 7, 2025
5 checks passed
pplantinga pushed a commit to pplantinga/speechbrain that referenced this pull request Jun 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready to review Waiting on reviewer to provide feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants