mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-08 20:40:34 +00:00
fix bugs in sampler
This commit is contained in:
committed by
FrankLeeeee
parent
02c1bf8b2a
commit
bbfebfb9fc
@@ -21,7 +21,7 @@ def multinomial_sample(
|
||||
"""
|
||||
Sample tokens in a random phase.
|
||||
"""
|
||||
random_results = torch.multinomial(probs, num_samples=1, replacement=True).cpu()
|
||||
random_results = torch.multinomial(probs, num_samples=1).squeeze(1)
|
||||
return random_results
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user