Skip to content

Add support for branches #528

Closed
Closed

Description

@minipasila

So it turns out the model I want to use to finetune for some reason doesn't have the model files in the main branch.. but it has bunch of the checkpoints uploaded in different branches like "1000B" but there doesn't seem to be anyway for me to select that branch in Unsloth. If you could specify what branch to use that would be nice.

Activity

  1. danielhanchen commented on May 25, 2024

    @danielhanchen
    Member

    Weird - how would one do it in normal HF?

  2. minipasila commented on May 25, 2024

    @minipasila
    Author
  3. ewre324 commented on May 25, 2024

    @ewre324

    Hmm, interesting scenario. Try this.

    1. Download the model yourself on the system you have unsloth installed. Downloading can be manually done or via
      git-lfs clone https://huggingface.co/LumiOpen/Viking-33B/tree/1000B

    2. git-lfs is required to download files stores via lfs.

    Assuming you have downloaded the model in /home/user/Viking-33B pass the name of the folder as follows:

    model, tokenizer = FastLanguageModel.from_pretrained(
        model_name = "/home/user/Viking-33B", #your model location.
        max_seq_length = max_seq_length,
        dtype = dtype,
        load_in_4bit = load_in_4bit,
        # token = "hf_...", # use one if using gated models like meta-llama/Llama-2-7b-hf
    )
    

    And this should work.

  4. minipasila commented on May 25, 2024

    @minipasila
    Author

    That would be useful if I weren't using this on Runpod/Colab. Though my solution was similar in that I downloaded the model and then reuploaded it back to Huggingface... and then used that instead.

  5. ewre324 commented on May 25, 2024

    @ewre324

    Excellent approach. It never crossed my mind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions