Skip to content

Commit 8c84780

Browse files
Android add a new MODEL_TYPE_MULTIMODAL const (#15235)
### Summary Match const variable name in jni_layer_llama.cpp `MODEL_TYPE_CATEGORY_MULTIMODAL` ### Test plan CI cc @cbilgin Co-authored-by: Hansong Zhang <[email protected]>
1 parent 698cc37 commit 8c84780

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/LlmModule.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public class LlmModule {
2525

2626
public static final int MODEL_TYPE_TEXT = 1;
2727
public static final int MODEL_TYPE_TEXT_VISION = 2;
28+
public static final int MODEL_TYPE_MULTIMODAL = 2;
2829

2930
private final HybridData mHybridData;
3031
private static final int DEFAULT_SEQ_LEN = 128;

extension/android/executorch_android/src/main/java/org/pytorch/executorch/extension/llm/LlmModuleConfig.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ private LlmModuleConfig(Builder builder) {
3434
/** Model type constant for text-and-vision multimodal models. */
3535
public static final int MODEL_TYPE_TEXT_VISION = 2;
3636

37+
/** Model type constant for generic multimodal models. */
38+
public static final int MODEL_TYPE_MULTIMODAL = 2;
39+
3740
/**
3841
* Creates a new Builder instance for constructing LlmModuleConfig objects.
3942
*
@@ -141,7 +144,7 @@ public Builder dataPath(String dataPath) {
141144
/**
142145
* Sets the model type (text-only or multimodal).
143146
*
144-
* @param modelType One of MODEL_TYPE_TEXT or MODEL_TYPE_TEXT_VISION
147+
* @param modelType One of MODEL_TYPE_TEXT, MODEL_TYPE_TEXT_VISION, MODEL_TYPE_MULTIMODAL
145148
* @return This builder instance for method chaining
146149
*/
147150
public Builder modelType(int modelType) {

0 commit comments

Comments
 (0)