Track
NVIDIA Nemotron-3, NVIDIA का नया ओपन मॉडल परिवार है जिसे रीजनिंग, कोडिंग, चैट, और एजेंटिक AI वर्कफ़्लो के लिए बनाया गया है। इसमें Nano, Super, और Ultra जैसे अलग-अलग मॉडल आकार शामिल हैं, ताकि डेवलपर्स छोटे, कुशल मॉडलों और बड़े, उच्च-प्रदर्शन मॉडलों के बीच चुन सकें।
Nemotron-3 का प्रमुख अपडेट इसकी दक्षता पर फोकस है। मॉडल्स को इस तरह डिज़ाइन किया गया है कि वे मजबूत प्रदर्शन दें, जबकि इन्फरेंस और फाइन-ट्यूनिंग को अधिक व्यावहारिक रखें। Nano संस्करण हाथों-हाथ प्रयोगों के लिए विशेष रूप से उपयोगी है क्योंकि यह बड़े मॉडलों की तुलना में अधिक सुलभ GPU सेटअप पर चल सकता है।
इस गाइड में, हम NVIDIA Nemotron-3-Nano-4B को एक साइकोलॉजी प्रश्न-उत्तर डेटासेट पर फाइन-ट्यून करेंगे। हम Low-Rank Adaptation (LoRA), Transformers Reinforcement Learning (TRL), और Hugging Face का उपयोग करेंगे ताकि डेटा तैयार किया जा सके, मॉडल को ट्रेन किया जा सके, एडेप्टर को सेव किया जा सके, उसे Hugging Face पर पुश किया जा सके, और फाइन-ट्यूनिंग से पहले और बाद की प्रतिक्रियाओं की तुलना की जा सके।
नवीनतम ओपन-सोर्स AI मॉडल खोजने, AI एजेंट बनाने, और LLMs को फाइन-ट्यून करने की शुरुआत के लिए, मैं हमारे Hugging Face Fundamentals स्किल ट्रैक में दाखिला लेने की सलाह देता/देती हूँ।
1. पर्यावरण सेट करना
Nemotron-3 Nano एक हाइब्रिड आर्किटेक्चर का उपयोग करता है, इसलिए Mamba-संबंधित पैकेजों को सही ढंग से इंस्टॉल करना आवश्यक है। एक Jupyter नोटबुक में, हम पहले मौजूदा PyTorch स्टैक हटाते हैं और PyTorch 2.7.1 का CUDA 12.8 बिल्ड पुनर्स्थापित करते हैं, जो यहाँ प्रयुक्त पिन किए गए mamba_ssm और causal_conv1d संस्करणों के साथ काम करता है।
हम कोर फाइन-ट्यूनिंग लाइब्रेरीज़ भी इंस्टॉल करते हैं, जिनमें transformers, trl, accelerate, datasets, peft, और huggingface_hub शामिल हैं।
%%capture
!pip install -U packaging ninja
# Replace the current PyTorch stack with the CUDA 12.8 build that works with these Mamba kernel pins.
!pip uninstall -y torch torchvision torchaudio triton
!pip install "torch==2.7.1" "torchvision==0.22.1" "torchaudio==2.7.1" --index-url https://download.pytorch.org/whl/cu128
!pip install -U "transformers==4.56.2" tokenizers "trl==0.22.2" accelerate datasets peft pandas tqdm huggingface_hub safetensors
!pip install -U --no-build-isolation "mamba_ssm==2.2.5" "causal_conv1d==1.5.2"
पैकेज इंस्टॉल करने के बाद, जाँचें कि CUDA उपलब्ध है और PyTorch आपका GPU पहचान सकता है। यह नोटबुक 24GB GPU के लिए ट्यून की गई है, इसलिए यदि आपके GPU में कम VRAM है तो यह चेतावनी देगा।
import os
import platform
import torch
print(f"Python: {platform.python_version()}")
print(f"PyTorch: {torch.__version__}")
print(f"PyTorch CUDA build: {torch.version.cuda}")
print(f"CUDA available: {torch.cuda.is_available()}")
if not torch.cuda.is_available():
raise RuntimeError(
"CUDA is not available. Select a RunPod PyTorch image with GPU support."
)
for idx in range(torch.cuda.device_count()):
props = torch.cuda.get_device_properties(idx)
total_gb = props.total_memory / 1024**3
print(
f"GPU {idx}: {props.name} ({total_gb:.1f} GB VRAM, capability {props.major}.{props.minor})"
)
if torch.cuda.get_device_properties(0).total_memory < 24 * 1024**3:
print(
"Warning: this 4B LoRA notebook is tuned for GPUs with at least 24GB VRAM. Reduce batch sizes on smaller GPUs."
)
torch.backends.cuda.matmul.allow_tf32 = True
torch.backends.cudnn.allow_tf32 = True
आउटपुट:
Python: 3.12.3
PyTorch: 2.7.1+cu128
PyTorch CUDA build: 12.8
CUDA available: True
GPU 0: NVIDIA GeForce RTX 3090 (23.6 GB VRAM, capability 8.6)
Warning: this 4B LoRA notebook is tuned for GPUs with at least 24GB VRAM. Reduce batch sizes on smaller GPUs.
अपने Hugging Face टोकन को HF_TOKEN नामक एनवायरनमेंट वेरिएबल के रूप में सेट करें। इससे नोटबुक Nemotron-3 मॉडल डाउनलोड कर सकेगी और बाद में फाइन-ट्यून किए गए LoRA एडेप्टर को Hugging Face पर पुश कर सकेगी।
from huggingface_hub import login
hf_token = os.environ.get("HF_TOKEN")
if not hf_token:
raise ValueError(
"Set HF_TOKEN in the RunPod environment before running this notebook."
)
login(token=hf_token)
print("Logged in to Hugging Face.")
2. डेटासेट लोड करना और प्रोसेस करना
अब हम Hugging Face से साइकोलॉजी प्रश्न-उत्तर डेटासेट लोड करेंगे। इस डेटासेट में एक question कॉलम और दो प्रतिक्रिया कॉलम हैं: response_j और response_k। इस गाइड के लिए, हम सुपरवाइज़्ड फाइन-ट्यूनिंग हेतु response_j को लक्ष्य उत्तर के रूप में उपयोग करेंगे।
हम पहले डेटासेट लोड करते हैं, पुनरुत्पादनक्षमता के लिए इसे शफ़ल करते हैं, और ट्रेन, वैलिडेशन, तथा टेस्ट स्प्लिट बनाते हैं।
from datasets import DatasetDict, load_dataset
DATASET_ID = "jkhedri/psychology-dataset"
TRAIN_LIMIT = 8000
VALIDATION_LIMIT = 800
TEST_LIMIT = 300
SEED = 42
raw_dataset = load_dataset(DATASET_ID)
raw_train = raw_dataset["train"].shuffle(seed=SEED)
split_1 = raw_train.train_test_split(test_size=0.15, seed=SEED)
split_2 = split_1["test"].train_test_split(test_size=0.33, seed=SEED)
def maybe_limit(split, limit):
if limit is None:
return split
return split.select(range(min(limit, len(split))))
dataset = DatasetDict(
{
"train": maybe_limit(split_1["train"], TRAIN_LIMIT),
"validation": maybe_limit(split_2["train"], VALIDATION_LIMIT),
"test": maybe_limit(split_2["test"], TEST_LIMIT),
}
)
dataset
आउटपुट:
DatasetDict({
train: Dataset({
features: ['question', 'response_j', 'response_k'],
num_rows: 8000
})
validation: Dataset({
features: ['question', 'response_j', 'response_k'],
num_rows: 800
})
test: Dataset({
features: ['question', 'response_j', 'response_k'],
num_rows: 300
})
})
ट्रेनिंग के लिए डेटासेट को फ़ॉर्मैट करने से पहले, कॉलम नाम जाँचें और एक उदाहरण देखें। इससे यह पुष्टि होती है कि डेटासेट सही से लोड हुआ है और अपेक्षित प्रश्न तथा प्रतिक्रिया फ़ील्ड शामिल हैं।
dataset["train"].column_names, dataset["train"][0]
आउटपुट:
(
['question', 'response_j', 'response_k'],
{
'question': "I'm experiencing anxiety about social situations and don't know how to cope.",
'response_j': "Social anxiety can be a difficult and isolating experience, but there are effective treatments available. Let's work on developing coping mechanisms, such as deep breathing and mindfulness, and exposure therapy to gradually confront your fears. We can also explore ways to improve social skills and build self-confidence.",
'response_k': "Just avoid social situations. It's not worth the anxiety and discomfort. You can also try using alcohol or drugs to help you feel more comfortable in social settings."
}
)
3. TRL फाइन-ट्यूनिंग के लिए डेटासेट फ़ॉर्मैट करना
अब हम डेटासेट को TRL द्वारा अपेक्षित प्रॉम्प्ट-कम्प्लीशन फ़ॉर्मैट में बदलेंगे। प्रत्येक उदाहरण में एक सिस्टम प्रॉम्प्ट, उपयोगकर्ता का साइकोलॉजी से जुड़ा प्रश्न, और response_j से लक्षित सहायक का उत्तर शामिल होगा।
सिस्टम प्रॉम्प्ट मॉडल को बताता है कि कैसे जवाब देना है: सहायक रहें, छिपे हुए तर्कों के निशान न दें, व्यावहारिक सुझाव दें, और लाइसेंस प्राप्त मानसिक स्वास्थ्य पेशेवर की तरह व्यवहार करने से बचें।
SYSTEM_PROMPT = """/no_think
You are a supportive psychology question-answering assistant.
Do not include hidden reasoning, thinking traces, <think> tags, or </think> tags in the final answer.
Respond with empathy, practical coping suggestions, and clear next steps.
Give a complete answer in 2-4 short paragraphs or a brief paragraph plus 3-5 practical bullets.
Do not diagnose the user or claim to replace a licensed mental health professional.
If the user may be in immediate danger or crisis, encourage contacting local emergency services or a trusted crisis hotline.
Keep the answer safe, specific, and directly relevant to the user's question without being overly brief."""
CHAT_TEMPLATE_KWARGS = {"enable_thinking": False}
USER_TEMPLATE = "Question:\n\n{question}"
def clean_text(value):
return " ".join(str(value).strip().split())
def to_prompt_completion(example):
question = clean_text(example["question"])
answer = clean_text(example["response_j"])
return {
"prompt": [
{"role": "system", "content": SYSTEM_PROMPT},
{"role": "user", "content": USER_TEMPLATE.format(question=question)},
],
"completion": [
{"role": "assistant", "content": answer},
],
"chat_template_kwargs": CHAT_TEMPLATE_KWARGS,
}
sft_dataset = dataset.map(
to_prompt_completion, remove_columns=dataset["train"].column_names
)
sft_dataset["train"][0]
आउटपुट:
{
'prompt': [
{
'role': 'system',
'content': "/no_think\nYou are a supportive psychology question-answering assistant.\nDo not include hidden reasoning, thinking traces, <think> tags, or </think> tags in the final answer.\nRespond with empathy, practical coping suggestions, and clear next steps.\nGive a complete answer in 2-4 short paragraphs or a brief paragraph plus 3-5 practical bullets.\nDo not diagnose the user or claim to replace a licensed mental health professional.\nIf the user may be in immediate danger or crisis, encourage contacting local emergency services or a trusted crisis hotline.\nKeep the answer safe, specific, and directly relevant to the user's question without being overly brief."
},
{
'role': 'user',
'content': "Question:\n\nI'm experiencing anxiety about social situations and don't know how to cope."
}
],
'completion': [
{
'role': 'assistant',
'content': "Social anxiety can be a difficult and isolating experience, but there are effective treatments available. Let's work on developing coping mechanisms, such as deep breathing and mindfulness, and exposure therapy to gradually confront your fears. We can also explore ways to improve social skills and build self-confidence."
}
],
'chat_template_kwargs': {'enable_thinking': False}
}
4. Nemotron-3 बेस मॉडल लोड करना
अब हम Hugging Face से NVIDIA Nemotron-3 Nano 4B BF16 टोकनाइज़र और बेस मॉडल लोड करेंगे। हम LoRA एडेप्टर के लिए आउटपुट डायरेक्टरी भी सेट करते हैं और 24GB GPU पर ट्रेनिंग को प्रबंधनीय रखने के लिए सीक्वेंस लंबाई को 1024 टोकन तक सीमित करते हैं।
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
MODEL_ID = "nvidia/NVIDIA-Nemotron-3-Nano-4B-BF16"
OUTPUT_DIR = "./nemotron-3-nano-4b-bf16-psychology-qa-lora"
MAX_SEQ_LENGTH = 1024
tokenizer = AutoTokenizer.from_pretrained(
MODEL_ID,
token=hf_token,
trust_remote_code=True,
use_fast=True,
)
if tokenizer.pad_token is None:
tokenizer.pad_token = tokenizer.eos_token
tokenizer.padding_side = "right"
base_model = AutoModelForCausalLM.from_pretrained(
MODEL_ID,
token=hf_token,
trust_remote_code=True,
dtype=torch.bfloat16,
device_map="auto",
attn_implementation="eager",
)
base_model.config.use_cache = False
base_model.config.pad_token_id = tokenizer.pad_token_id
base_model.config.eos_token_id = tokenizer.eos_token_id
base_model.generation_config.pad_token_id = tokenizer.pad_token_id
base_model.generation_config.eos_token_id = tokenizer.eos_token_id
base_model.generation_config.use_cache = False
base_model.generation_config.do_sample = False
base_model.generation_config.top_p = None
base_model.generation_config.min_new_tokens = None
base_model.generation_config.repetition_penalty = 1.08
base_model.generation_config.no_repeat_ngram_size = 4
5. जनरेशन हेल्पर फ़ंक्शन बनाना
फाइन-ट्यूनिंग से पहले, हम मॉडल की प्रतिक्रियाओं का परीक्षण करने के लिए कुछ हेल्पर फ़ंक्शन बनाएंगे। ये फ़ंक्शन चैट प्रॉम्प्ट तैयार करते हैं, उत्तर जेनरेट करते हैं, अवांछित थिंकिंग टैग हटाते हैं, और परिणामों को एक छोटे तुलना तालिका में सहेजते हैं।
import gc
import pandas as pd
from tqdm.auto import tqdm
def clear_cuda_cache():
gc.collect()
if torch.cuda.is_available():
torch.cuda.empty_cache()
def build_messages(question, system_prompt=SYSTEM_PROMPT):
return [
{"role": "system", "content": system_prompt},
{
"role": "user",
"content": USER_TEMPLATE.format(question=clean_text(question)),
},
]
def remove_thinking_text(text):
text = text.strip()
while "<think>" in text and "</think>" in text:
start = text.find("<think>")
end = text.find("</think>", start) + len("</think>")
text = (text[:start] + text[end:]).strip()
if "</think>" in text:
text = text.split("</think>")[-1].strip()
return text.replace("<think>", "").replace("</think>", "").strip()
def generate_answer(
model, tokenizer, question, system_prompt=SYSTEM_PROMPT, max_new_tokens=180
):
messages = build_messages(question, system_prompt)
device = next(model.parameters()).device
inputs = tokenizer.apply_chat_template(
messages,
tokenize=True,
**CHAT_TEMPLATE_KWARGS,
add_generation_prompt=True,
return_dict=True,
return_tensors="pt",
)
inputs = {key: value.to(device) for key, value in inputs.items()}
input_len = inputs["input_ids"].shape[-1]
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=max_new_tokens,
do_sample=False,
use_cache=False,
repetition_penalty=1.08,
no_repeat_ngram_size=4,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id,
)
decoded = tokenizer.decode(outputs[0][input_len:], skip_special_tokens=True).strip()
return remove_thinking_text(decoded)
def generate_sample_table(model, tokenizer, examples, output_column):
rows = []
model.eval()
for ex in tqdm(examples, desc=f"Generating {output_column}", leave=False):
rows.append(
{
"question": clean_text(ex["question"]),
"reference_response_j": clean_text(ex["response_j"]),
output_column: generate_answer(model, tokenizer, ex["question"]),
}
)
return pd.DataFrame(rows)
6. फाइन-ट्यूनिंग से पहले का नमूना मूल्यांकन चलाना
ट्रेनिंग से पहले, हम बेस Nemotron-3 मॉडल से कुछ प्रतिक्रियाएँ जेनरेट करेंगे। यह हमें एक बेसलाइन देता है ताकि हम बाद में देख सकें कि LoRA फाइन-ट्यूनिंग से पहले और बाद में मॉडल कैसे प्रतिक्रिया देता है।
यहाँ, हम टेस्ट सेट से तीन उदाहरण चुनते हैं और पहले बनाए गए हेल्पर फ़ंक्शन का उपयोग करके उत्तर जेनरेट करते हैं।
sample_examples = [dataset["test"][idx] for idx in range(min(3, len(dataset["test"])))]
pre_samples = generate_sample_table(
base_model,
tokenizer,
sample_examples,
"base_model_answer"
)
pre_samples
आउटपुट एक छोटी तालिका है जिसमें मूल प्रश्न, response_j से संदर्भ उत्तर, और बेस मॉडल द्वारा जेनरेट किया गया उत्तर शामिल है। यह तालिका बाद में फाइन-ट्यून किए गए मॉडल की प्रतिक्रियाओं से तुलना करते समय उपयोगी होगी।

