Open silveranalytics opened 5 months ago
Hey @silveranalytics, thanks for raising this issue. We definitely want to make it easier for folks to use LoRAX without needing to go to HF. Happy to take some time to investigate this.
@silveranalytics I ran into a similar error. I added a "local" condition to get_model
using the same body as "hub".
elif source == "hub":
config_dict, _ = PretrainedConfig.get_config_dict(
model_id, revision=revision, trust_remote_code=trust_remote_code
)
elif source == "local":
config_dict, _ = PretrainedConfig.get_config_dict(
model_id, revision=revision, trust_remote_code=trust_remote_code
)
else:
After the change I was able to specify --source local
and my local model was loaded. @magdyksaleh I am happy to put up a PR if this looks like its in the right direction.
This is a must have for us. We need the ability to self-host. We cannot go out to the internet to get the base model weights. We need to load them from disk
Having an issue with local models as well :(
As I understand, this fix is still in work now. Could you advise when it will be ready? Also now the Mistral model could be used from HF only with token (after acceptance of mistralai conditions). So it is reasonable to add a possibility to run model with token from docker container (it will be needed also to run a private models).
We were able to get the base model loaded from a local source using hub
as the source with no code changes. Using the command line from the original post:
docker run -e RUST_BACKTRACE=full --gpus '"device=3"' --network none --shm-size 1g -p 8080:80 -v $volume:/data ghcr.io/predibase/lorax:latest --source hub --model-id /data/models--mistralai--Mistral-7B-Instruct-v0.1/
Feature request
I only see source=local available for the adapters, is this the case?
Even with the models cached/pointing to it locally, there is still a callout to HF without changing the source from 'hub'.
Motivation
My ultimate goal is to run offline.
docker run -e RUST_BACKTRACE=full --gpus '"device=3"' --network none --shm-size 1g -p 8080:80 -v $volume:/data ghcr.io/predibase/lorax:latest --model-id /data/models--mistralai--Mistral-7B-Instruct-v0.1/
Your contribution
I've tried to add the option in get_model but I am a novice.
Even with adding the "local", I still get an error: