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

split up llama model loading so config can be loaded from base config and models can be loaded from a path #120

Merged
merged 3 commits into from
May 31, 2023

Conversation

winglian
Copy link
Collaborator

just ran into this issue, this worked for me to get it working

@winglian winglian requested a review from NanoCode012 May 31, 2023 02:33
@NanoCode012
Copy link
Collaborator

I'm not sure about others, but sometimes I use this base_model_config to point for tokenizer in a separate repo (maybe I'm using the bug as a feature).

Should we have a cfg.tokenizer_config instead?

src/axolotl/utils/models.py Outdated Show resolved Hide resolved
src/axolotl/utils/models.py Outdated Show resolved Hide resolved
@NanoCode012
Copy link
Collaborator

NanoCode012 commented May 31, 2023

There is a redundant import nearby as well.

if TYPE_CHECKING:
    from peft import PeftConfig  # noqa: F401
    from transformers import PreTrainedTokenizer  # noqa: F401

to

if TYPE_CHECKING:
    from peft import PeftConfig  # noqa: F401

The PreTrainedTokenizer is never used.


And if it does not inconvenience you, could you also please add the cfg to readme?

@winglian winglian merged commit c7021e1 into main May 31, 2023
@winglian winglian deleted the model-from-path branch May 31, 2023 04:08
mkeoliya pushed a commit to mkeoliya/axolotl that referenced this pull request Dec 15, 2023
…/model-from-path

split up llama model loading so config can be loaded from base config and models can be loaded from a path
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

Successfully merging this pull request may close these issues.

2 participants