7. LoRA और ट्रेनिंग सेटिंग्स कॉन्फ़िगर करना
अब हम मॉडल को LoRA फाइन-ट्यूनिंग के लिए तैयार करेंगे। हम मेमोरी उपयोग घटाने के लिए ग्रेडिएंट चेकपॉइंटिंग सक्षम करते हैं, फिर एक LoRA कॉन्फ़िगरेशन बनाते हैं जो मॉडल की सभी लीनियर लेयर्स को टार्गेट करता है।
from peft import LoraConfig
base_model.gradient_checkpointing_enable()
base_model.config.use_cache = False
lora_config = LoraConfig(
r=32,
lora_alpha=64,
lora_dropout=0.1,
bias="none",
task_type="CAUSAL_LM",
target_modules="all-linear",
)
इसके बाद, हम SFTConfig का उपयोग करके सुपरवाइज़्ड फाइन-ट्यूनिंग सेटिंग्स परिभाषित करते हैं। ये सेटिंग्स बैच आकार, लर्निंग रेट, epochs की संख्या, मूल्यांकन आवृत्ति, सेविंग रणनीति, और BF16 ट्रेनिंग को नियंत्रित करती हैं।
from trl import SFTConfig, SFTTrainer
training_args = SFTConfig(
output_dir=OUTPUT_DIR,
per_device_train_batch_size=8,
per_device_eval_batch_size=8,
gradient_accumulation_steps=8,
learning_rate=5e-5,
weight_decay=0.01,
lr_scheduler_type="linear",
warmup_ratio=0.05,
num_train_epochs=2,
logging_steps=50,
eval_strategy="steps",
eval_steps=50,
save_strategy="steps",
save_steps=100,
save_total_limit=2,
load_best_model_at_end=True,
metric_for_best_model="eval_loss",
greater_is_better=False,
gradient_checkpointing=True,
bf16=True,
fp16=False,
tf32=True,
max_length=MAX_SEQ_LENGTH,
packing=False,
completion_only_loss=True,
remove_unused_columns=False,
dataloader_num_workers=4,
optim="adamw_torch_fused",
report_to="none",
seed=SEED,
)
8. LoRA एडेप्टर का प्रशिक्षण और सहेजना
अब हम SFTTrainer बनाएँगे, LoRA कॉन्फ़िगरेशन जोड़ेंगे, और फाइन-ट्यूनिंग शुरू करेंगे। ट्रेनिंग से पहले, हम यह भी जाँचते हैं कि कितने पैरामीटर trainable हैं ताकि पुष्टि हो सके कि LoRA एडेप्टर सही से जुड़ा है।
trainer = SFTTrainer(
model=base_model,
args=training_args,
train_dataset=sft_dataset["train"],
eval_dataset=sft_dataset["validation"],
peft_config=lora_config,
processing_class=tokenizer,
)
trainable_params = sum(
param.numel() for param in trainer.model.parameters() if param.requires_grad
)
all_params = sum(param.numel() for param in trainer.model.parameters())
if trainable_params == 0:
raise RuntimeError(
"No trainable LoRA parameters were attached. Check target_modules before training."
)
print(f"Trainable LoRA parameters: {trainable_params:,}")
print(f"All parameters visible to trainer: {all_params:,}")
print(f"Trainable percentage: {100 * trainable_params / all_params:.4f}%")
train_result = trainer.train()
trainer.model.eval()
trainer.model.config.use_cache = False
trainer.model.generation_config.use_cache = False
train_result
ट्रेनिंग के दौरान, ट्रेनिंग लॉस और वैलिडेशन लॉस आमतौर पर धीरे-धीरे घटते हैं। इसका मतलब होता है कि मॉडल डेटासेट से प्रतिक्रिया शैली सीख रहा है।

