File tree Expand file tree Collapse file tree 3 files changed +28
-26
lines changed
src/main/java/de/kherud/llama Expand file tree Collapse file tree 3 files changed +28
-26
lines changed Original file line number Diff line number Diff line change @@ -459,15 +459,15 @@ public ModelParameters setJsonSchema(String schema) {
459
459
* Set pooling type for embeddings (default: model default if unspecified).
460
460
*/
461
461
public ModelParameters setPoolingType (PoolingType type ) {
462
- parameters .put ("--pooling" , String . valueOf ( type .getId () ));
462
+ parameters .put ("--pooling" , type .getArgValue ( ));
463
463
return this ;
464
464
}
465
465
466
466
/**
467
467
* Set RoPE frequency scaling method (default: linear unless specified by the model).
468
468
*/
469
469
public ModelParameters setRopeScaling (RopeScalingType type ) {
470
- parameters .put ("--rope-scaling" , String . valueOf ( type .getId () ));
470
+ parameters .put ("--rope-scaling" , type .getArgValue ( ));
471
471
return this ;
472
472
}
473
473
@@ -960,3 +960,5 @@ public ModelParameters enableJinja() {
960
960
}
961
961
962
962
}
963
+
964
+
Original file line number Diff line number Diff line change 2
2
3
3
public enum PoolingType {
4
4
5
- UNSPECIFIED (- 1 ),
6
- NONE (0 ),
7
- MEAN (1 ),
8
- CLS (2 ),
9
- LAST (3 ),
10
- RANK (4 );
5
+ UNSPECIFIED ("unspecified" ),
6
+ NONE ("none" ),
7
+ MEAN ("mean" ),
8
+ CLS ("cls" ),
9
+ LAST ("last" ),
10
+ RANK ("rank" );
11
11
12
- private final int id ;
12
+ private final String argValue ;
13
13
14
- PoolingType (int value ) {
15
- this .id = value ;
14
+ PoolingType (String value ) {
15
+ this .argValue = value ;
16
16
}
17
17
18
- public int getId () {
19
- return id ;
18
+ public String getArgValue () {
19
+ return argValue ;
20
20
}
21
- }
21
+ }
Original file line number Diff line number Diff line change 2
2
3
3
public enum RopeScalingType {
4
4
5
- UNSPECIFIED (- 1 ),
6
- NONE (0 ),
7
- LINEAR (1 ),
8
- YARN2 (2 ),
9
- LONGROPE (3 ),
10
- MAX_VALUE (3 );
5
+ UNSPECIFIED ("unspecified" ),
6
+ NONE ("none" ),
7
+ LINEAR ("linear" ),
8
+ YARN2 ("yarn" ),
9
+ LONGROPE ("longrope" ),
10
+ MAX_VALUE ("maxvalue" );
11
11
12
- private final int id ;
12
+ private final String argValue ;
13
13
14
- RopeScalingType (int value ) {
15
- this .id = value ;
14
+ RopeScalingType (String value ) {
15
+ this .argValue = value ;
16
16
}
17
17
18
- public int getId () {
19
- return id ;
18
+ public String getArgValue () {
19
+ return argValue ;
20
20
}
21
- }
21
+ }
You can’t perform that action at this time.
0 commit comments