Add GraniteInstruct prompt style and Granite 3.3 instruct models - #152
Open
DrStranded wants to merge 1 commit into
Open
DrStranded wants to merge 1 commit into
DrStranded wants to merge 1 commit into
Conversation
Granite 3.x instruct models have their own chat template; without a style they can only be run as GenericBase (bare completion prompt), which measures the missing template rather than the model (granite-3.3-2b-instruct: 4.1 -> 10.6 pass@1 on LCB v6 with the template). The branch mirrors the LLaMa3 one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an
LMStyle.GraniteInstructprompt style and registers IBM'sgranite-3.3-2b-instruct/granite-3.3-8b-instruct.Granite 3.x instruct models have their own chat template (
<|start_of_role|>system<|end_of_role|>...). There is currently no style for them, so the only options areGenericBase(a bare completion prompt) or a mismatched chat template. WithGenericBase,granite-3.3-2b-instructscores 4.1 pass@1 on LiveCodeBench v6 (the model mostly ignores the completion-style prompt); with its own chat template it scores 10.6, and every fine-tuned variant we evaluated moved by the same +7 points, i.e. theGenericBasenumber measures the missing template rather than the model.The new branch in
format_prompt_generationmirrors the existingLLaMa3branch: system message + generic question template rendered through the Granite tokenizer'sapply_chat_templatewithadd_generation_prompt=True.Release date for the two entries is set to 2025-04-16 (Granite 3.3 release).