Comments (5)
Your example doesn't showcase the issue since you're passing the HFValidator, try using /data/test/tmp/xx/
or something.
from text-generation-inference.
Issue is in Peft I believe ?
from text-generation-inference.
It works when using peft
with version 0.10.0
.
- download model
huggingface-cli download alignment-handbook/zephyr-7b-sft-qlora --exclude "*.bin" "*.pth" "*.gguf" --local-dir ./tmp
rm tmp/config.json
- load peft model
from peft import AutoPeftModelForCausalLM
m = AutoPeftModelForCausalLM.from_pretrained("./tmp")
from text-generation-inference.
Thanks this leads to the issue.
Steps:
- download model
huggingface-cli download alignment-handbook/zephyr-7b-sft-qlora --exclude "*.bin" "*.pth" "*.gguf" --local-dir ./tmp
rm tmp/config.json
- run pytorch container and mount under /opt/ml/model
docker run --gpus all -it --rm \
-v $(pwd)/tmp/:/opt/ml/model \
-e HUGGING_FACE_HUB_TOKEN=$(cat ~/.cache/huggingface/token) \
-e HF_TOKEN=$(cat ~/.cache/huggingface/token) \
--entrypoint /bin/bash nvcr.io/nvidia/pytorch:24.01-py3
- install peft & run python
pip3 install peft && python3
- run peft
from peft import AutoPeftModelForCausalLM
m = AutoPeftModelForCausalLM.from_pretrained("/opt/ml/model")
Error
>>> m = AutoPeftModelForCausalLM.from_pretrained("/opt/ml/model")
config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 571/571 [00:00<00:00, 9.28MB/s]
model.safetensors.index.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 25.1k/25.1k [00:00<00:00, 19.0MB/s]
model-00001-of-00002.safetensors: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 9.94G/9.94G [00:18<00:00, 549MB/s]
model-00002-of-00002.safetensors: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4.54G/4.54G [00:08<00:00, 553MB/s]
Downloading shards: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:26<00:00, 13.22s/it]
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.33it/s]
generation_config.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 116/116 [00:00<00:00, 1.14MB/s]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/peft/auto.py", line 128, in from_pretrained
return cls._target_peft_class.from_pretrained(
File "/usr/local/lib/python3.10/dist-packages/peft/peft_model.py", line 430, in from_pretrained
model.load_adapter(model_id, adapter_name, is_trainable=is_trainable, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/peft/peft_model.py", line 984, in load_adapter
adapters_weights = load_peft_weights(model_id, device=torch_device, **hf_hub_download_kwargs)
File "/usr/local/lib/python3.10/dist-packages/peft/utils/save_and_load.py", line 415, in load_peft_weights
has_remote_safetensors_file = file_exists(
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 106, in _inner_fn
validate_repo_id(arg_value)
File "/usr/local/lib/python3.10/dist-packages/huggingface_hub/utils/_validators.py", line 154, in validate_repo_id
raise HFValidationError(
huggingface_hub.errors.HFValidationError: Repo id must be in the form 'repo_name' or 'namespace/repo_name': '/opt/ml/model'. Use `repo_type` argument if needed.
Will open an issue in peft
, once fixed we should add >=
for the version.
from text-generation-inference.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
from text-generation-inference.
Related Issues (20)
- Long install report HOT 2
- P40 with USE_FLASH_ATTENTION=False HOT 2
- Sparse Marlin HOT 3
- protobuf version not compatible HOT 1
- Qwen/Qwen2-72B-Instruct-AWQ gibberish output in 2.0.4 HOT 3
- Will Support Disaggregating Prefill and Decoding? HOT 1
- `top_p` messes up `top_logprobs` HOT 2
- template_error in /chat/completions HOT 2
- how to launch a service using downloaded model weights? HOT 2
- TGI keeps crashing with 'device-side assert triggered' HOT 1
- AttributeError: 'MixtralLayer' object has no attribute 'mlp' HOT 3
- Error loading Qwen2-72B-Instruct with EETQ HOT 1
- [RFC]Add Auto-Round Support HOT 18
- OpenAI-compatible API has a discrepancy with original OpenAI API when using tool calls HOT 2
- Error with sharded Mixtral HOT 5
- Unable to load the local model file into LoRA adaptors HOT 10
- Could not import Flash Attention enabled models: cannot import name 'FastLayerNorm' HOT 1
- Error "EOF while parsing an object..." with tool_calls HOT 6
- DeepSeek Coder V2: sharded is not supported for AutoModel HOT 2
- loading fast tokenizer implementation for cached model with `HF_HUB_OFFLINE=1` fails HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from text-generation-inference.