Skip to content

Method for geneformer has been blocked by new geneformer model! #96

@BoydenYubin

Description

@BoydenYubin

Describe the bug

The current model loading logic fails because the repository structure and model versioning on Hugging Face for Geneformer have been updated. Specifically:

  1. The model identifier gf-12L-95M-i4096 is no longer available or has been replaced.
  2. The hf_hub_download calls fail when using the subfolder parameter, as the latest model weights and configs appear to be located in the root directory or organized differently in the ctheodoris/Geneformer repository.

To Reproduce

Steps to reproduce the behavior:

  1. Attempt to initialize the model using the identifier gf-12L-95M-i4096.
  2. Run the script containing the hf_hub_download logic with the subfolder parameter enabled.
  3. See error: 404 Client Error: Not Found for url or Entry Not Found.

Expected behavior

  1. The model identifier should be updated to gf-12L-104M-i4096 to align with the current Hugging Face repository state.
  2. The file downloading logic should successfully fetch model.safetensors and config.json without being blocked by incorrect subfolder paths.

Proposed Fix

Update the model version and comment out/remove the subfolder argument in the model_files dictionary:

model_files = {
    "model": hf_hub_download(
        repo_id="ctheodoris/Geneformer",
        # subfolder=par["model"], # Remove or comment out to fix pathing
        filename="model.safetensors",
    ),
    "config": hf_hub_download(
        repo_id="ctheodoris/Geneformer",
        # subfolder=par["model"], # Remove or comment out to fix pathing
        filename="config.json",
    ),
}

Additional context

It appears the ctheodoris/Geneformer repository has consolidated its files or updated the default weights to the 104M parameter version. Using the legacy 95M identifier or forcing a subfolder path that no longer exists breaks the initialization pipeline for new users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions