AI Tips

Practical ways to train, run, or shrink AI models — explained for people new to AI. 5 new in last 30d.

New here? Each card answers one question: what is this and why should I care? Click a card to read the full explanation, including any new words. The command at the bottom is what you would type to try it on your own machine.

The AI flow — where each tip fits

Read left to right

An AI model goes through these five phases. Click a phase to see the tips that apply there.

  1. 1Pre-training

    A model first learns language by reading huge amounts of text. This costs millions of dollars and runs on thousands of GPUs.

  2. 2Fine-tuning

    You take that pre-trained model and teach it your own data, your own task, or your own writing style. Hours to days, on a few GPUs.

    e.g. QLoRA · Unsloth · DeepSpeed ZeRO-3 / FSDP

    See Training tips →
  3. 3Preference tuning

    After fine-tuning, you teach the model which answers humans prefer. This makes it polite, helpful, and on-topic.

    e.g. DPO / GRPO / KTO

    See Training tips →
  4. 4Quantization

    The trained model is huge. Quantization shrinks it about 4× by storing its numbers with less precision, so it fits on cheap hardware.

    e.g. GGUF + llama.cpp · AWQ / GPTQ · EXL2

    See Quantization tips →
  5. 5Inference / serving

    Running the model so users can ask it questions. This is what your app actually does in production.

    e.g. vLLM (PagedAttention) · Ollama · Speculative decoding

    See Inference tips →
DPO / GRPO / KTO — teach a model what good looks like

Modern ways to use human feedback to make a model prefer good answers over bad ones. Simpler than the old RLHF setup.

Training1× A100 80GB or QLoRA on 24GB

Classic RLHF (the method behind ChatGPT) trains a separate reward model first, then runs reinforcement learning. It works but it is complicated. DPO (Direct Preference Optimization) skips the reward model — you just give it pairs of (good answer, bad answer) and it directly adjusts the model. GRPO scales this to math and reasoning where you can verify correctness automatically (DeepSeek used it for their math model). KTO needs only single labels (was this answer good? yes/no), so you can use cheap data like in-app thumbs-up/down. All three are in the trl library.

Try it

pip install trl && python -m trl.scripts.dpo --model meta-llama/Llama-3.1-8B --dataset HuggingFaceH4/ultrafeedback_binarized
Source
Unsloth — 2× faster LoRA fine-tuning, half the VRAM

A drop-in library that makes fine-tuning twice as fast and uses half the GPU memory. Same result, less waiting.

TrainingRTX 3090 / 4090 24GB

Hugging Face's PEFT library is fine, but it is written in pure PyTorch which leaves performance on the table. Unsloth rewrites the LoRA forward and backward passes in Triton (NVIDIA's fast-kernel language). Result: the same loss curves, about 2× faster, about 50% less VRAM. Drop-in with Llama, Mistral, Phi, Gemma, Qwen — change a couple of import lines and it works. Their notebooks are a good starting point if you have never fine-tuned.

Try it

pip install unsloth && python -m unsloth.examples.llama3_8b_finetune
Source
DeepSpeed ZeRO-3 / PyTorch FSDP — train models too big for one GPU

Splits a giant model across many GPUs during training. The way teams fine-tune 70B+ models on 8 cards.

Training8× A100 80GB or H100s

When you train a model, you also need memory for gradients, optimizer state, and activations — together about 4× the model itself. ZeRO is a method that shards (splits) those across all your GPUs so each card only stores a slice. ZeRO-3 also shards the model parameters themselves. Combined with mixed-precision (bf16) training and activation checkpointing, this lets a normal 8× A100 box train a 70B model. PyTorch FSDP is the in-tree alternative with the same idea.

Try it

deepspeed --num_gpus 8 train.py --deepspeed ds_config_zero3.json
Source
QLoRA — fine-tune a 70B model on one consumer GPU

Teach a giant model new skills using only 24 GB of GPU memory, instead of the 320 GB you would normally need.

TrainingRTX 3090 / 4090 24GB

