phi-4

Microsoft Research

phi

Phi 模型系列的最新版本:适用于上下文长度高达 16K tokens 的对话

模型信息

模型

phi-4

作者

Microsoft Research

架构

phi

参数

14B

格式

gguf

磁盘占用空间

大约 9.05 GB

下载并运行phi-4

在 LM Studio 中打开以查看下载选项

从终端下载 phi-4

使用 lms — LM Studio 的开发者 CLI 下载模型。

lms get phi-4

从你的代码中调用 phi-4

curl https://127.0.0.1:1234/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "phi-4",
    "messages": [
      { "role": "system", "content": "Always answer in rhymes." },
      { "role": "user", "content": "Introduce yourself." }
    ],
    "temperature": 0.7,
    "max_tokens": -1,
    "stream": true
  }'

下一步:构建!🔨

了解更多