Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions vllm/poc/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ def is_mismatch(
) -> bool:
"""Check if vectors differ beyond threshold."""
received = decode_vector(received_b64)
if not np.all(np.isfinite(received)):
return True
distance = float(np.linalg.norm(computed_vector - received))
return distance > dist_threshold

Expand Down
7 changes: 6 additions & 1 deletion vllm/poc/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,13 @@ def validate_artifacts(

computed_vec = decode_vector(artifact["vector_b64"])
received_vec = decode_vector(received_b64)
distance = float(np.linalg.norm(computed_vec - received_vec))

if not np.all(np.isfinite(received_vec)):
n_mismatch += 1
mismatch_nonces.append(nonce)
continue

distance = float(np.linalg.norm(computed_vec - received_vec))
if distance > dist_threshold:
n_mismatch += 1
mismatch_nonces.append(nonce)
Expand Down
Loading