Skip to content

vllm.utils.print_utils

print_embeddings

print_embeddings(embeds: list[float])
Source code in vllm/utils/print_utils.py
5
6
7
def print_embeddings(embeds: list[float]):
    embeds_trimmed = (str(embeds[:4])[:-1] + ", ...]") if len(embeds) > 4 else embeds
    print(f"Embeddings: {embeds_trimmed} (size={len(embeds)})")