Skip to content

Add integration with PEFT for loading adapters on meta device #555

@Butanium

Description

@Butanium

Currently i have to dispatch my language model before calling model.load_adapter(adapter_id), otherwise i get

  File "/mnt/nw/home/c.dumas/projects/diffing-toolkit/.venv/lib/python3.12/site-packages/safetensors/torch.py", line 381, in load_file
    with safe_open(filename, framework="pt", device=device) as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
safetensors_rust.SafetensorError: device meta is invalid

would be nice if nnsight could load the config and load the weight when dispatching. This is low priority though

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions