add verbose mode to the show command (#9640)

Add metadata and tensor information to the show command to be able to
see more information about a model. This outputs the same data as
shown on the model details page on ollama.com
This commit is contained in:
Patrick Devine
2025-03-13 14:24:27 -07:00
committed by GitHub
parent 80c7ce381b
commit 4bed739259
6 changed files with 130 additions and 19 deletions

View File

@@ -327,6 +327,10 @@ func (t Tensor) Size() uint64 {
return t.parameters() * t.typeSize() / t.blockSize()
}
func (t Tensor) Type() string {
return fileType(t.Kind).String()
}
type container interface {
Name() string
Decode(io.ReadSeeker) (model, error)