Last active
January 12, 2025 14:05
-
-
Save virattt/b140fb4bf549b6125d53aa153dc53be6 to your computer and use it in GitHub Desktop.
rag-reranking-gpt-colbert.ipynb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
query_embedding = model(**query_encoding).last_hidden_state.squeeze(0)
is correct since it returns a vector per token, whilstquery_embedding = model(**query_encoding).last_hidden_state.mean(dim=1)
returns a single vector averaged over all tokens.