"tools/generate-unit-test-expect/vscode:/vscode.git/clone" did not exist on "74a81f2137bd52cc8c0c2c87be8d054688c67bcb"
Commit 398bb03f authored by James Noeckel's avatar James Noeckel
Browse files

fix out-of-place call to scatter, whose named argument name is source, not src

parent ce50305e
......@@ -958,7 +958,9 @@ def top_k_top_p_filtering(logits, top_k=0, top_p=1.0, filter_value=-float("Inf")
sorted_indices_to_remove[..., 0] = 0
# scatter sorted tensors to original indexing
indices_to_remove = sorted_indices_to_remove.scatter(dim=1, index=sorted_indices, src=sorted_indices_to_remove)
indices_to_remove = sorted_indices_to_remove.scatter(
dim=1, index=sorted_indices, source=sorted_indices_to_remove
)
logits[indices_to_remove] = filter_value
return logits
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment