Pass base_dir to model files can be loaded for auto-tp/meta-tensor. #4348
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR will enable auto-tp and meta-tensor feature to work with all models including Llama2.
Usage example with https://github.com/microsoft/DeepSpeedExamples/tree/master/inference/huggingface/text-generation
Run Command:
deepspeed --num_gpus=2 inference-test.py --model meta-llama/Llama-2-7b-hf --use_meta_tensor --checkpoint_path=/home/user/.cache/huggingface/hub/models--meta-llama--Llama-2-7b-hf/snapshots/6fdf2e60f86ff2481f2241aaee459f85b5b0bbb9/