vLLM
vLLM 是正式環境真正在用的推論伺服器:PagedAttention、連續批次處理、localhost:8000/v1 上的 OpenAI 相容服務。GPU 你自己出。
vLLM 是正式環境真正在用的推論伺服器:PagedAttention、連續批次處理、localhost:8000/v1 上的 OpenAI 相容服務。GPU 你自己出。
`vllm serve Qwen/Qwen3-8B` 一個指令搞定。CUDA 或 ROCm;在 Mac 上請改用 MLX。沒有配額、沒有金鑰,什麼都不會離開你的機器。
- 最大上下文
- Set with --max-model-len
- 免費額度
- 無限且私密
- 註冊要求
- 什麼都不用 —— 無帳號
端點
基底網址
http://localhost:8000/v1速率限制
None — it is your machine- OpenAI 相容
- 文字
- 視覺
程式碼範例
npm install openaiimport OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'http://localhost:8000/v1',
apiKey: 'not-needed'
})
const response = await client.chat.completions.create({
model: 'Qwen/Qwen3-8B',
messages: [{ role: 'user', content: 'Explain closures in one paragraph.' }]
})
console.log(response.choices[0].message.content)pip install openaifrom openai import OpenAI
client = OpenAI(
base_url="http://localhost:8000/v1",
api_key="not-needed",
)
response = client.chat.completions.create(
model="Qwen/Qwen3-8B",
messages=[{"role": "user", "content": "Explain closures in one paragraph."}],
)
print(response.choices[0].message.content)curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "Qwen/Qwen3-8B",
"messages": [{"role": "user", "content": "Explain closures in one paragraph."}]
}'值得注意
- 先起伺服器:`vllm serve Qwen/Qwen3-8B`。
- 需要 CUDA 或 ROCm GPU;Mac 請改用 MLX。
你能免費使用的模型5
- Qwen 3
qwen3 - Llama 3.3 70B
llama-3.3-70b - GPT-OSS 120B
gpt-oss-120b - DeepSeek R1
deepseek-ai/DeepSeek-R1 - DeepSeek V4
deepseek-v4-flash