cerebras
БесплатноБез исполняемых скриптовНе проверенCerebras Inference is a hosted LLM API that runs open models on Cerebras wafer-scale chips at thousands of tokens per second, through an OpenAI-compatible…
от TerminalSkills★ 221 звезда на GitHubОб этом скилле
Cerebras — Wafer-Scale LLM Inference
Overview
Cerebras Inference serves open-weight models from its own hardware and exposes them at https://api.cerebras.ai/v1, compatible with the OpenAI chat-completions API. It is chosen for speed: time to first token and output rate are far above typical GPU hosting, which matters for interactive chat, autocomplete and multi-step agents.
The model catalog changes quickly and old IDs are removed. At the time of checking (October 2026) the Shared Inference models were:
| Model ID | Notes |
|---|---|
gpt-oss-120b |
about 3,000 tokens/s; context 65k on the free tier, 131k paid; reasoning efforts low/medium/high (default medium) |
qwen-3.8-27b |
about 1,850 tokens/s; context 64k free, 128k paid; reasoning effort none/low/medium/high (default high) |
Other models (for example gemma-4-31b) are Dedicated Inference only. Retired IDs include llama3.1-8b, llama-3.3-70b (the old skill text used llama3.3-70b), qwen-3-32b, qwen-3-235b-a22b-instruct-2507, zai-glm-4.7 and the Llama 4 models; the docs recommend gpt-oss-120b as the replacement for most of them. Always check https://inference-docs.cerebras.ai/models/overview and the deprecations page before hard-coding an ID, or list models at runtime with client.models.list().
Instructions
Install and authenticate
pip install --upgrade cerebras_cloud_sdk # Python
npm install @cerebras/cerebras_cloud_sdk # Node.js
export CEREBRAS_API_KEY="csk-..." # key from cloud.cerebras.ai; keep it out of source control
The official SDKs read CEREBRAS_API_KEY automatically. Any OpenAI SDK also works by setting base_url="https://api.cerebras.ai/v1".
Chat and streaming (Python SDK)
from cerebras.cloud.sdk import Cerebras
client = Cerebras() # uses CEREBRAS_API_KEY
response = client.chat.completions.create(
model="gpt-oss-120b",
messages=[
{"role": "system", "content": "You are a concise coding assistant."},
{"role": "user", "content": "Write a Python function that merges overlapping intervals."},
],
max_completion_tokens=800,
temperature=0.3,
)
print(response.choices[0].message.content)
print(response.time_info.completion_time, response.usage.completion_tokens) # seconds, tokens
stream = client.chat.completions.create(
model="gpt-oss-120b",
messages=[{"role": "user", "content": "Explain B-trees in five sentences."}],
stream=True,
)
for chunk in stream:
print(chunk.choices[0].delta.content or "", end="", flush=True)
Usage and time_info (queue_time, prompt_time, completion_time, total_time) arrive in the final streamed chunk. Output speed is completion_tokens / completion_time. AsyncCerebras is the async client; the SDK retries connection errors, timeouts and 429s twice by default (max_retries changes it).
Chat with the OpenAI SDK (TypeScript)
import OpenAI from "openai";
const cerebras = new OpenAI({
apiKey: process.env.CEREBRAS_API_KEY!,
baseURL: "https://api.cerebras.ai/v1",
});
const stream = await cerebras.chat.completions.create({
model: "qwen-3.8-27b",
messages: [{ role: "user", content: "Suggest three names for a log-search CLI." }],
stream: true,
});
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? "");
Structured output
Prefer strict JSON schema (constrained decoding) over plain JSON mode:
ticket_schema = {
"type": "object",
"properties": {
"category": {"type": "string", "enum": ["billing", "bug", "feature"]},
"urgency": {"type": "integer"},
},
"required": ["category", "urgency"],
"additionalProperties": False,
}
response = client.chat.completions.create(
model="gpt-oss-120b",
messages=[{"role": "user", "content": "Customer was charged twice for the March invoice, please fix today."}],
response_format={"type": "json_schema", "json_schema": {"name": "ticket", "strict": True, "schema": ticket_schema}},
)
Schema limits: root must be an object, additionalProperties: false on every object, at most 5,000 characters and 10 nesting levels, arrays need items. {"type": "json_object"} only guarantees valid JSON and cannot be combined with streaming.
Tool calling
Supported by both shared models, with tool_choice of none, auto, required or a named function, optional "strict": true on a function, and parallel_tool_calls=True.
tools = [{
"type": "function",
"function": {
"name": "get_order_status",
"description": "Look up the shipping status of an order",
"strict": True,
"parameters": {
"type": "object",
"properties": {"order_id": {"type": "string"}},
"required": ["order_id"],
"additionalProperties": False,
},
},
}]
messages = [{"role": "user", "content": "Where is order ORD-48213?"}]
msg = clien
Установить cerebras в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл cerebras?
Cerebras Inference is a hosted LLM API that runs open models on Cerebras wafer-scale chips at thousands of tokens per second, through an OpenAI-compatible endpoint. Use when a user wants the lowest-latency chat, code completion or agent loop, asks how to call the Cerebras API or SDK, needs streaming, tool calling, strict JSON schema output or reasoning control, or hits a "model not found" error from a retired Cerebras model ID.
Как установить скилл cerebras?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл cerebras запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic