"vscode:/vscode.git/clone" did not exist on "3b5b1c56983004ca1ee4190d0eb65f98b0101d39"
Unverified Commit ca95556c authored by fzyzcjy's avatar fzyzcjy Committed by GitHub
Browse files

Tiny fix sampler error when prob is not contiguous (#6639)

parent eb8f02dd
......@@ -101,7 +101,7 @@ class Sampler(nn.Module):
# Check Nan will throw exception, only check when crash_on_warnings is True
check_nan = self.use_nan_detection and crash_on_warnings()
batch_next_token_ids = top_k_top_p_sampling_from_probs(
probs,
probs.contiguous(),
sampling_info.top_ks,
sampling_info.top_ps,
filter_apply_order="joint",
......
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