You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[GGUF] metadata serialization into Uint8Arrray (#1740)
### Description
This PR introduces function that serializes GGUF metadata/header into
Uint8Arrray so that I can use
#1718 to update gguf
metadata on hf.co
* `serializeTypedMetadata()` - Serialize GGUF metadata to binary format
* `serializeGgufHeader()` - Create complete GGUF headers with metadata +
tensor info + alignment
* Enhanced `gguf()` function - Now returns `littleEndian` property for
endianness detection
### Usage example
```ts
// Edit first kB of file
await commit({
repo,
accessToken: "hf_...",
operations: [{
type: "edit",
originalContent: new Blob(original gguf header),
edits: [{
start: 0,
end: 1000,
content: new Blob(serializeGgufHeader(new gguf header with updated metadata))
}]
}]
})
```
0 commit comments