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 Agent2from kern.models.nvidia import Nvidia34agent = Agent(model=Nvidia(), markdown=True)56# Print the response in the terminal7agent.print_response("Share a 2 sentence horror story")Note View more examples here.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
id | str | "nvidia/llama-3.1-nemotron-70b-instruct" | The id of the NVIDIA model to use |
name | str | "NVIDIA" | The name of the model |
provider | str | "NVIDIA" | The provider of the model |
api_key | Optional[str] | None | The API key for NVIDIA (defaults to NVIDIA_API_KEY env var) |
base_url | str | "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.