推理提供商文件
Cerebras
加入 Hugging Face 社群
並獲得增強的文件體驗
開始使用
Cerebras
所有受支援的Cerebras模型都可以在這裡找到
Cerebras作為全球最快的AI推理和訓練平臺獨樹一幟。醫療研究、密碼學、能源和智慧AI等領域的組織使用我們的CS-2和CS-3系統來構建本地超級計算機,而世界各地的開發人員和企業可以透過我們的按需付費雲服務訪問Cerebras的強大功能。
支援的任務
聊天補全 (LLM)
瞭解更多關於聊天補全 (LLM) 的資訊,請點選這裡。
語言
客戶端
提供商
import os
from huggingface_hub import InferenceClient
client = InferenceClient(
provider="cerebras",
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="cerebras",
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)