获取模型信息
获取关于模型的详细信息
您可以从已加载的模型实例中访问该模型的一般信息和元数据。
在以下示例中,LLM 引用可以替换为嵌入模型(embedding model)引用,而无需进行任何其他更改。
import lmstudio as lms
model = lms.llm()
print(model.get_info())输出示例
LlmInstanceInfo.from_dict({
"architecture": "qwen2",
"contextLength": 4096,
"displayName": "Qwen2.5 7B Instruct 1M",
"format": "gguf",
"identifier": "qwen2.5-7b-instruct",
"instanceReference": "lpFZPBQjhSZPrFevGyY6Leq8",
"maxContextLength": 1010000,
"modelKey": "qwen2.5-7b-instruct-1m",
"paramsString": "7B",
"path": "lmstudio-community/Qwen2.5-7B-Instruct-1M-GGUF/Qwen2.5-7B-Instruct-1M-Q4_K_M.gguf",
"sizeBytes": 4683073888,
"trainedForToolUse": true,
"type": "llm",
"vision": false
})