Skip to content

Can you share a template for FIM? #10

Closed Answered by mayank31398
Semihal asked this question in Q&A
Discussion options

You must be logged in to vote

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]))

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mayank31398
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants