pypi huggingface-hub 0.34.6
[v0.34.6]: Welcoming PublicAI as Inference Providers!

latest releases: 0.35.0, 0.35.0rc1
16 hours ago

Full Changelog: v0.34.5...v0.34.6

⚡ New provider: PublicAI

Tip

All supported PublicAI models can be found here.

Public AI Inference Utility is a nonprofit, open-source project building products and organizing advocacy to support the work of public AI model builders like the Swiss AI Initiative, AI Singapore, AI Sweden, and the Barcelona Supercomputing Center. Think of a BBC for AI, a public utility for AI, or public libraries for AI.

from huggingface_hub import InferenceClient

client = InferenceClient(provider="publicai")
completion = client.chat.completions.create(
    model="swiss-ai/Apertus-70B-Instruct-2509",
    messages=[{"role": "user", "content": "What is the capital of Switzerland?"}],
)

print(completion.choices[0].message.content)

Don't miss a new huggingface-hub release

NewReleases is sending notifications on new releases.