Fine-tuning means starting from an already-trained model and teaching it your own data. A 70B-parameter model normally needs about 320 GB of GPU memory (VRAM) to fine-tune — that costs thousands per hour in the cloud. QLoRA does two clever things: it stores the original model in 4-bit numbers (about 4× smaller), and it only trains a tiny add-on called a LoRA adapter, not the whole model. The full setup fits on a single 24 GB gaming card with no real loss in quality. Result: home-lab fine-tuning is suddenly possible.

Try it

pip install bitsandbytes peft transformers && python -m peft.examples.qlora --model meta-llama/Llama-3.1-70B --bits 4
Source
Fine-tune video and image models at scale with NVIDIA NeMo AutomodelNewAuto

NVIDIA NeMo Automodel and Hugging Face Diffusers enable efficient fine-tuning of video and image models

TrainingRTX 3090 24GB

NVIDIA NeMo Automodel and Hugging Face Diffusers provide a way to fine-tune video and image models at scale, leveraging the power of NVIDIA GPUs. This can lead to significant improvements in model performance and accuracy, especially for complex tasks like video analysis and image recognition.

Try it

python finetune_nemo_automodel.py --model_name nemo_automodel --input_data /path/to/data
Source
Fine-tune video and image models at scale with NVIDIA NeMo AutomodelNewAuto

NVIDIA NeMo Automodel and Hugging Face Diffusers can be used to fine-tune video and image models at scale

TrainingRTX 3090 24GB

NVIDIA NeMo Automodel and Hugging Face Diffusers enable efficient fine-tuning of video and image models at scale. This can help improve model performance and reduce training time.

Try it

python finetune_nemo_automodel.py
Source
Fine-tune video and image models at scale with NVIDIA NeMo Automodel and 🤗 DiffusersNewAuto

Utilize NVIDIA NeMo Automodel and Hugging Face Diffusers for efficient large-scale fine-tuning of video and image models.

TrainingRTX 3090 24GB

This approach allows for the fine-tuning of models at scale, leveraging the capabilities of NVIDIA NeMo Automodel and Hugging Face Diffusers, which can significantly speed up the process and improve model performance.

Try it

python finetune.py --model automodel --data data_dir
Source
Fine-tune video and image models at scale with NVIDIA NeMo AutomodelNewAuto

NVIDIA NeMo Automodel and Hugging Face Diffusers enable efficient fine-tuning of models

TrainingRTX 3090 24GB

NVIDIA NeMo Automodel and Hugging Face Diffusers allow for efficient fine-tuning of video and image models at scale. This integration enables leveraging the strengths of both frameworks to optimize training workflows.

Try it

python finetune.py --model nemo_automodel --dataset my_dataset
Source
Accelerate Cryptography with CUDA 13.3NewAuto

NVIDIA CUDA 13.3 introduces carryless multiplication for faster cryptography.

TrainingNVIDIA GPUs

NVIDIA CUDA 13.3 includes a new carryless multiplication instruction, which can be used to accelerate cryptographic algorithms. This feature has been available in x86 CPUs for over fifteen years and can now be utilized in NVIDIA GPUs for improved performance.

Try it

nvcc -arch=sm_80 -lcudart your_cuda_code.cu
Source
Post-train NVIDIA Cosmos 3 models using agent skillsAuto

Achieve over 90% accuracy in vision reasoning models with minimal manual effort

TrainingRTX 3090 24GB

The NVIDIA Cosmos 3 model can be post-trained to achieve over 90% accuracy in vision reasoning tasks with the help of autonomous coding AI agents, significantly reducing the manual effort required. This approach can streamline the development of high-accuracy vision reasoning models.

Try it

# Example: Post-training NVIDIA Cosmos 3 model with agent skills
# This is a placeholder for the actual command that would be used to post-train the model
# using autonomous coding AI agents
Source
Improve AI reasoning accuracy using techniques from KagglersAuto

Learn from the NVIDIA Nemotron Model Reasoning Challenge to enhance AI reasoning accuracy

TrainingRTX 3090 24GB

The NVIDIA Nemotron Model Reasoning Challenge engaged the Kaggle community to explore techniques that can improve reasoning accuracy. By analyzing the leaderboard and solutions from over 5,000 participants, developers can gain insights into innovative methods to enhance AI reasoning capabilities.

