mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 18:36:41 +02:00
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:
parent
80c7ce381b
commit
4bed739259
6 changed files with 130 additions and 19 deletions
|
@ -349,6 +349,7 @@ type ShowResponse struct {
|
|||
Messages []Message `json:"messages,omitempty"`
|
||||
ModelInfo map[string]any `json:"model_info,omitempty"`
|
||||
ProjectorInfo map[string]any `json:"projector_info,omitempty"`
|
||||
Tensors []Tensor `json:"tensors,omitempty"`
|
||||
ModifiedAt time.Time `json:"modified_at,omitempty"`
|
||||
}
|
||||
|
||||
|
@ -467,6 +468,13 @@ type ModelDetails struct {
|
|||
QuantizationLevel string `json:"quantization_level"`
|
||||
}
|
||||
|
||||
// Tensor describes the metadata for a given tensor.
|
||||
type Tensor struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
Shape []uint64 `json:"shape"`
|
||||
}
|
||||
|
||||
func (m *Metrics) Summary() {
|
||||
if m.TotalDuration > 0 {
|
||||
fmt.Fprintf(os.Stderr, "total duration: %v\n", m.TotalDuration)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue