Nvidia

Use NVIDIA NeMo models with Kern agents.

NVIDIA offers a suite of high-performance language models optimized for advanced NLP tasks. These models are part of the NeMo framework, which provides tools for training, fine-tuning and deploying state-of-the-art models efficiently. NVIDIA’s language models are designed to handle large-scale workloads with GPU acceleration for faster inference and training. We recommend experimenting with NVIDIA’s models to find the best fit for your application.

Explore NVIDIA’s models here.

Authentication

Set your NVIDIA_API_KEY environment variable. Get your key from Nvidia here.

1export NVIDIA_API_KEY=***
1setx NVIDIA_API_KEY ***

Example

Use Nvidia with your Agent:

1from kern.agent import Agent
2from kern.models.nvidia import Nvidia
3
4agent = Agent(model=Nvidia(), markdown=True)
5
6# Print the response in the terminal
7agent.print_response("Share a 2 sentence horror story")
Note View more examples here.

Parameters

ParameterTypeDefaultDescription
idstr"nvidia/llama-3.1-nemotron-70b-instruct"The id of the NVIDIA model to use
namestr"NVIDIA"The name of the model
providerstr"NVIDIA"The provider of the model
api_keyOptional[str]NoneThe API key for NVIDIA (defaults to NVIDIA_API_KEY env var)
base_urlstr"https://integrate.api.nvidia.com/v1"The base URL for the NVIDIA API

NVIDIA extends the OpenAI-compatible interface and supports most parameters from the OpenAI model.