Ollama Show: Check for Projector Type (#5307)
* Check exists projtype * Maintain Ordering
This commit is contained in:
parent
6d4219083c
commit
b910fa9010
1 changed files with 9 additions and 3 deletions
12
cmd/cmd.go
12
cmd/cmd.go
|
@ -672,11 +672,17 @@ func ShowHandler(cmd *cobra.Command, args []string) error {
|
||||||
projectorData := [][]string{
|
projectorData := [][]string{
|
||||||
{"arch", "clip"},
|
{"arch", "clip"},
|
||||||
{"parameters", format.HumanNumber(uint64(resp.ProjectorInfo["general.parameter_count"].(float64)))},
|
{"parameters", format.HumanNumber(uint64(resp.ProjectorInfo["general.parameter_count"].(float64)))},
|
||||||
{"projector type", resp.ProjectorInfo["clip.projector_type"].(string)},
|
|
||||||
{"embedding length", fmt.Sprintf("%v", resp.ProjectorInfo["clip.vision.embedding_length"].(float64))},
|
|
||||||
{"projection dimensionality", fmt.Sprintf("%v", resp.ProjectorInfo["clip.vision.projection_dim"].(float64))},
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if projectorType, ok := resp.ProjectorInfo["clip.projector_type"]; ok {
|
||||||
|
projectorData = append(projectorData, []string{"projector type", projectorType.(string)})
|
||||||
|
}
|
||||||
|
|
||||||
|
projectorData = append(projectorData,
|
||||||
|
[]string{"embedding length", fmt.Sprintf("%v", resp.ProjectorInfo["clip.vision.embedding_length"].(float64))},
|
||||||
|
[]string{"projection dimensionality", fmt.Sprintf("%v", resp.ProjectorInfo["clip.vision.projection_dim"].(float64))},
|
||||||
|
)
|
||||||
|
|
||||||
mainTableData = append(mainTableData,
|
mainTableData = append(mainTableData,
|
||||||
[]string{"Projector"},
|
[]string{"Projector"},
|
||||||
[]string{renderSubTable(projectorData, false)},
|
[]string{renderSubTable(projectorData, false)},
|
||||||
|
|
Loading…
Reference in a new issue