Can you share a template for FIM? #10
-
I can't find template for FIM (Fill in the middle) task. Can you share it? |
Beta Was this translation helpful? Give feedback.
Answered by
mayank31398
May 29, 2024
Replies: 1 comment
-
Hi, its similar to starcoder models. input_text = "<fim_prefix>def print_hello_world():\n <fim_suffix>\n print('Hello world!')<fim_middle>"
inputs = tokenizer.encode(input_text, return_tensors="pt").to(device)
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0])) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mayank31398
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, its similar to starcoder models.