Oct
22
引用
curl -X POST http://localhost:11434/api/chat \
-H "Content-Type: application/json" \
-d '{
"model": "hf.co/Triangle104/Qwen3-30B-A3B-abliterated-Q5_K_M-GGUF:Q5_K_M",
"messages": [
{
"role": "user",
"content": "Pourquoi le ciel est-il bleu? Reponds en anglais, svp."
}
],
"options": {
"num_ctx": 40960
},
"stream": false
}'
# HOWTO
1. 让模型一直加载在内存/显存中
$ vi /etc/systemd/system/ollama.service
增加配置 Environment="OLLAMA_KEEP_ALIVE=-1"
然后 service ollama restart ,加载模型后 ollama ps 看 UTIL 列,值是 Forever 说明生效了。
2. 改变监听的 IP、端口 允许来自外部的请求
新增环境变量
- 允许来自外部的请求:
OLLAMA_HOST=0.0.0.0
- 更换端口:
OLLAMA_HOST=0.0.0.0:8080
欢迎扫码关注:

转载请注明出自 ,如是转载文则注明原出处,谢谢:)
RSS订阅地址: https://www.felix021.com/blog/feed.php 。
ClickHouse Playground


