Add preliminary README

This commit is contained in:
Pablo de la Torre Jamardo 2025-06-28 20:43:50 +02:00
parent 60f6f9e55a
commit 3d362d169d
5 changed files with 10 additions and 3 deletions

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
HELP.md
README.md
.mvn

BIN
demo.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -1 +1 @@
[1751134161] warming up the model with an empty run
[1751135918] warming up the model with an empty run

View File

@ -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)

View File

@ -1,2 +1,5 @@
spring.application.name = ia-chat-boot
server.port = 8080
! Model
model.gguf.name = openchat-3.5-0106.Q4_K_M