[PR #10639] feat: handle ml.DumpOptions better #13306

Closed
opened 2026-04-13 00:23:22 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/ollama/ollama/pull/10639

State: closed
Merged: Yes


ml.Dump will preserve default values if not specified. previously, if you provide any value for opts, it will override the defaults

Example:

Dump(ctx, t) // => precision=4, edgeitems=3

Example: set precision

Dump(ctx, t, DumpWithPrecision(6)) // => precision=6, edgeitems=3

Example: set edgeitems

Dump(ctx, t, DumpWithEdgeItems(4)) // => precision=4, edgeitems=3

Example: set both precision and edgeitems

Dump(ctx, t, DumpWithPrecision(6), DumpWithEdgeItems(4)) // => precision=6, edgeitems=4

This change also adds a Threshold field where the full tensor will be dumped if the total number of items is less than or equal to Threshold

**Original Pull Request:** https://github.com/ollama/ollama/pull/10639 **State:** closed **Merged:** Yes --- `ml.Dump` will preserve default values if not specified. previously, if you provide any value for `opts`, it will override the defaults Example: ```go Dump(ctx, t) // => precision=4, edgeitems=3 ``` Example: set precision ```go Dump(ctx, t, DumpWithPrecision(6)) // => precision=6, edgeitems=3 ``` Example: set edgeitems ```go Dump(ctx, t, DumpWithEdgeItems(4)) // => precision=4, edgeitems=3 ``` Example: set both precision and edgeitems ```go Dump(ctx, t, DumpWithPrecision(6), DumpWithEdgeItems(4)) // => precision=6, edgeitems=4 ``` This change also adds a `Threshold` field where the full tensor will be dumped if the total number of items is less than or equal to `Threshold`
GiteaMirror added the pull-request label 2026-04-13 00:23:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13306