import llamppl as llp
import numpy as np
class Infilling(llp.Model):
def __init__(self, words):
super().__init__()
self.s = words.pop(0)
self.ctx = self.new_context(self.s)
self.remaining_segments = [self.llama.tokenize(w) for w in words]
def start(self):
self.step()
def step(self):
# Generate a token
n = self.sample(llp.
Your Task
Complete the code above, taking into account the cross-file context provided.
Your solution must work correctly with the related files in the project.