Ollama 官方中文文档
  1. 显示模型详情
Ollama 官方中文文档
  • 接口 Endpoints
  • 规范 Conventions
  • 生成补全
    • 概括
    • 流式生成请求(Streaming)
      POST
    • 非流式生成请求(No Streaming)
      POST
    • 带后缀的生成请求(with Suffix)
      POST
    • 结构化输出请求(Structured Outputs)
      POST
    • JSON 模式请求(JSON Mode)
      POST
    • 带图像的生成请求(with Images)
      POST
    • 原始模式请求(Raw Mode)
      POST
    • 可复现输出请求(Reproducible Outputs)
      POST
    • 参数化生成请求(with Options)
      POST
    • 加载模型
      POST
    • 卸载模型
      POST
  • 生成对话补全
    • 概括
    • 流式对话请求(Streaming)
      POST
    • 非流式对话请求(No Streaming)
      POST
    • 结构化输出对话请求(Structured Outputs)
      POST
    • 带历史上下文的对话请求(With History)
      POST
    • 带图像的对话请求(with Images)
      POST
    • 可复现输出的对话请求(Reproducible Outputs)
      POST
    • 支持工具调用的对话请求(with Tools)
      POST
    • 加载模型
      POST
    • 卸载模型
      POST
  • 创建模型
    • 概括
    • 创建新模型
      POST
    • 量化模型
      POST
    • 从 GGUF 文件创建模型
      POST
    • 从 Safetensors 目录创建模型
      POST
  • 检查 Blob 是否存在
    • 概括
  • 推送 Blob
    • 概括
  • 列出本地模型
    • 概括
    • 示例
  • 显示模型详情
    • 概括
    • 示例
      POST
  • 复制模型
    • 概括
    • 示例
  • 删除模型
    • 概括
    • 示例
  • 拉取模型
    • 概括
    • 示例
  • 推送模型
    • 概括
  • 生成嵌入向量
    • 概括
    • 示例
    • 多输入请求(Multiple Input)
  • 列出运行中模型
    • 概括
    • 示例
  • 生成单个嵌入向量
    • 概括
    • 示例
  • 版本信息
    • 概括
  1. 显示模型详情

示例

POST
http://localhost:11434/api/show
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://localhost:11434/api/show' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "llama3.2"
}'
响应示例响应示例
{
  "modelfile": "# Modelfile generated by \"ollama show\"\n# To build a new Modelfile based on this one, replace the FROM line with:\n# FROM llava:latest\n\nFROM /Users/matt/.ollama/models/blobs/sha256:200765e1283640ffbd013184bf496e261032fa75b99498a9613be4e94d63ad52\nTEMPLATE \"\"\"{{ .System }}\nUSER: {{ .Prompt }}\nASSISTANT: \"\"\"\nPARAMETER num_ctx 4096\nPARAMETER stop \"</s>\"\nPARAMETER stop \"USER:\"\nPARAMETER stop \"ASSISTANT:\"",
  "parameters": "num_keep                       24\nstop                           \"<|start_header_id|>\"\nstop                           \"<|end_header_id|>\"\nstop                           \"<|eot_id|>\"",
  "template": "{{ if .System }}<|start_header_id|>system<|end_header_id|>\n\n{{ .System }}<|eot_id|>{{ end }}{{ if .Prompt }}<|start_header_id|>user<|end_header_id|>\n\n{{ .Prompt }}<|eot_id|>{{ end }}<|start_header_id|>assistant<|end_header_id|>\n\n{{ .Response }}<|eot_id|>",
  "details": {
    "parent_model": "",
    "format": "gguf",
    "family": "llama",
    "families": [
      "llama"
    ],
    "parameter_size": "8.0B",
    "quantization_level": "Q4_0"
  },
  "model_info": {
    "general.architecture": "llama",
    "general.file_type": 2,
    "general.parameter_count": 8030261248,
    "general.quantization_version": 2,
    "llama.attention.head_count": 32,
    "llama.attention.head_count_kv": 8,
    "llama.attention.layer_norm_rms_epsilon": 0.00001,
    "llama.block_count": 32,
    "llama.context_length": 8192,
    "llama.embedding_length": 4096,
    "llama.feed_forward_length": 14336,
    "llama.rope.dimension_count": 128,
    "llama.rope.freq_base": 500000,
    "llama.vocab_size": 128256,
    "tokenizer.ggml.bos_token_id": 128000,
    "tokenizer.ggml.eos_token_id": 128009,
    "tokenizer.ggml.merges": [],
    "tokenizer.ggml.model": "gpt2",
    "tokenizer.ggml.pre": "llama-bpe",
    "tokenizer.ggml.token_type": [],
    "tokenizer.ggml.tokens": []
  }
}

请求参数

Body 参数application/json
model
string 
必需
示例值:
llama3.2
示例

返回响应

🟢200Success
application/json
Body
modelfile
string 
必需
parameters
string 
必需
template
string 
必需
details
object 
必需
parent_model
string 
必需
format
string 
必需
family
string 
必需
families
array[string]
必需
parameter_size
string 
必需
quantization_level
string 
必需
model_info
object 
必需
general.architecture
string 
必需
general.file_type
integer 
必需
general.parameter_count
integer 
必需
general.quantization_version
integer 
必需
llama.attention.head_count
integer 
必需
llama.attention.head_count_kv
integer 
必需
llama.attention.layer_norm_rms_epsilon
number 
必需
llama.block_count
integer 
必需
llama.context_length
integer 
必需
llama.embedding_length
integer 
必需
llama.feed_forward_length
integer 
必需
llama.rope.dimension_count
integer 
必需
llama.rope.freq_base
integer 
必需
llama.vocab_size
integer 
必需
tokenizer.ggml.bos_token_id
integer 
必需
tokenizer.ggml.eos_token_id
integer 
必需
tokenizer.ggml.merges
array[string]
必需
populates if verbose=true
tokenizer.ggml.model
string 
必需
tokenizer.ggml.pre
string 
必需
tokenizer.ggml.token_type
array[string]
必需
populates if verbose=true
tokenizer.ggml.tokens
array[string]
必需
populates if verbose=true
修改于 2025-03-27 09:23:33
上一页
概括
下一页
概括
Built with