Try it

# Example: Implementing a technique from Kagglers
# This is a placeholder for the actual command that would be used to implement the technique
# specific to the challenge
Source
Post-Train NVIDIA Cosmos 3 in One Day Using Agent SkillsAuto

Achieve over 90% accuracy in vision reasoning models with minimal manual effort.

TrainingRTX 3090 24GB

NVIDIA Cosmos 3 can be post-trained in one day using autonomous coding AI agents, which can push vision reasoning models above 90% accuracy with almost no manual effort. This approach can significantly reduce the time and resources required to fine-tune and optimize AI models.

Try it

# Example command to post-train NVIDIA Cosmos 3 using agent skills
python post_train_cosmos3.py --agent_skills
Source
Improve AI Reasoning Accuracy with Kagglers' TechniquesAuto

Learn from Kagglers' techniques to improve reasoning accuracy in AI models.

TrainingRTX 3090 24GB

The NVIDIA Nemotron Model Reasoning Challenge invited the Kaggle community to explore techniques that can improve reasoning accuracy when adapting vision reasoning models. By learning from the top Kagglers, you can potentially push your AI models' accuracy above 90% with minimal manual effort.

Try it

# Example command to train a model using Kagglers' techniques
python train_model.py --kagglers_techniques
Source
Reduce memory bottlenecks in JAX-based LLM training with host offloadingAuto

Technique to overcome GPU memory limits in LLM training

TrainingRTX 3090 24GB

NVIDIA's blog post discusses how host offloading can be used to mitigate memory bottlenecks in JAX-based large language model (LLM) training. This approach allows model weights, gradients, and optimizer states to be offloaded from the GPU to the host, thus freeing up GPU memory and allowing for larger models or batch sizes.

Try it

# Example command for host offloading in JAX
# This is a conceptual representation and not a direct command
jax.host_offload_to_cpu()
Source
Reduce memory bottlenecks in JAX-based LLM training with host offloadingAuto

Use host offloading to overcome GPU memory limits in large language model training

TrainingRTX 3090 24GB

NVIDIA's blog post discusses how host offloading can help mitigate memory bottlenecks in JAX-based large language model training, allowing for more efficient use of GPU resources.

Try it

jax.host_offloading.enable() # Enables host offloading in JAX
Source
Generate synthetic data for financial AI research with NVIDIA NeMoAuto

Use NVIDIA NeMo to fine-tune LLMs for financial NLP with limited data

TrainingRTX 3090 24GB

NVIDIA NeMo provides a practical guide to generating synthetic data for financial AI research, addressing the constraints of limited and imbalanced real-world financial news data.

Try it

nemo train -t nemo_nlp --data_dir <path_to_data> --config_path <path_to_config>
Source
Maximize AI factory energy efficiency through full-stack inference and training optimizationsAuto

Optimize AI factory energy efficiency by focusing on overhead, data ingestion, training, and generating inference

TrainingRTX 3090 24GB

Power can account for 40% of the operating expenses to run an AI factory. Each watt can be spent on overhead, data ingestion, training, or generating inference. NVIDIA suggests optimizing the full stack to maximize energy efficiency.

Try it

nvidia-smi -pl
Source
Explore controllable AI video editing techniquesAuto

Netflix's research on more controllable AI video editing can provide insights into advanced video manipulation techniques.

TrainingRTX 3090 24GB

Netflix's research into controllable AI video editing explores techniques for more precise manipulation of video content, which can be beneficial for developers looking to improve video editing AI systems.

Try it

# Example command for video editing AI model training
python train_video_editor.py --model_name your_model_name --dataset your_video_dataset
Source
Optimize Transformer-based models for low-precision trainingAuto

Reduces training costs and time for large language and generative AI models

TrainingRTX 3090 24GB

NVIDIA's blog post discusses techniques for optimizing Transformer-based models for low-precision training, which can significantly reduce the computational resources required for training large language and generative AI models.

Try it

