Skip to content

Commit

Permalink
update readme and fix some bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lwaekfjlk committed Oct 11, 2023
1 parent e74716d commit e328128
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion llm_deploy/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
We need to use an unmerged branch to support deploying lora-finetuned model. (the forked repo is https://github.com/troph-team/vllm.git)

Go to the vllm dir and pip install -e .
Go to the vllm dir and pip install -e .

To notice https://github.com/vllm-project/vllm/issues/1283, need to modify the config file to == 2.0.1 and the pytorch version if facing with CUDA version error.
6 changes: 3 additions & 3 deletions llm_deploy/vllm_test.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from vllm import LLM, SamplingParams
from vllm.model_executor.adapters import lora

# Create an LLM.
llm = LLM(model="../llm_ft/vicuna-7b-1.5", gpu_memory_utilization=0.05)
# Create an LLM, need to change gpu memory utilization based on our need
llm = LLM(model="../llm_ft/vicuna-7b-1.5", gpu_memory_utilization=0.5)

# Add LoRA adapter
lora.LoRAModel.from_pretrained(llm.llm_engine.workers[0].model, "../llm_ft/checkpoints/checkpoint-1200")
lora.LoRAModel.from_pretrained(llm.llm_engine.workers[0].model, "../llm_ft/vicuna_checkpoints/checkpoint-1200")

prompts = [
"Hello, my name is",
Expand Down

0 comments on commit e328128

Please sign in to comment.