Skip to content

Commit

Permalink
feat(llm): add Granite 3.0 models to WatsonXChatLLM Preset
Browse files Browse the repository at this point in the history
Signed-off-by: Tomas Dvorak <[email protected]>
  • Loading branch information
Tomas2D committed Nov 6, 2024
1 parent f93d181 commit 1e6aa37
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/adapters/watsonx/chatPreset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ interface WatsonXChatLLMPreset {
}

export const WatsonXChatLLMPreset = {
"ibm/granite-3-8b-instruct": (): WatsonXChatLLMPreset => {
const { template, parameters, messagesToPrompt } = LLMChatTemplates.get("granite3Instruct");
return {
base: {
parameters: {
decoding_method: "greedy",
include_stop_sequence: false,
stop_sequences: [...parameters.stop_sequence],
},
},
chat: {
messagesToPrompt: messagesToPrompt(template),
},
};
},
"ibm/granite-3-2b-instruct"() {
return WatsonXChatLLMPreset["ibm/granite-3-8b-instruct"]();
},
"meta-llama/llama-3-1-70b-instruct": (): WatsonXChatLLMPreset => {
const { template, messagesToPrompt, parameters } = LLMChatTemplates.get("llama3.1");

Expand Down

0 comments on commit 1e6aa37

Please sign in to comment.