Skip to content

Commit 425e7de

Browse files
Add Javadoc for loadTensorsStandard method
1 parent 23635c5 commit 425e7de

File tree

1 file changed

+10
-1
lines changed
  • src/main/java/org/beehive/gpullama3/tensor

1 file changed

+10
-1
lines changed

src/main/java/org/beehive/gpullama3/tensor/GGUF.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,16 @@ public static GGUF loadGGUFMetadata(Path modelPath) throws IOException {
9494

9595
/**
9696
* Loads tensor data from a given file channel based on the tensor metadata information.
97-
* The mapping is read-
97+
* The mapping is read-only and creates standard memory segments for each tensor.
98+
*
99+
* @param fileChannel the channel from which tensor storage is read
100+
* @param tensorDataOffset the absolute byte offset of the GGUF tensor-data section
101+
* @param tensorInfos metadata describing all GGUF tensors
102+
*
103+
* @return a map from tensor name to {@link GGMLTensorEntry} containing
104+
* standard memory segments for each tensor
105+
*
106+
* @throws IOException if memory mapping fails or the channel cannot be read
98107
*/
99108
public static Map<String, GGMLTensorEntry> loadTensorsStandard(FileChannel fileChannel, long tensorDataOffset, Map<String, GGUFTensorInfo> tensorInfos) throws IOException {
100109
Arena arena = Arena.ofAuto();

0 commit comments

Comments
 (0)