# Example command to enable low-precision training
mpu =MegatronPUPaddleModelParallelism(
    num_layers_per_stage=24,
    tensor_parallel_degree=8,
    pipeline_parallel_degree=2,
    expert_parallel_degree=32,
    sequence_parallel_degree=1,
    sequence_parallel_split=1,
    zero_optimization=ZeroOptimization(
        stage=2,
        contiguous_grads=True,
        overlap_comm=True,
        reduce_scatter=True,
        sub_group_size=1,
        reduce_bucket_size=1e8,
        max_norm_sync=True,
    ),
    zero_optimization_config=ZeroOptimizationConfig(
        block_size=1e8,
        red
Source
Optimize Transformer-Based Models for Low-Precision TrainingAuto

Use mixed precision training to optimize transformer-based models for efficiency

TrainingRTX 3090 24GB

NVIDIA's blog post details how to optimize transformer-based models for low-precision training, which can lead to faster training times and reduced memory usage on GPUs.

Try it

python -m torch.distributed.launch --nproc_per_node=8 train.py --precision.fp16
Source
Boost Mixture-of-Experts training throughput with advanced fusion kernelsAuto

Increase training throughput for Mixture-of-Experts models using advanced fusion kernels

TrainingAny GPU

Advanced fusion kernels can significantly boost the training throughput of Mixture-of-Experts models, which are a key component in large-scale AI systems, by optimizing the communication between experts.

Try it

moe_model = MixtureOfExpertsModel()
advanced_fusion_kernels.optimize_training_throughput(moe_model)
Source
Fine-tune biological foundation models with LoRA using NVIDIA BioNeMoAuto

Use NVIDIA BioNeMo recipes to fine-tune biological foundation models with LoRA

TrainingAny GPU

NVIDIA BioNeMo provides recipes for fine-tuning biological foundation models with LoRA, allowing for efficient and effective updates to these large models in the field of computational biology.

Try it

nvidia_bionemo_recipes = NVIDIABioNeMoRecipes()
lora_finetuned_model = nvidia_bionemo_recipes.fine_tune_biological_model(model, data)
Source
Boost Mixture-of-Experts training throughput with advanced fusion kernelsAuto

Increase MoE model training throughput using advanced fusion kernels

TrainingRTX 3090 24GB

NVIDIA's blog post discusses how to boost the training throughput of Mixture-of-Experts (MoE) models by using advanced fusion kernels, which can significantly improve the efficiency of training large-scale AI systems.

Try it

python -m moe_train --advanced-fusion-kernels
Source
Fine-tune biological foundation models with LoRA using NVIDIA BioNeMoAuto

Use NVIDIA BioNeMo recipes to fine-tune foundation models with LoRA for computational biology tasks

TrainingRTX 3090 24GB

NVIDIA BioNeMo provides recipes for fine-tuning large foundation models like ESM2 using LoRA, allowing for efficient and effective updates to these models for specific computational biology tasks.

Try it

python -m biodemo.lora_finetune --config-file config.yaml
Source
Train models faster with JAX and MaxText using NVFP4 on NVIDIA BlackwellAuto

Improve throughput when training large language models with JAX and MaxText on NVIDIA Blackwell

TrainingNVIDIA Blackwell

When training spans trillions of tokens across thousands of accelerators, every percentage point of step improvement matters. Using JAX and MaxText with NVFP4 on NVIDIA Blackwell can help achieve better throughput, which is crucial for pre-training frontier LLMs.

Try it

# Example command using JAX and MaxText
# This is a placeholder command and should be replaced with the actual usage
jax.run(your_model_training_function)
Source
Train models faster with JAX and MaxText using NVFP4 on NVIDIA BlackwellAuto

Improve throughput when training large language models with JAX and MaxText on NVIDIA Blackwell

TrainingNVIDIA Blackwell

When training spans trillions of tokens across thousands of accelerators, every percentage point of step improvement matters. Using JAX with MaxText and NVFP4 on NVIDIA Blackwell can significantly improve throughput, leading to faster training times for large language models.

Try it

jax.run(your_model, your_data, max_text=True, nvfp4=True)
Source
Post-train autonomous vehicle models in closed-loop with NVIDIA AlpamayoAuto

Use NVIDIA Alpamayo to bridge the gap between training and deployment for AV policies

TrainingNVIDIA GPU

NVIDIA Alpamayo helps in post-training autonomous vehicle models in a closed-loop, which is crucial for developing effective AV policies. This tool can be used to fine-tune and validate models before deployment.

Try it

nvidia-alpamayo --train-model --input-data <data>
Source
Post-train AV models in closed-loop with NVIDIA AlpamayoAuto

Use NVIDIA Alpamayo for post-training AV models to bridge the gap between training and deployment.

TrainingNVIDIA Alpamayo

NVIDIA Alpamayo is designed to help developers post-train autonomous vehicle models in a closed-loop system, which is crucial for refining AV policies and ensuring they perform well in real-world scenarios.

Try it

# Example command for post-training with NVIDIA Alpamayo
# This is a placeholder command and may vary based on actual usage
alpamayo_post_train --model <model_path> --data <data_path>
Source
Synthesize realistic 3D medical images at scaleAuto

Use NVIDIA's method to generate high-quality 3D medical imaging data for radiology AI

TrainingRTX 3090 24GB

NVIDIA's method allows for the synthesis of realistic 3D medical images at scale, addressing data scarcity and privacy issues in radiology AI. This can be crucial for training AI models on diverse and representative datasets.

Try it

# Placeholder command, actual implementation depends on NVIDIA's tools and frameworks
Source
Properly evaluate AI agents using agentic techniquesAuto

Distinguish between evaluating AI models and AI agents

TrainingCPU only

Evaluating an AI model and evaluating an AI agent are related but answer fundamentally different questions. A model benchmark tests the capability of a model, whereas an AI agent evaluation focuses on how well the agent performs in a specific environment or task.

Source
Mastering Agentic Techniques for AI Agent EvaluationAuto

Understand the difference between evaluating AI models and AI agents

TrainingCPU only

Evaluating an AI model tests its capability, while evaluating an AI agent answers different questions. This distinction is crucial for developers to understand when assessing their AI systems.

Source
Fine-tune NVIDIA Cosmos Predict 2.5 with LoRA/DoRA for Robot Video GenerationAuto

Use LoRA/DoRA for fine-tuning NVIDIA Cosmos Predict 2.5 for robot video generation tasks

TrainingRTX 3090 24GB

This blog post details how to fine-tune NVIDIA's Cosmos Predict 2.5 model using LoRA/DoRA for robot video generation tasks. Fine-tuning allows the model to adapt to specific use cases, improving its performance on tasks like video generation for robotics.

Try it

model = AutoModelForCausalLM.from_pretrained('nvidia/cosmos-predict-2.5')
tokenizer = AutoTokenizer.from_pretrained('nvidia/cosmos-predict-2.5')

with torch.no_grad():
    inputs = tokenizer("Hello, my dog is cute", return_tensors="pt")
    outputs = model(**inputs)
    logits = outputs.logits
Source
Fine-tune NVIDIA Cosmos Predict 2.5 with LoRA/DoRA for Robot Video GenerationAuto

Use LoRA/DoRA to fine-tune NVIDIA Cosmos Predict 2.5 for improved robot video generation

TrainingRTX 3090 24GB

In this blog post, NVIDIA demonstrates how to fine-tune their Cosmos Predict 2.5 model using LoRA/DoRA for generating robot videos. This approach can potentially improve the quality and accuracy of generated videos, which is crucial for applications in robotics and autonomous systems.

Try it

python fine_tune.py --model cosmos-predict-2.5 --strategy lora-dora
Source
Learn from Parameter Golf AI-assisted research techniquesAuto

Explore AI-assisted machine learning research and model design

TrainingCPU only

Parameter Golf event gathered 1,000+ participants to explore AI-assisted research, coding agents, quantization, and novel model design under strict constraints.

Try it

# Placeholder for AI-assisted research commands
Source
Utilize AWS for foundation model training and inferenceAuto

AWS provides building blocks for training and inference of foundation models

TrainingAWS GPU instances

AWS offers various services and tools that can be used to train and deploy foundation models efficiently. These services can help manage the complexity of large-scale model training and inference.

Try it

aws s3 sync s3://my-bucket/path/to/model /path/to/local/model
Source