@@ -33,14 +33,22 @@ public class LlmModule {
33
33
34
34
@ DoNotStrip
35
35
private static native HybridData initHybrid (
36
- int modelType , String modulePath , String tokenizerPath , float temperature , List <String > dataFiles );
36
+ int modelType ,
37
+ String modulePath ,
38
+ String tokenizerPath ,
39
+ float temperature ,
40
+ List <String > dataFiles );
37
41
38
42
/**
39
43
* Constructs a LLM Module for a model with given type, model path, tokenizer, temperature, and
40
44
* dataFiles.
41
45
*/
42
46
public LlmModule (
43
- int modelType , String modulePath , String tokenizerPath , float temperature , List <String > dataFiles ) {
47
+ int modelType ,
48
+ String modulePath ,
49
+ String tokenizerPath ,
50
+ float temperature ,
51
+ List <String > dataFiles ) {
44
52
ExecuTorchRuntime runtime = ExecuTorchRuntime .getRuntime ();
45
53
46
54
File modelFile = new File (modulePath );
@@ -51,7 +59,7 @@ public LlmModule(
51
59
if (!tokenizerFile .canRead () || !tokenizerFile .isFile ()) {
52
60
throw new RuntimeException ("Cannot load tokenizer path " + tokenizerPath );
53
61
}
54
-
62
+
55
63
mHybridData = initHybrid (modelType , modulePath , tokenizerPath , temperature , dataFiles );
56
64
}
57
65
@@ -61,7 +69,7 @@ public LlmModule(
61
69
*/
62
70
public LlmModule (
63
71
int modelType , String modulePath , String tokenizerPath , float temperature , String dataPath ) {
64
- this (modelType , modulePath , tokenizerPath , temperature , List .of (dataPath ));
72
+ this (modelType , modulePath , tokenizerPath , temperature , List .of (dataPath ));
65
73
}
66
74
67
75
/** Constructs a LLM Module for a model with given model path, tokenizer, temperature. */
0 commit comments