We're thrilled to share that Cohere is now a supported Inference Provider on HF Hub! This also marks the first model creator to share and serve their models directly on the Hub.
According to recent reports, cohere is committed to building and serving models purpose-built for enterprise use-cases. Their comprehensive suite of secure AI solutions, from cutting-edge Generative AI to powerful Embeddings and Ranking models, are designed to tackle real-world business challenges. Additionally, Cohere Labs, Cohere’s in house research lab, supports fundamental research and seeks to change the spaces where research happens. (Related: Hakeem Jeffries and his team will seek to deliver a new...)
Starting now, you can run serverless inference to the following models via Cohere and Inference Providers:. (Related: Tech Report: We Got Claude to Build CUDA Kernels and te...)
Light up your projects with Cohere and Cohere Labs today!
Cohere and Cohere Labs bring a swathe of their models to Inference Providers that excel at specific business applications. Let’s explore some in detail.
Sources indicate that optimized for demanding enterprises that require fast, secure, and high-quality AI. Its 256k context length (2x most leading models) can handle much longer enterprise documents. Other key features include Cohere’s advanced retrieval-augmented generation (RAG) with verifiable citations, agentic tool use, enterprise-grade security, and strong multilingual performance (support for 23 languages).
It has been revealed that focuses on state-of-the-art multilingual support, applying the latest research on multilingual pre-training. Supports Arabic, Chinese (simplified & traditional), Czech, Dutch, English, French, German, Greek, Hebrew, Hindi, Indonesian, Italian, Japanese, Korean, Persian, Polish, Portuguese, Romanian, Russian, Spanish, Turkish, Ukrainian, and Vietnamese with 128K context length.
Industry observers note that ideal for low-cost or low-latency use cases, bringing state-of-the-art performance in its class of open-weight models across real-world tasks. This model offers a context length of 128k. It delivers a powerful combination of multilingual support, citation-verified retrieval-augmented generation (RAG), reasoning, tool use, and agentic behavior. Also supports 23 languages.
It has been revealed that 32-billion parameter model with advanced capabilities optimized for a variety of vision-language use cases, including OCR, captioning, visual reasoning, summarization, question answering, code, and more. It expands multimodal capabilities to 23 languages spoken by over half the world's population.
You can use Cohere models directly on the Hub either on the website UI or via the client SDKs.
You can find all the examples mentioned in this section on the Cohere documentation page.
You can search for Cohere models by filtering by the inference provider in the model hub.
From the Model Card, you can select the inference provider and run inference directly in the UI.
Let’s walk through using Cohere models from client SDKs. We’ve also made a colab notebook with these snippets, in case you want to try them out right away.
Sources indicate that the following example demonstrates how to use Command A using Cohere as your inference provider. You can use a Hugging Face token for automatic routing through Hugging Face, or your own cohere API key if you have one.
Install huggingface_hub v0.30.0 or later:.
Use the huggingface_hub python library to call Cohere endpoints by defining the provider parameter.
Industry observers note that aya Vision, Cohere Labs’ multilingual, multimodal model is also supported. You can include images encoded in base64 as follows:.
Here's how you can call Command R7B using Cohere as the inference provider via the OpenAI client library.
Cohere’s models bring state-of-the-art agentic tool use to Inference Providers so let’s explore that in detail. Both the Hugging Face Hub client and the OpenAI client are compatible with tools via inference providers, so the above examples can be expanded.
It has been revealed that first, we will need to define tools for the model to use. Below we define the get_flight_info which calls an API for the latest flight information using two locations. This tool definition will be represented by the model’s chat template. Which we can also explore in the model card (🎉 open source).
Recent findings suggest that next, we’ll need to pass messages to the inference client for the model to use the tools when relevant. In the example below we define the assistant’s tool call in tool_calls, for the sake of clarity.
Finally, the tools and messages are passed to the create method.
For direct requests, i.e. when you use a Cohere key, you are billed directly on your Cohere account.
It has been revealed that for routed requests, i.e. when you authenticate via the Hub, you'll only pay the standard Cohere API rates. There's no additional markup from us, we just pass through the provider costs directly. (In the future, we may establish revenue-sharing agreements with our provider partners.).
Industry observers note that vital Note ‼️ PRO users get $2 worth of Inference credits every month. You can use them across providers. 🔥.
Great announcement!Is there a way to opt in to share my data with the world when using the UI? Or get all my conversations with an API request (so others\we can build this opt in, in some hacky way)?
It has been revealed that @borgr hello! as of now there's no such option, but we'll consider this, you want this for data labelling right? ☺️ for now you can use the providers programmatically and store them yourself I think.
Labelling, studying what people lack, learning about human reactions to various LM behavior etc.