Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Llama-3 support? #3

Closed
gururise opened this issue Jul 22, 2024 · 1 comment
Closed

Llama-3 support? #3

gururise opened this issue Jul 22, 2024 · 1 comment

Comments

@gururise
Copy link

Very interested to use this library with Llama 3. Any idea when Llama 3 will be supported?

@yannikkellerde
Copy link
Member

yannikkellerde commented Jul 22, 2024

Llama 3 is very much supported. The examples are not up to date I guess, but usage is similar to Llama 2 (And I recently used transformer-heads + Llama 3 in another project and it worked great).

Here some code that may help you get started

from transformer_heads import HeadConfig, create_headed_qlora
from transformer_heads.util.helpers import get_model_params

base_model_name = "meta-llama/Meta-Llama-3-8B"
model_params = get_model_params(base_model_name)
model_class = model_params["model_class"]
hidden_size = model_params["hidden_size"]
vocab_size = model_params["vocab_size"]

head_config = HeadConfig(
    name=f"my_head_name",
    layer_hook=-1,
    in_size=hidden_size,
...

From there, check the notebooks to finish designing your HeadConfig and to create you model.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants