Skip to content

Commit

Permalink
Fix lmdeploy branch (#3145)
Browse files Browse the repository at this point in the history
  • Loading branch information
tastelikefeet authored Feb 19, 2025
1 parent d7ec5a2 commit 7989581
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions examples/train/grpo/full_lmdeploy.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# pip install lmdeploy==0.6.4
# Replace three files:
# 1. https://github.com/tastelikefeet/lmdeploy/blob/feat/reload_state_dict/lmdeploy/messages.py
# 2. https://github.com/tastelikefeet/lmdeploy/blob/feat/reload_state_dict/lmdeploy/turbomind/turbomind.py
# 3. https://github.com/tastelikefeet/lmdeploy/blob/feat/reload_state_dict/lmdeploy/turbomind/deploy/loader.py
# 1. https://github.com/tastelikefeet/lmdeploy/blob/feat/reload_state_dict_064/lmdeploy/messages.py
# 2. https://github.com/tastelikefeet/lmdeploy/blob/feat/reload_state_dict_064/lmdeploy/turbomind/turbomind.py
# 3. https://github.com/tastelikefeet/lmdeploy/blob/feat/reload_state_dict_064/lmdeploy/turbomind/deploy/loader.py

CUDA_VISIBLE_DEVICES=0,1,2,3 \
NPROC_PER_NODE=3 \
Expand Down
8 changes: 4 additions & 4 deletions swift/trainers/rlhf_trainer/grpo_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,17 +154,17 @@ def __init__(self,
max_model_len=args.vllm_max_model_len)
self.engine.default_template = self.template
elif use_lmdeploy:
# https://github.com/tastelikefeet/lmdeploy.git@feat/reload_state_dict
# https://github.com/tastelikefeet/lmdeploy.git@feat/reload_state_dict_064
# Compile:https://github.com/tastelikefeet/lmdeploy/blob/main/docs/en/get_started/installation.md
if not is_lmdeploy_available():
raise ImportError('Please install `pip install lmdeploy==0.6.4`'
' and replace three files with:\n'
'1. https://github.com/tastelikefeet/lmdeploy/blob/feat/'
'reload_state_dict/lmdeploy/messages.py\n'
'reload_state_dict_064/lmdeploy/messages.py\n'
'2. https://github.com/tastelikefeet/lmdeploy/blob/feat/'
'reload_state_dict/lmdeploy/turbomind/turbomind.py\n'
'reload_state_dict_064/lmdeploy/turbomind/turbomind.py\n'
'3. https://github.com/tastelikefeet/lmdeploy/blob/feat/'
'reload_state_dict/lmdeploy/turbomind/deploy/loader.py\n')
'reload_state_dict_064/lmdeploy/turbomind/deploy/loader.py\n')
from swift.llm import LmdeployEngine
from swift.tuners import Swift
with Swift.grpo_context(model, self.template.processor):
Expand Down

0 comments on commit 7989581

Please sign in to comment.