2424def setup_environment_variables ():
2525 os .environ ["VLLM_USE_V1" ] = "1"
2626 os .environ ["PYTHONHASHSEED" ] = "123456"
27+ os .environ ["ENABLE_SPARSE" ] = "true"
2728
2829 global model , path_to_dataset , data_dir , ucm_sparse_config , dataset_name , tokenizer
2930 model = os .getenv ("MODEL_PATH" , "/home/models/Qwen2.5-14B-Instruct" )
@@ -80,11 +81,15 @@ def build_llm_with_uc(module_path: str, name: str, model: str):
8081 kv_connector_module_path = module_path ,
8182 kv_role = "kv_both" ,
8283 kv_connector_extra_config = {
83- "ucm_connector_name" : "UcmNfsStore" ,
84- "ucm_connector_config" : {
85- "storage_backends" : data_dir ,
86- "kv_block_size" : 33554432 ,
87- },
84+ "ucm_connectors" : [
85+ {
86+ "ucm_connector_name" : "UcmNfsStore" ,
87+ "ucm_connector_config" : {
88+ "storage_backends" : data_dir ,
89+ "use_direct" : False ,
90+ },
91+ }
92+ ],
8893 "ucm_sparse_config" : ucm_sparse_config ,
8994 },
9095 )
@@ -132,8 +137,8 @@ def print_output(
132137
133138
134139def main ():
135- module_path = "ucm.integration.vllm.uc_connector "
136- name = "UnifiedCacheConnectorV1 "
140+ module_path = "ucm.integration.vllm.ucm_connector "
141+ name = "UCMConnector "
137142 setup_environment_variables ()
138143
139144 def get_prompt (prompt ):
@@ -156,7 +161,7 @@ def get_prompt(prompt):
156161 batch_size = int (os .getenv ("BATCH_SIZE" , 20 ))
157162 with open (path_to_dataset , "r" ) as f :
158163 lines = f .readlines ()
159-
164+ # lines=lines[:20]
160165 total_data = len (lines )
161166 for start_idx in range (0 , total_data , batch_size ):
162167 end_idx = min (start_idx + batch_size , total_data )
0 commit comments