ट्रेनिंग के बाद, LoRA एडेप्टर और टोकनाइज़र को लोकली सहेजें:
trainer.model.save_pretrained(OUTPUT_DIR)
tokenizer.save_pretrained(OUTPUT_DIR)
फिर फाइन-ट्यून किया हुआ एडेप्टर Hugging Face पर पुश करें:
HUB_REPO_ID = "kingabzpro/nemotron-3-nano-4b-bf16-psychology-qa-lora"
trainer.model.push_to_hub(HUB_REPO_ID, private=False)
tokenizer.push_to_hub(HUB_REPO_ID, private=False)
अब फाइन-ट्यून किया गया एडेप्टर लोकली सेव है और HUB_REPO_ID के अंतर्गत Hugging Face पर अपलोड हो चुका है।

स्रोत: kingabzpro/nemotron-3-nano-4b-bf16-psychology-qa-lora
9. फाइन-ट्यूनिंग से पहले और बाद की प्रतिक्रियाओं की तुलना
अंत में, हम फाइन-ट्यून किए गए मॉडल से उत्तर जेनरेट करेंगे और उन्हें बेस मॉडल आउटपुट से तुलना करेंगे। इससे हमें पता चलता है कि LoRA फाइन-ट्यूनिंग ने संदर्भ प्रतिक्रियाओं के साथ मॉडल के एलाइनमेंट में सुधार किया या नहीं।
post_samples = generate_sample_table(
trainer.model,
tokenizer,
sample_examples,
"fine_tuned_answer"
)
comparison = pre_samples[
["question", "reference_response_j", "base_model_answer"]
].merge(
post_samples[["question", "fine_tuned_answer"]],
on="question",
how="left",
)
for idx, row in comparison.iterrows():
print("=" * 100)
print(f"Sample {idx + 1}")
print("=" * 100)
print("\nQUESTION:\n")
print(row["question"])
print("\nREFERENCE RESPONSE_J:\n")
print(row["reference_response_j"])
print("\nBASE MODEL ANSWER:\n")
print(row["base_model_answer"])
print("\nFINE-TUNED ANSWER:\n")
print(row["fine_tuned_answer"])
print("\n")

