推理提供商文件
Groq
加入 Hugging Face 社群
並獲得增強的文件體驗
開始使用
Groq
所有支援的 Groq 模型都可以在此處找到。
Groq 提供了快速的 AI 推理。他們開創性的 LPU 技術為 GenAI 模型帶來了創紀錄的效能和效率。憑藉專為 AI 推理工作負載設計的定製晶片和確定性的軟體優先方法,Groq 消除了傳統硬體的瓶頸,實現了具有可預測延遲和卓越吞吐量的即時 AI 應用,從而使開發人員能夠快速構建。
有關最新定價,請訪問我們的定價頁面。
資源
- 網站:https://groq.com/
- 文件:https://console.groq.com/docs
- 社群論壇:https://community.groq.com/
- X:@GroqInc
- LinkedIn:Groq
- YouTube:Groq
支援的任務
聊天補全 (LLM)
瞭解更多關於聊天補全 (LLM) 的資訊,請點選這裡。
語言
客戶端
提供商
import os
from huggingface_hub import InferenceClient
client = InferenceClient(
provider="groq",
api_key=os.environ["HF_TOKEN"],
)
completion = client.chat.completions.create(
model="openai/gpt-oss-120b",
messages=[
{
"role": "user",
"content": "What is the capital of France?"
}
],
)
print(completion.choices[0].message)
聊天補全 (VLM)
瞭解更多關於聊天補全 (VLM) 的資訊,請點選這裡。
語言
客戶端
提供商
import os
from huggingface_hub import InferenceClient
client = InferenceClient(
provider="groq",
api_key=os.environ["HF_TOKEN"],
)
completion = client.chat.completions.create(
model="meta-llama/Llama-4-Scout-17B-16E-Instruct",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Describe this image in one sentence."
},
{
"type": "image_url",
"image_url": {
"url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg"
}
}
]
}
],
)
print(completion.choices[0].message)