-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AutocompleteTemplate: Use modelfile template for granite3 #3314
base: main
Are you sure you want to change the base?
Conversation
granite3 is currently using the "hole filler" template since it lacks FIM support. This template is getting sent to ollama raw, so the template from the model file is not getting applied to it. This commit ensures the proper format is fed to the model, by moving the hole filler system message to be a global constant, and using it in the existing holeFillerTemplate and a new granteHoleFillerTemplate that also applies the appropiate model specific formatting.
✅ Deploy Preview for continuedev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
this is marked draft because i haven't tested it yet, so haven't confirmed it doesn't regress results. I just sketched it out a few days ago after noticing the problem when looking at ollama debug output. I will test eventually, but for now, I just want to get it off my machine so I don't lose track of it. |
) { | ||
return holeFillerTemplate; | ||
} | ||
|
||
if (lowerCaseModel.includes("granite3")) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lowerCaseModel.includes("granite3") && !lowerCaseModel.includes("-code")
future proofing the next models that'll support FIM
@halfline have you had any time to take a second look at this? |
not yet and the latest granite release has a different template. will get back to this soon |
granite3 is currently using the "hole filler" template since it lacks FIM support. This template is getting sent to ollama raw, so the template from the model file is not getting applied to it.
This commit ensures the proper format is fed to the model, by moving the hole filler system message to be a global constant, and using it in the existing holeFillerTemplate and a new granteHoleFillerTemplate that also applies the appropiate model specific formatting.