Featherless AI Integration with Hugging Face Inference Providers

Hugging Face has integrated Featherless AI as a supported Inference Provider on the Hugging Face Hub. This integration allows users to access a wide variety of open-source text and conversational models via serverless inference directly from model pages and through client SDKs.

Featherless AI Capabilities

Featherless AI is a serverless inference provider that utilizes unique model loading and GPU orchestration to offer an exceptionally large catalog of models. It aims to bridge the gap between low-cost access to limited model sets and the high cost of managing private servers for unlimited model ranges, providing a broad variety of models with serverless pricing.

Supported models include the latest open-source releases from providers such as DeepSeek, Meta, Google, and Qwen.

Integration and Usage Workflow

Users can interact with Featherless AI through the Hugging Face website UI or via official client SDKs.

Website UI Configuration

In the user account settings, users can:

  • Manage API Keys: Set custom API keys for specific providers. If no custom key is provided, requests are routed through Hugging Face.
  • Set Provider Preference: Order providers by preference to determine how they appear in model page widgets and code snippets.

Client SDK Implementation

Featherless AI is integrated into both Python and JavaScript SDKs. To use Featherless AI as a provider, the provider parameter must be set to "featherless-ai".

Python Example (huggingface_hub v0.33.0+):

import os
from huggingface_hub import InferenceClient

client = InferenceClient(
    provider="featherless-ai",
    api_key=os.environ["HF_TOKEN"]
)

messages = [
    {
        "role": "user",
        "content": "What is the capital of France?"
    }
]

completion = client.chat.completions.create(
    model="deepseek-ai/DeepSeek-R1-0528", 
    messages=messages,
)

print(completion.choices[0].message)

JavaScript Example (@huggingface/inference):

import { InferenceClient } from "@huggingface/inference";

const client = new InferenceClient(process.env.HF_TOKEN);

const chatCompletion = await client.chatCompletion({
    model: "deepseek-ai/DeepSeek-R1-0528",
    messages: [
        {
            role: "user",
            content: "What is the capital of France?"
        }
    ],
    provider: "featherless-ai",
});

console.log(chatCompletion.choices[0].message);

Request Routing and Billing

There are two distinct modes for calling Inference Providers on the Hugging Face Hub:

  1. Custom Key (Direct Calls): Requests go directly to the inference provider using the user's own API key. In this case, the user is billed directly by the provider (e.g., Featherless AI).
  2. Routed by HF (Routed Requests): Requests are authenticated via the Hugging Face Hub. Charges are applied to the Hugging Face account, and Hugging Face passes through the provider costs at standard API rates without additional markup.

Subscription Benefits

  • PRO Users: Receive $2 worth of Inference credits monthly, which can be used across various providers.
  • Free Users: Have access to free inference with a small quota.

Sources