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) {
459459 * Set pooling type for embeddings (default: model default if unspecified).
460460 */
461461 public ModelParameters setPoolingType (PoolingType type ) {
462- parameters .put ("--pooling" , String . valueOf ( type .getId () ));
462+ parameters .put ("--pooling" , type .getArgValue ( ));
463463 return this ;
464464 }
465465
466466 /**
467467 * Set RoPE frequency scaling method (default: linear unless specified by the model).
468468 */
469469 public ModelParameters setRopeScaling (RopeScalingType type ) {
470- parameters .put ("--rope-scaling" , String . valueOf ( type .getId () ));
470+ parameters .put ("--rope-scaling" , type .getArgValue ( ));
471471 return this ;
472472 }
473473
@@ -960,3 +960,5 @@ public ModelParameters enableJinja() {
960960 }
961961
962962}
963+
964+
Original file line number Diff line number Diff line change 22
33public enum PoolingType {
44
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" );
1111
12- private final int id ;
12+ private final String argValue ;
1313
14- PoolingType (int value ) {
15- this .id = value ;
14+ PoolingType (String value ) {
15+ this .argValue = value ;
1616 }
1717
18- public int getId () {
19- return id ;
18+ public String getArgValue () {
19+ return argValue ;
2020 }
21- }
21+ }
Original file line number Diff line number Diff line change 22
33public enum RopeScalingType {
44
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" );
1111
12- private final int id ;
12+ private final String argValue ;
1313
14- RopeScalingType (int value ) {
15- this .id = value ;
14+ RopeScalingType (String value ) {
15+ this .argValue = value ;
1616 }
1717
18- public int getId () {
19- return id ;
18+ public String getArgValue () {
19+ return argValue ;
2020 }
21- }
21+ }
You can’t perform that action at this time.
0 commit comments