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

LAMBDAPROMPT_BACKEND = StarCoder causes a runtime error #25

Open
thinkORo opened this issue Jun 17, 2023 · 1 comment
Open

LAMBDAPROMPT_BACKEND = StarCoder causes a runtime error #25

thinkORo opened this issue Jun 17, 2023 · 1 comment

Comments

@thinkORo
Copy link

When I activate the local execution, I get the following error message:
ValueError: The current "device_map" had weights offloaded to the disk. Please provide an "offload_folder" for them. Alternatively, make sure you have "safetensors" installed if the model you are using offers the weights in this format.

To activate the local execution, I did the following:

os.environ['LAMBDAPROMPT_BACKEND'] = 'StarCoder'
os.environ['SKETCH_USE_REMOTE_LAMBDAPROMPT'] = 'False'
os.environ['HF_ACCESS_TOKEN'] = 'myToken'

Unfortunately, I cannot find a way to set the offload_folder.

How can I do that? Note: "safetensors" is already installed

@thinkORo
Copy link
Author

I found a workaround as I didn't find the time to follow the complete execution chain fro Sketch.

I patched the responsive module, modeling_utils.py, and hard-coded the "offload_folder" for the required methods:

  1. _load_state_dict_into_meta_model()
  2. _load_pretrained_model()

But it would be nice not to patch the underlying modules.
Therefore, any ideas are welcome.

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

1 participant