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

Can anyone post already trained model? #52

Open
HCBlackFox opened this issue Mar 17, 2023 · 14 comments
Open

Can anyone post already trained model? #52

HCBlackFox opened this issue Mar 17, 2023 · 14 comments

Comments

@HCBlackFox
Copy link

No description provided.

@collant
Copy link

collant commented Mar 17, 2023

Hello, you can find this 13B one here: https://huggingface.co/samwit/alpaca13B-lora

Otherwise, there is the 7B one here: https://huggingface.co/tloen/alpaca-lora-7b

Please note these are LoRA models they need the base model to work.

And here is the base model for the 7B: https://huggingface.co/decapoda-research/llama-7b-hf

@HCBlackFox
Copy link
Author

Thank you

Hello, you can find this 13B one here: https://huggingface.co/samwit/alpaca13B-lora

Otherwise, there is the 7B one here: https://huggingface.co/tloen/alpaca-lora-7b

Please note these are LoRA models they need the base model to work.

And here is the base model for the 7B: https://huggingface.co/decapoda-research/llama-7b-hf

Thank you

@0xbitches
Copy link

0xbitches commented Mar 18, 2023

Is there a 30B-4bit lora out there? I think I read somewhere that finetuning in 4bit might not be supported?

@ttio2tech
Copy link

Hello, you can find this 13B one here: https://huggingface.co/samwit/alpaca13B-lora

Otherwise, there is the 7B one here: https://huggingface.co/tloen/alpaca-lora-7b

Please note these are LoRA models they need the base model to work.

And here is the base model for the 7B: https://huggingface.co/decapoda-research/llama-7b-hf

can the original LLaMA-7B weights (consolidated.00.pth) be used? or can I convert it to hf?

@gururise
Copy link
Contributor

Any links for models trained w/3-epochs on the new cleaned dataset?

@mattreid1
Copy link

Any links for models trained w/3-epochs on the new cleaned dataset?

I just finished training this 13B one but haven't got it to work yet (I'm using multiple GPUs so maybe that's the issue) https://huggingface.co/mattreid/alpaca-lora-13b

@felri
Copy link

felri commented Mar 18, 2023

@collant can you help me understand how can I load the Lora model trained with the 52k dataset and use it to train on another data.json?

In finetune.py I can find the loading of the llama 7b model

model = LlamaForCausalLM.from_pretrained(
    "decapoda-research/llama-7b-hf",
    load_in_8bit=True,
    device_map=device_map,
)
tokenizer = LlamaTokenizer.from_pretrained(
    "decapoda-research/llama-7b-hf", add_eos_token=True
)

and after the lora config obj is being created

config = LoraConfig(
    r=LORA_R,
    lora_alpha=LORA_ALPHA,
    target_modules=TARGET_MODULES,
    lora_dropout=LORA_DROPOUT,
    bias="none",
    task_type="CAUSAL_LM",
)
model = get_peft_model(model, config)

does loading the Lora model from hf involves calling another function and loading that checkpoint? I can see that there is a save_pretrained function, maybe I need to load the Lora model via this? Sorry if this sounds confusing

edit: after a little bit more google I found this load_attn_procs function, maybe it's something around here

edit2: it seems that it was inside generate.py all along

    model = LlamaForCausalLM.from_pretrained(
        "decapoda-research/llama-7b-hf",
        load_in_8bit=True,
        torch_dtype=torch.float16,
        device_map="auto",
    )
    model = PeftModel.from_pretrained(
        model, "tloen/alpaca-lora-7b",
        torch_dtype=torch.float16
    )

@aspctu
Copy link

aspctu commented Mar 19, 2023

30B LoRa adapters here https://huggingface.co/baseten/alpaca-30b

@T-Atlas
Copy link
Contributor

T-Atlas commented Mar 20, 2023

@collant can you help me understand how can I load the Lora model trained with the 52k dataset and use it to train on another data.json?

In finetune.py I can find the loading of the llama 7b model

model = LlamaForCausalLM.from_pretrained(
    "decapoda-research/llama-7b-hf",
    load_in_8bit=True,
    device_map=device_map,
)
tokenizer = LlamaTokenizer.from_pretrained(
    "decapoda-research/llama-7b-hf", add_eos_token=True
)

and after the lora config obj is being created

config = LoraConfig(
    r=LORA_R,
    lora_alpha=LORA_ALPHA,
    target_modules=TARGET_MODULES,
    lora_dropout=LORA_DROPOUT,
    bias="none",
    task_type="CAUSAL_LM",
)
model = get_peft_model(model, config)

does loading the Lora model from hf involves calling another function and loading that checkpoint? I can see that there is a save_pretrained function, maybe I need to load the Lora model via this? Sorry if this sounds confusing

edit: after a little bit more google I found this load_attn_procs function, maybe it's something around here

edit2: it seems that it was inside generate.py all along

    model = LlamaForCausalLM.from_pretrained(
        "decapoda-research/llama-7b-hf",
        load_in_8bit=True,
        torch_dtype=torch.float16,
        device_map="auto",
    )
    model = PeftModel.from_pretrained(
        model, "tloen/alpaca-lora-7b",
        torch_dtype=torch.float16
    )

Have you found solution? #44 I found this may help? But I still confuse with what is

@diegolondrina
Copy link

Any links for models trained w/3-epochs on the new cleaned dataset?

+1

@wafflecomposite
Copy link

Please, report @larasatistevany for spamming.

https://support.github.com/contact/report-abuse?category=report-abuse&report=larasatistevany

-> I want to report abusive content or behavior.
-> I want to report SPAM, a user that is disrupting me or my organization's experience on GitHub, or a user who is using my personal information without my permission
-> A user is disrupting me or my organization's experience and productivity by posting SPAM off-topic or other types of disruptive content in projects they do not own.

Put this in the form:

spamming in issue comments
https://github.com/tloen/alpaca-lora/issues/52#issuecomment-1570561693
https://github.com/tloen/alpaca-lora/issues/52#issuecomment-1571059071

Thanks!

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

No branches or pull requests

12 participants