推理提供商文件

SambaNova

Hugging Face's logo
加入 Hugging Face 社群

並獲得增強的文件體驗

開始使用

SambaNova

所有支援的 SambaNova 模型可在此處找到

SambaNova 的 AI 平臺是未來十年 AI 創新的技術支柱。客戶正在轉向 SambaNova,以快速部署最先進的 AI 和深度學習功能,幫助他們在競爭中脫穎而出。

支援的任務

聊天補全 (LLM)

瞭解更多關於聊天補全 (LLM) 的資訊,請點選這裡

import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="sambanova",
    api_key=os.environ["HF_TOKEN"],
)

completion = client.chat.completions.create(
    model="meta-llama/Llama-3.1-8B-Instruct",
    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="sambanova",
    api_key=os.environ["HF_TOKEN"],
)

completion = client.chat.completions.create(
    model="meta-llama/Llama-4-Maverick-17B-128E-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)

特徵提取

瞭解更多關於特徵提取的資訊,請點選這裡

import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="sambanova",
    api_key=os.environ["HF_TOKEN"],
)

result = client.feature_extraction(
    "Today is a sunny day and I will get some ice cream.",
    model="intfloat/e5-mistral-7b-instruct",
)
< > 在 GitHub 上更新

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