Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
public enum ModelType {
LLAMA_3,
LLAMA_3_1,
LLAMA_3_2,
LLAVA_1_5,
LLAMA_GUARD_3,
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public static int getModelCategory(ModelType modelType) {
return VISION_MODEL;
case LLAMA_3:
case LLAMA_3_1:
case LLAMA_3_2:
default:
return TEXT_MODEL;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static String getSystemPromptTemplate(ModelType modelType) {
switch (modelType) {
case LLAMA_3:
case LLAMA_3_1:
case LLAMA_3_2:
return "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n"
+ SYSTEM_PLACEHOLDER
+ "<|eot_id|>";
Expand All @@ -33,6 +34,7 @@ public static String getUserPromptTemplate(ModelType modelType) {
switch (modelType) {
case LLAMA_3:
case LLAMA_3_1:
case LLAMA_3_2:
case LLAMA_GUARD_3:
return "<|start_header_id|>user<|end_header_id|>\n"
+ USER_PLACEHOLDER
Expand All @@ -49,6 +51,7 @@ public static String getConversationFormat(ModelType modelType) {
switch (modelType) {
case LLAMA_3:
case LLAMA_3_1:
case LLAMA_3_2:
return getUserPromptTemplate(modelType) + "\n" + ASSISTANT_PLACEHOLDER + "<|eot_id|>";
case LLAVA_1_5:
return USER_PLACEHOLDER + " ASSISTANT:";
Expand All @@ -61,6 +64,7 @@ public static String getStopToken(ModelType modelType) {
switch (modelType) {
case LLAMA_3:
case LLAMA_3_1:
case LLAMA_3_2:
case LLAMA_GUARD_3:
return "<|eot_id|>";
case LLAVA_1_5:
Expand Down
Loading