Update server/text_generation_server/adapters/lora.py

This commit is contained in:
Nicolas Patry 2024-12-02 06:02:02 +01:00 committed by GitHub
parent 98d0093660
commit 600d7e6ece
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -331,16 +331,13 @@ class BatchLoraWeights(BatchAdapterWeights):
for idx in segment_indices for idx in segment_indices
if idx in adapter_weights if idx in adapter_weights
} }
use_sgmv = False
rank_data = {}
if not has_sgmv(): if not has_sgmv():
return BatchLoraWeights( return BatchLoraWeights(
lora_a=lora_a, lora_a=lora_a,
lora_b=lora_b, lora_b=lora_b,
adapter_index_configs=adapter_index_configs, adapter_index_configs=adapter_index_configs,
rank_data=rank_data, rank_data={},
use_sgmv=use_sgmv, use_sgmv=False,
) )
if prefill or max_rank > BGMV_MAX_RANK: if prefill or max_rank > BGMV_MAX_RANK:
use_sgmv = True use_sgmv = True