Skip to content

Commit 1d476d9

Browse files
committed
adapt to the latest connector
1 parent 0cea894 commit 1d476d9

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

eval/eval_inference_F1.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ for pkg in "${REQUIRED_PACKAGES[@]}"; do
1010
done
1111

1212
CODE_ROOT=$(dirname "$(dirname "$(readlink -f "$0")")")
13-
13+
export ENABLE_SPARSE=true
1414

1515
MODEL_PATH=""
1616
UCM_SPARSE_CONFIG=""

eval/inference.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
def 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

134139
def 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

Comments
 (0)