kherud/java-llama.cpp

adapting MainExample.java for Builder pattern

mbofb opened this issue · 0 comments

mbofb commented

MainExample.java in 2.2.1 still has


ModelParameters modelParams = new ModelParameters().setNGpuLayers(43);
    InferenceParameters inferParams = new InferenceParameters().setTemperature(0.7f).setPenalizeNl(true).setMirostat(InferenceParameters.MiroStat.V2).setAntiPrompt("\n");

and not yet the builder

ModelParameters modelParams = new ModelParameters.Builder().setNGpuLayers(43).build();
InferenceParameters inferParams = new InferenceParameters.Builder().setTemperature(0.7f).setPenalizeNl(true)
                                                                       //                .setNProbs(10)
                                                                       .setMirostat(InferenceParameters.MiroStat.V2).setAntiPrompt("\n").build();

(also used on github java-llama.cpp#readme)