Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/main/java/org/beehive/gpullama3/model/loader/ModelLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ public static Model loadModel(Options options) throws IOException {
return modelType.loadModel(gguf.getFileChannel(), gguf, contextLength, useTornadovm);
}

/**
* For compatibility with langchain4j and quarkus.
*/
public static Model loadModel(Path ggufPath, int contextLength, boolean loadWeights, boolean useTornadovm) throws IOException {
// initial load of metadata from gguf file
GGUF gguf = GGUF.loadGGUFMetadata(ggufPath);
// detect model type
ModelType modelType = detectModelType(gguf.getMetadata());
// model type-specific load
return modelType.loadModel(gguf.getFileChannel(), gguf, contextLength, useTornadovm);
}

/**
* Dispatcher method for loading a standard (non-tornado) tensor based on GGML type.
* Used in CPU-path.
Expand Down
Loading