From 1bb3ec3abea364a50ee61bd7827b4aeadca8ed5d Mon Sep 17 00:00:00 2001 From: mayuriphad Date: Wed, 26 Aug 2026 09:59:45 +0530 Subject: [PATCH] Fix: Configure RWKV Models to use Cuda GPU lists via RWKV_STRATEGY --- fastchat/model/rwkv_model.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fastchat/model/rwkv_model.py b/fastchat/model/rwkv_model.py index bdbc14584..70ea62e74 100644 --- a/fastchat/model/rwkv_model.py +++ b/fastchat/model/rwkv_model.py @@ -17,9 +17,8 @@ def __init__(self, model_path): "Experimental support. Please use ChatRWKV if you want to chat with RWKV" ) self.config = SimpleNamespace(is_encoder_decoder=False) - self.model = RWKV(model=model_path, strategy="cuda fp16") - # two GPUs - # self.model = RWKV(model=model_path, strategy="cuda:0 fp16 *20 -> cuda:1 fp16") + strategy = os.environ.get("RWKV_STRATEGY", "cuda fp16") + self.model = RWKV(model=model_path, strategy=strategy) self.tokenizer = None self.model_path = model_path