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

Add llama-3 lora test #2027

Merged
merged 1 commit into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/llm_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,15 @@ jobs:
serve
python3 llm/client.py vllm_adapters mistral-7b-awq-unmerged-lora
docker rm -f $(docker ps -aq)
- name: Test vllm lora - llama-3-8b
working-directory: tests/integration
run: |
rm -rf models
python3 llm/prepare.py vllm llama3-8b-unmerged-lora
./launch_container.sh deepjavalibrary/djl-serving:$DJLSERVING_DOCKER_TAG $PWD/models lmi \
serve
python3 llm/client.py vllm_adapters llama3-8b-unmerged-lora
docker rm -f $(docker ps -aq)
- name: On fail step
if: ${{ failure() }}
working-directory: tests/integration
Expand Down Expand Up @@ -967,6 +976,15 @@ jobs:
serve
python3 llm/client.py lmi_dist_adapters mistral-7b-awq-unmerged-lora
docker rm -f $(docker ps -aq)
- name: Test lmi-dist lora - llama-3-8b
working-directory: tests/integration
run: |
rm -rf models
python3 llm/prepare.py lmi_dist llama3-8b-unmerged-lora
./launch_container.sh deepjavalibrary/djl-serving:$DJLSERVING_DOCKER_TAG $PWD/models lmi \
serve
python3 llm/client.py lmi_dist_adapters llama3-8b-unmerged-lora
docker rm -f $(docker ps -aq)
- name: On fail step
if: ${{ failure() }}
working-directory: tests/integration
Expand Down
14 changes: 14 additions & 0 deletions tests/integration/llm/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,13 @@ def get_model_name():
"adapters": [f"english-alpaca-{i}" for i in range(20)],
"tokenizer": "TheBloke/Llama-2-13B-fp16"
},
"llama3-8b-unmerged-lora": {
"batch_size": [3],
"seq_length": [16, 32],
"worker": 1,
"adapters": ["french", "spanish"],
"tokenizer": "TheBloke/Llama-2-13B-fp16"
},
}

lmi_dist_chat_model_spec = {
Expand Down Expand Up @@ -401,6 +408,13 @@ def get_model_name():
"adapters": [f"english-alpaca-{i}" for i in range(20)],
"tokenizer": "TheBloke/Llama-2-13B-fp16"
},
"llama3-8b-unmerged-lora": {
"batch_size": [3],
"seq_length": [16, 32],
"worker": 1,
"adapters": ["french", "spanish"],
"tokenizer": "TheBloke/Llama-2-13B-fp16"
},
"starcoder2-7b": {
"max_memory_per_gpu": [25.0],
"batch_size": [1, 4],
Expand Down
46 changes: 46 additions & 0 deletions tests/integration/llm/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,29 @@
"option.gpu_memory_utilization":
"0.8",
},
"llama3-8b-unmerged-lora": {
"option.model_id":
"s3://djl-llm/llama-3-8b-instruct-hf/",
"option.tensor_parallel_degree":
"max",
"option.task":
"text-generation",
"option.dtype":
"fp16",
"option.adapters":
"adapters",
"option.enable_lora":
"true",
"option.max_lora_rank":
64,
"adapter_ids": [
"UnderstandLing/Llama-3-8B-Instruct-fr",
"UnderstandLing/Llama-3-8B-Instruct-es",
],
"adapter_names": ["french", "spanish"],
"option.gpu_memory_utilization":
"0.8",
},
}

vllm_model_list = {
Expand Down Expand Up @@ -670,6 +693,29 @@
"adapter_names": [f"english-alpaca-{i}" for i in range(20)],
"option.gpu_memory_utilization": "0.8",
},
"llama3-8b-unmerged-lora": {
"option.model_id":
"s3://djl-llm/llama-3-8b-instruct-hf/",
"option.tensor_parallel_degree":
"max",
"option.task":
"text-generation",
"option.dtype":
"fp16",
"option.adapters":
"adapters",
"option.enable_lora":
"true",
"option.max_lora_rank":
64,
"adapter_ids": [
"UnderstandLing/Llama-3-8B-Instruct-fr",
"UnderstandLing/Llama-3-8B-Instruct-es",
],
"adapter_names": ["french", "spanish"],
"option.gpu_memory_utilization":
"0.8",
},
"starcoder2-7b": {
"option.model_id": "s3://djl-llm/bigcode-starcoder2",
"option.task": "text-generation",
Expand Down
Loading