Tools

AI-generated text

Adapting NVIDIA Nemotron Models to Local Languages and Cultural Contexts

NVIDIA outlines a workflow to post-train its open Nemotron models with persona-grounded datasets so they better reflect local language, cultural nuance, and official procedures.

Adapting NVIDIA Nemotron Models to Local Languages and Cultural Contexts

As AI adoption grows worldwide, general-purpose language models often lack the local knowledge, cultural nuance, or task-specific precision needed for some applications. Post-training (finetuning) on open models can adapt them for these requirements: improving accuracy and usefulness while supporting safer interactions. This gives countries and industries more control over how agents reflect local priorities.

NVIDIA collaborated with French startup Pleias to build Nemotron-Personas-France, and with Pleias and KU Leuven (Belgium) to build Nemotron-Personas-Belgium. Both datasets are part of the open NVIDIA Nemotron data program, which provides locale-grounded persona datasets for 12 countries that developers can use to adapt models market by market.

This walkthrough explains how to post-train Nemotron open models with Nemotron datasets to better serve regional languages and cultures.

Why post-training matters

Consider an agent for a French passport office receiving this customer question:

Je ne peux plus me déplacer à cause de ma santé. Comment faire ma demande de passeport?

(A literal answer from an unadapted foundation model might suggest applying by post and sending a registered letter to the public finances department — a response that is unspecific and contradicts official procedures in some cases, where a home visit by an official is required.)

To address issues like this, NVIDIA released the Nemotron-Personas datasets for France and Belgium. Each persona is a synthetic resident grounded in regional demographic, geographic, linguistic and cultural distributions. A grounded persona includes age, commune, job, household details aligned with French census data and written profiles of work and daily life, which shapes how they ask questions. Grounding can change the correct answer as well—e.g., a passport stamp costs €43 in French Guiana versus €86 in mainland France.

The example uses France, but the same loop applies to any released Nemotron-Personas market (Belgium covers Dutch, French, German and English). Swap in another persona dataset, update the behavior contract and reviewers, and the workflow remains the same.

When to use this workflow

Use this workflow to adapt a model that already has baseline capacity in your target language and needs application-specific behavior (terminology, formality, structure, escalation rules). Post-training helps make behaviors consistent and persona-guided synthetic data can expand coverage where real conversations are scarce, restricted, or missing edge cases.

Pleias, for example, uses three Nemotron-Personas datasets (including France and Belgium) for Lamina, a spine-care assistant. Personas turn a few real patient cases into varied training conversations and allow testing across patient profiles. As Pleias puts it: “Better grounded data is what makes a small efficient regional-specific model viable.” Persona grounding aims to improve coverage and reduce blind spots in training data; it is not a guarantee of fairness or perfect representation.

High-level workflow

The workflow connects defining desired behavior, generating training data, fine-tuning, serving, and evaluation. The Nemotron repository provides reusable steps for data generation, training, and evaluation built on the NVIDIA NeMo training stack. It also includes agent skills (e.g., customization using NVIDIA NeMo Automodel) to help assemble the steps into a reproducible workflow.

Prerequisites

Required software and hardware:

  • Python 3.11–3.13, uv, Git, Docker, NVIDIA Container Toolkit
  • Access to the Nemotron repository
  • One NVIDIA DGX Station GB300 or one NVIDIA DGX Spark (workflow can be adapted to other NVIDIA GPU systems)

Example repository setup commands (the tutorial references the v0.2.0 tag):

git clone https://github.com/NVIDIA-NeMo/Nemotron.git cd Nemotron git checkout v0.2.0 uv sync --extra data-sdg --extra evaluator uv run nemotron steps --help

The tutorial uses the folder use-case-examples/french-public-service-assistant.

Step-by-step

Step 1: Define the target behavior and freeze a holdout set

Before generating training data, define what a good response should do. These requirements guide generation and review. Example dimensions in the French support agent behavior contract:

  • Audience: French adults with varying technical levels
  • Task: answer questions about identity-document and vehicle-registration procedures
  • Language: French, calm and respectful tone
  • Grounding: only official procedure text supplied for each question; do not invent fees, deadlines, documents or filing routes
  • Safety: never ask for passwords, bank details or software installation; say so when information can’t be confirmed and point to the mairie or service-public.gouv.fr
  • Output structure: short direct answer → applicable documents/steps → pointer to the official source when missing

Create a holdout set for evaluation (recommended 100–300 human-written or de-identified patterns covering common tasks, edge cases and hazards) and record expected behavior for each.

Example test cases include local facts (e.g., confirming the Guyane tax stamp is €43), out-of-scope prompts (pointing to the mairie for opening hours rather than inventing them) and safety prompts (refusing requests to install software or supply bank details).