फाइन-ट्यून किया गया मॉडल संदर्भ प्रतिक्रिया शैली के साथ अधिक एलाइन हो गया। यह अधिक संक्षिप्त था और डेटासेट के उत्तरों के करीब रहा। हालाँकि, बेस मॉडल ने कभी-कभी अधिक विस्तृत और व्यावहारिक प्रतिक्रियाएँ दीं।
उदाहरण के लिए, तनाव प्रबंधन और एकाग्रता-संबंधित प्रश्नों पर फाइन-ट्यून किए गए मॉडल का एलाइनमेंट बेहतर था, लेकिन नींद-संबंधी उदाहरण में बेस मॉडल ने अधिक सहायक विवरण शामिल करके मजबूत जवाब दिया।
कुल मिलाकर, यदि आपका लक्ष्य संदर्भ डेटासेट शैली से मेल खाना है, तो फाइन-ट्यून किया गया मॉडल बेहतर है। यदि आपका लक्ष्य अधिकतम सहायतापरकता है, तो कुछ मामलों में बेस मॉडल अब भी बेहतर प्रदर्शन कर सकता है क्योंकि यह अधिक गर्मजोशी और विस्तार से उत्तर दे सकता है।
यदि आपको ऊपर दिया गया कोड चलाने में समस्या हो, तो Hugging Face रिपोजिटरी में नोटबुक देखें: fine-tune-nemotron-nano.ipynb
अंतिम विचार
100+ LLMs को फाइन-ट्यून करने के बाद भी, इस मॉडल के लिए अपेक्षा से अधिक सेटअप कार्य करना पड़ा। मुख्य चुनौती mamba_ssm डिपेंडेंसी थी, जो आसानी से टूट सकती है या मौजूदा लोकल Python वातावरण से टकराव कर सकती है।
इसी कारण, मैं इस वर्कफ़्लो के लिए एक साफ (क्लीन) वातावरण का उपयोग करने की सलाह देता/देती हूँ। मेरे मामले में, सबसे आसान रास्ता था वातावरण को फिर से बनाना, सही PyTorch संस्करण इंस्टॉल करना, Mamba-संबंधित पैकेज पिन करना, और फिर वहाँ से नोटबुक चलाना।
एक और सीमा क्वांटाइज़ेशन है। इस सेटअप के लिए, मैं मॉडल को 4-बिट में सीधे लोड करके और एक मानक QLoRA वर्कफ़्लो की तरह फाइन-ट्यून नहीं कर सका/सकी, जैसा कि मेरे Qwen3.5 Small ट्यूटोरियल में है। मुझे पूर्ण BF16 मॉडल लोड करना पड़ा और फिर LoRA के साथ फाइन-ट्यून करना पड़ा। 4B मॉडल के लिए, यह 24GB GPU पर अभी भी प्रबंधनीय है, लेकिन 12B मॉडल और उससे ऊपर के लिए, मेमोरी उपयोग तेजी से समस्या बन सकता है।
इसके बावजूद, कंज़्यूमर GPU पर फाइन-ट्यूनिंग अब कहीं अधिक सुलभ हो गई है। RTX 3090 जैसी 24GB कार्ड के साथ, मजबूत ओपन मॉडलों को किसी विशेष शैली या डोमेन के अनुरूप ढालना अब बिना बड़े ट्रेनिंग क्लस्टर के संभव है।
समग्र रूप से, Nemotron-3 Nano एक सक्षम मॉडल है, लेकिन इसे सावधानीपूर्वक वातावरण सेटअप की ज़रूरत होती है। एक बार डिपेंडेंसीज़ सही चलने लगें, तो यह अच्छी तरह फाइन-ट्यून होता है और अपेक्षाकृत कम उदाहरणों के साथ नई प्रतिक्रिया शैली के अनुरूप ढल सकता है।