Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/inference/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions packages/inference/src/lib/getProviderHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -147,6 +148,9 @@ export const PROVIDERS: Record<InferenceProvider, Partial<Record<InferenceTask,
"text-to-image": new Nscale.NscaleTextToImageTask(),
conversational: new Nscale.NscaleConversationalTask(),
},
nvidia: {
conversational: new Nvidia.NvidiaConversationalTask(),
},
openai: {
conversational: new OpenAI.OpenAIConversationalTask(),
},
Expand Down
1 change: 1 addition & 0 deletions packages/inference/src/providers/consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export const HARDCODED_MODEL_INFERENCE_MAPPING: Record<
nebius: {},
novita: {},
nscale: {},
nvidia: {},
openai: {},
publicai: {},
ovhcloud: {},
Expand Down
23 changes: 23 additions & 0 deletions packages/inference/src/providers/nvidia.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/**
* See the registered mapping of HF model ID => 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");
}
}
2 changes: 2 additions & 0 deletions packages/inference/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const INFERENCE_PROVIDERS = [
"nebius",
"novita",
"nscale",
"nvidia",
"openai",
"ovhcloud",
"publicai",
Expand Down Expand Up @@ -96,6 +97,7 @@ export const PROVIDERS_HUB_ORGS: Record<InferenceProvider, string> = {
nebius: "nebius",
novita: "novita",
nscale: "nscale",
nvidia: "nvidia",
openai: "openai",
ovhcloud: "ovhcloud",
publicai: "publicai",
Expand Down