Files
BlueRoseNote/07-Other/AI/AI Agent/MacStudio本地部署模型.md

31 lines
617 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 前言
可用工具Ollama 或者 LMStudio。LMStudio功能多一些但相对会占用更多显存。
# 修改缓存命令
```bash
#!/bin/bash
echo "=== Mac Studio 64G + glm-4.7-flash 终极提速版 ==="
# 缓存给足
export OLLAMA_CACHE_SIZE=32768
# KV缓存和模型精度一致
export OLLAMA_KV_CACHE_TYPE=q8_0
# 模型常驻
export OLLAMA_KEEP_ALIVE=-1
# 强制Metal GPUMac必开
export OLLAMA_METAL=on
# 只加载1个模型不并行Mac最稳
export OLLAMA_MAX_LOADED_MODELS=1
export OLLAMA_NUM_PARALLEL=1
# 限制上下文,大幅提速
export OLLAMA_NUM_CTX=4096
ollama serve
```