diff --git a/packages/inference/README.md b/packages/inference/README.md index 664c224583..9f04779534 100644 --- a/packages/inference/README.md +++ b/packages/inference/README.md @@ -55,6 +55,7 @@ Currently, we support the following providers: - [Nebius](https://studio.nebius.ai) - [Novita](https://novita.ai) - [Nscale](https://nscale.com) +- [NVIDIA](https://build.nvidia.com/) - [OVHcloud](https://endpoints.ai.cloud.ovh.net/) - [Public AI](https://publicai.co) - [Replicate](https://replicate.com) @@ -95,6 +96,7 @@ Only a subset of models are supported when requesting third-party providers. You - [Hyperbolic supported models](https://huggingface.co/api/partners/hyperbolic/models) - [Nebius supported models](https://huggingface.co/api/partners/nebius/models) - [Nscale supported models](https://huggingface.co/api/partners/nscale/models) +- [NVIDIA supported models](https://huggingface.co/api/partners/nvidia/models) - [OVHcloud supported models](https://huggingface.co/api/partners/ovhcloud/models) - [Replicate supported models](https://huggingface.co/api/partners/replicate/models) - [Sambanova supported models](https://huggingface.co/api/partners/sambanova/models) diff --git a/packages/inference/src/lib/getProviderHelper.ts b/packages/inference/src/lib/getProviderHelper.ts index 28e0eb2ad0..2f8653f419 100644 --- a/packages/inference/src/lib/getProviderHelper.ts +++ b/packages/inference/src/lib/getProviderHelper.ts @@ -12,6 +12,7 @@ import * as Hyperbolic from "../providers/hyperbolic.js"; import * as Nebius from "../providers/nebius.js"; import * as Novita from "../providers/novita.js"; import * as Nscale from "../providers/nscale.js"; +import * as Nvidia from "../providers/nvidia.js"; import * as OpenAI from "../providers/openai.js"; import * as OvhCloud from "../providers/ovhcloud.js"; import * as PublicAI from "../providers/publicai.js"; @@ -147,6 +148,9 @@ export const PROVIDERS: Record NVIDIA model ID here: + * + * https://huggingface.co/api/partners/nvidia/models + * + * This is a publicly available mapping. + * + * If you want to try to run inference for a new model locally before it's registered on huggingface.co, + * you can add it to the dictionary "HARDCODED_MODEL_ID_MAPPING" in consts.ts, for dev purposes. + * + * - If you work at NVIDIA and want to update this mapping, please use the model mapping API we provide on huggingface.co + * - If you're a community member and want to add a new supported HF model to NVIDIA, please open an issue on the present repo + * and we will tag NVIDIA team members. + * + * Thanks! + */ +import { BaseConversationalTask } from "./providerHelper.js"; + +export class NvidiaConversationalTask extends BaseConversationalTask { + constructor() { + super("nvidia", "https://integrate.api.nvidia.com"); + } +} diff --git a/packages/inference/src/types.ts b/packages/inference/src/types.ts index 1d41ce8c96..cba3a364e1 100644 --- a/packages/inference/src/types.ts +++ b/packages/inference/src/types.ts @@ -59,6 +59,7 @@ export const INFERENCE_PROVIDERS = [ "nebius", "novita", "nscale", + "nvidia", "openai", "ovhcloud", "publicai", @@ -96,6 +97,7 @@ export const PROVIDERS_HUB_ORGS: Record = { nebius: "nebius", novita: "novita", nscale: "nscale", + nvidia: "nvidia", openai: "openai", ovhcloud: "ovhcloud", publicai: "publicai",