hfppl
hfppl copied to clipboard
ValueError: probabilities do not sum to 1
I modify .lm.s ---> lm it can run.But have a new issue.
/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