File tree Expand file tree Collapse file tree 3 files changed +6
-0
lines changed
examples/demo-apps/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo Expand file tree Collapse file tree 3 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 1111public enum ModelType {
1212 LLAMA_3 ,
1313 LLAMA_3_1 ,
14+ LLAMA_3_2 ,
1415 LLAVA_1_5 ,
1516 LLAMA_GUARD_3 ,
1617}
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ public static int getModelCategory(ModelType modelType) {
2121 return VISION_MODEL ;
2222 case LLAMA_3 :
2323 case LLAMA_3_1 :
24+ case LLAMA_3_2 :
2425 default :
2526 return TEXT_MODEL ;
2627 }
Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ public static String getSystemPromptTemplate(ModelType modelType) {
1919 switch (modelType ) {
2020 case LLAMA_3 :
2121 case LLAMA_3_1 :
22+ case LLAMA_3_2 :
2223 return "<|begin_of_text|><|start_header_id|>system<|end_header_id|>\n "
2324 + SYSTEM_PLACEHOLDER
2425 + "<|eot_id|>" ;
@@ -33,6 +34,7 @@ public static String getUserPromptTemplate(ModelType modelType) {
3334 switch (modelType ) {
3435 case LLAMA_3 :
3536 case LLAMA_3_1 :
37+ case LLAMA_3_2 :
3638 case LLAMA_GUARD_3 :
3739 return "<|start_header_id|>user<|end_header_id|>\n "
3840 + USER_PLACEHOLDER
@@ -49,6 +51,7 @@ public static String getConversationFormat(ModelType modelType) {
4951 switch (modelType ) {
5052 case LLAMA_3 :
5153 case LLAMA_3_1 :
54+ case LLAMA_3_2 :
5255 return getUserPromptTemplate (modelType ) + "\n " + ASSISTANT_PLACEHOLDER + "<|eot_id|>" ;
5356 case LLAVA_1_5 :
5457 return USER_PLACEHOLDER + " ASSISTANT:" ;
@@ -61,6 +64,7 @@ public static String getStopToken(ModelType modelType) {
6164 switch (modelType ) {
6265 case LLAMA_3 :
6366 case LLAMA_3_1 :
67+ case LLAMA_3_2 :
6468 case LLAMA_GUARD_3 :
6569 return "<|eot_id|>" ;
6670 case LLAVA_1_5 :
You can’t perform that action at this time.
0 commit comments