hfppl icon indicating copy to clipboard operation
hfppl copied to clipboard

ValueError: probabilities do not sum to 1

Open Minami-su opened this issue 1 year ago • 0 comments

image

I modify .lm.s ---> lm it can run.But have a new issue. image

/usr/local/lib/python3.10/dist-packages/hfppl/distributions/lmcontext.py in sample(self) 24 async def sample(self): 25 probs = np.exp(self.ctx.next_token_logprobs) ---> 26 token_id = np.random.choice(len(probs), p=(probs)) 27 self.ctx.tokens.append(token_id) 28 logprob = self.ctx.next_token_logprobs[token_id]

mtrand.pyx in numpy.random.mtrand.RandomState.choice()

ValueError: probabilities do not sum to 1 image

Minami-su avatar Mar 09 '24 11:03 Minami-su