推理提供商文档

Cerebras

Hugging Face's logo
加入 Hugging Face 社区

并获得增强的文档体验

开始使用

Cerebras

所有受支持的 Cerebras 模型均可在此处找到:此处

Cerebras 在全球最快的 AI 推理和训练平台方面独树一帜。医疗研究、密码学、能源和 Agentic AI 等领域的组织使用我们的 CS-2 和 CS-3 系统构建本地超级计算机,而全球各地的开发人员和企业可以通过我们按需付费的云产品访问 Cerebras 的强大功能。

支持的任务

聊天补全 (LLM)

了解更多关于聊天补全 (LLM) 的信息,请点击这里

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://router.huggingface.co/v1",
    api_key=os.environ["HF_TOKEN"],
)

completion = client.chat.completions.create(
    model="zai-org/GLM-4.7:cerebras",
    messages=[
        {
            "role": "user",
            "content": "What is the capital of France?"
        }
    ],
)

print(completion.choices[0].message)
在 GitHub 上更新

© . This site is unofficial and not affiliated with Hugging Face, Inc.