Skip to content

Commit

Permalink
👾Fix chunk count not incrementing when parsing additional chunks in a…
Browse files Browse the repository at this point in the history
… local file (#767)

When parsing a local GGUF and the metadata section does not fit in the
same chunk, the parser would try to load more chunks. However, in the
local file implementation range view, the chunk count is not
incremented, resulting it not actually loading in more data.
  • Loading branch information
ryan-the-crayon authored Jun 21, 2024
1 parent e2689f8 commit 70a27aa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/gguf/src/gguf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ class RangeViewLocalFile extends RangeView {
const range = [this.chunk * HTTP_CHUNK_SIZE, (this.chunk + 1) * HTTP_CHUNK_SIZE - 1];
const buffer = await blob.slice(range[0], range[1]).arrayBuffer();
this.appendBuffer(new Uint8Array(buffer));
this.chunk += 1;
}
}

Expand Down

0 comments on commit 70a27aa

Please sign in to comment.