Hugging Face 將 Fireworks.ai 整合為推理提供者
Hugging Face 已將 Fireworks.ai 整合為 Hub 上支援的推理提供者。此整合使用戶能夠直接在模型頁面以及 Hugging Face 函式庫與工具生態系統中,存取廣泛模型的極速無伺服器推理。
支援的模型
Fireworks.ai 在 Hugging Face Hub 上提供眾多模型的無伺服器推理,包括:
- DeepSeek-R1 (
deepseek-ai/DeepSeek-R1) - DeepSeek-V3 (
deepseek-ai/DeepSeek-V3) - Mistral-Small-24B-Instruct-2501 (
mistralai/Mistral-Small-24B-Instruct-2501) - Qwen2.5-Coder-32B-Instruct (
Qwen/Qwen2.5-Coder-32B-Instruct) - Llama-3.2-90B-Vision-Instruct (
meta-llama/Llama-3.2-90B-Vision-Instruct)
實作與存取方法
使用者可透過三種主要介面存取 Fireworks.ai 的推理功能:
網站使用者介面
使用者可以直接在 Hugging Face 網站 UI 中搜尋並執行 Fireworks.ai 支援的所有模型的推理。
用戶端 SDK
Fireworks.ai 可透過以下 SDK 整合到應用程式中:
- Python (
huggingface_hub): 透過從原始碼安裝該庫並將provider="fireworks-ai"參數定義在InferenceClient中,使用者可將請求路由至 Fireworks.ai。驗證可透過 Hugging Face 權杖或 Fireworks.ai API 金鑰進行。 - JavaScript (
@huggingface/inference): 使用者可在chatCompletion方法中指定provider: "fireworks-ai"參數以使用該提供者。
HTTP 呼叫
可透過 cURL 向 Hugging Face 路由端點 (https://router.huggingface.co/fireworks-ai/v1/chat/completions) 發送直接的 HTTP 請求,指定模型與驗證 Bearer 權杖。
計費與積分
Fireworks.ai 推理的計費根據所使用的驗證方式進行:
- Direct Requests: 使用 Fireworks.ai API 金鑰時,使用者將直接透過其 Fireworks 帳戶被計費。
- Routed Requests: 透過 Hugging Face Hub 進行驗證時,使用者需支付標準的 Fireworks API 費用,且無 Hugging Face 的額外加成。
此外,Hugging Face PRO 使用者每月可獲得價值 2 美元的推理積分,可適用於不同的提供者。