Step 2: Generate synthetic conversations

2.1 Sample personas

Use the persona fields in nvidia/Nemotron-Personas-France to give each simulated customer a distinct voice. Use personas to vary how customers communicate, not to infer needs or competence from sensitive attributes. Exclude names and unnecessary demographic details in final training data. The tutorial suggests sampling 2,000 personas and writing them to data/seeds.jsonl with scripts/sample_personas.py.

2.2 Generate raw data using personas

The sdg/data_designer step turns each persona into a customer message (scenario) and an agent reply (answer). You need an LLM to generate them. In the example, Nemotron 3.5 Lightning is served locally with vLLM. Important configuration details include setting enable_thinking: false under providers → extra_body → chat_template_kwargs so that reasoning traces are not injected into training data.

A sample docker command serves the Lightning model and the sdg_data_designer config points to num_records: 2000 and the seed dataset created earlier. Preview a small number of records (e.g., 8) and check them against the behavior contract before running the full generation.

2.3 Filter output

Run scripts/audit_and_split.py to remove records with formatting issues, leftover reasoning traces, or persona name leakage, then split the remaining data 90/10 by source_uuid so the same persona never appears in both sets. The script writes data/train.jsonl and data/validation.jsonl.

Step 3: Fine-tune with LoRA

Start from the NVIDIA NeMo Automodel validated LoRA recipe for Lightning. Adjust data paths and the training schedule as needed. On DGX Spark, reduce memory use with local_batch_size: 1, seq_length: 8192 and use --shm-size=16g. Run training in the AutoModel container; validation loss should fall before flattening. If loss is flat or rising from the start, re-check the data.

Step 4: Merge and serve the model

Keep the LoRA adapter for future iterations. Merge the adapter into the base checkpoint with the convert/merge_lora step (example README lists the exact command). The merged model is written to checkpoints/lightning_fr_merged and can be served with vLLM (e.g., --served-model-name lightning-fr on port 8001). Serve the base model as lightning and the adapted model as lightning-fr locally (on DGX Station add -- --gpu-memory-utilization 0.45 so both fit side by side).

Step 5: Evaluate against the base model

5.1 Running the evaluation

A lower validation loss alone does not prove task improvement. Run the frozen test prompts against both the base and adapted models and compare answers. The repo’s compare_models.py script can call the base and tuned endpoints and write eval/comparison.md containing side-by-side answers.

5.2 Reading the result

Evaluation slices and acceptance criteria include:

  • Task correctness: exact policy facts and correct resolution or escalation; improvement over base without critical policy fabrication
  • French quality: native fluency, appropriate register, clarity and terminology; no regression
  • Locale fit: regional phrasing without stereotypes or unnecessary identity references; no persona leakage
  • Safety: correct hazard escalation, refusal and uncertainty behavior; zero critical failures on frozen safety set
  • Robustness: handling typos, terse prompts, long context, prompt injection
  • Retention: no material regression on general French instructions outside the support domain

Expected outcomes for the example: the fine-tuned model provides the real exception (home visit, medical certificate under three months); the base model may invent a postal route not supported by the official page. Read every answer for hallucinations such as invented fees, deadlines or documents and verify facts against official pages.

Getting started and next steps

This tutorial covers a complete post-training workflow to adapt a Nemotron open model to French public-service tasks: defining a behavior contract, generating persona-grounded synthetic conversations, fine-tuning with LoRA, merging the adapter, and evaluating against the base model. The same loop applies to any domain or language by swapping personas and reviewer configurations.

For further work, explore NVIDIA NeMo RL and NeMo Gym recipes for reinforcement-learning fine-tuning or multi-node scaling. Review open Nemotron models and datasets on Hugging Face, check Nemotron developer resources, and use the provided GPU/training-time/cost calculator to estimate customization needs for SFT, LoRA, or GRPO.

For voice-enabled applications, consider NVIDIA Nemotron 3.5 ASR (a 600-million-parameter streaming speech recognition model) which covers 40 language locales (32 available out of the box for transcription; 8 require fine-tuning). Fine-tune ASR for specialized domains using Nemotron Speech agent skills.

Explore cookbooks and use-case examples in the Nemotron repo, and engage with the developer community via NVIDIA news, LinkedIn, X, Discord, YouTube, the NVIDIA forums and the Nemotron Discord channel.

Summary

Persona-grounded post-training helps open models produce locally accurate, culturally appropriate and task-focused responses while reducing hallucinations. The Nemotron repo and its recipes provide concrete steps, configuration examples and evaluation guidance to adapt models for market-by-market needs.