Add preliminary README
This commit is contained in:
parent
60f6f9e55a
commit
3d362d169d
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,4 +1,4 @@
|
||||
HELP.md
|
||||
README.md
|
||||
|
||||
.mvn
|
||||
|
||||
|
@ -1 +1 @@
|
||||
[1751134161] warming up the model with an empty run
|
||||
[1751135918] warming up the model with an empty run
|
||||
|
@ -4,18 +4,22 @@ import com.pablotj.ia.chat.boot.domain.exception.BusinessLogicException;
|
||||
import de.kherud.llama.LlamaModel;
|
||||
import de.kherud.llama.ModelParameters;
|
||||
import jakarta.annotation.PostConstruct;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class LlmModelLoader implements AutoCloseable {
|
||||
|
||||
@Value(value = "${model.gguf.name}")
|
||||
private String modelName;
|
||||
|
||||
private LlamaModel model;
|
||||
|
||||
@PostConstruct
|
||||
public void init() {
|
||||
try {
|
||||
ModelParameters params = new ModelParameters()
|
||||
.setModelFilePath("models/openchat-3.5-0106.Q4_K_M.gguf")
|
||||
.setModelFilePath(String.format("models/%s.gguf", modelName))
|
||||
.setSeed(42)
|
||||
.setNThreads(8)
|
||||
.setNGpuLayers(0)
|
||||
|
@ -1,2 +1,5 @@
|
||||
spring.application.name = ia-chat-boot
|
||||
server.port = 8080
|
||||
|
||||
! Model
|
||||
model.gguf.name = openchat-3.5-0106.Q4_K_M
|
Loading…
x
Reference in New Issue
Block a user