इस ट्यूटोरियल में, हम DeepSeek-R1-Distill-Llama-8B मॉडल को Hugging Face के Medical Chain-of-Thought डेटासेट पर फाइन-ट्यून करेंगे। यह डिस्टिल्ड DeepSeek-R1 मॉडल, Llama 3.1 8B को DeepSeek-R1 से जनित डाटा पर फाइन-ट्यून करके बनाया गया है। यह मूल मॉडल जैसे ही रीज़निंग कौशल प्रदर्शित करता है।
यदि आप LLMs और फाइन-ट्यूनिंग में नए हैं, तो मैं आपको Introduction to LLMs in Python कोर्स लेने की अत्यधिक सलाह देता/देती हूँ। आप हमारा यह गाइड भी देख सकते हैं: RTX 4090 पर DeepSeek R1-0528 का फाइन-ट्यूनिंग।

छवि: लेखक द्वारा
DeepSeek R1 का परिचय
चीनी एआई कंपनी DeepSeek AI ने अपने प्रथम-पीढ़ी के रीज़निंग मॉडल—DeepSeek-R1 और DeepSeek-R1-Zero—को ओपन-सोर्स कर दिया है, जो गणित, कोडिंग और लॉजिक जैसे रीज़निंग कार्यों में OpenAI के o1 की टक्कर देते हैं। अधिक जानने के लिए हमारा DeepSeek R1 पर पूर्ण गाइड पढ़ें।
DeepSeek-R1-Zero
DeepSeek-R1-Zero पहला ओपन-सोर्स मॉडल है जिसे शुरुआती चरण में सुपरवाइज़्ड फाइन-ट्यूनिंग (SFT) के बजाय बड़े पैमाने पर रिइनफोर्समेंट लर्निंग (RL) से प्रशिक्षित किया गया है। यह तरीका मॉडल को स्वतंत्र रूप से चेन-ऑफ-थॉट (CoT) रीज़निंग का अन्वेषण करने, जटिल समस्याएँ सुलझाने और अपने आउटपुट को क्रमिक रूप से परिष्कृत करने में सक्षम बनाता है। हालांकि, इसमें दोहरावदार रीज़निंग स्टेप्स, कम पठनीयता और भाषा-मिश्रण जैसी चुनौतियाँ भी हैं जो स्पष्टता और उपयोगिता को प्रभावित कर सकती हैं।
DeepSeek-R1
DeepSeek-R1 को DeepSeek-R1-Zero की सीमाएँ दूर करने के लिए पेश किया गया, जिसमें रिइनफोर्समेंट लर्निंग से पहले कोल्ड-स्टार्ट डाटा शामिल किया गया—ताकि रीज़निंग और नॉन-रीज़निंग दोनों कार्यों के लिए मजबूत आधार मिल सके।
यह बहु-चरणीय प्रशिक्षण मॉडल को गणित, कोड और रीज़निंग बेंचमार्क्स पर, OpenAI-o1 के तुलनीय, स्टेट-ऑफ-द-आर्ट प्रदर्शन तक पहुँचने में सक्षम बनाता है, साथ ही आउटपुट की पठनीयता और सुसंगति को भी बेहतर करता है।
DeepSeek डिस्टिलेशन
उच्च कंप्यूट और मेमोरी की मांग करने वाले बड़े भाषा मॉडलों के साथ, DeepSeek ने डिस्टिल्ड मॉडल भी पेश किए हैं। ये छोटे, अधिक कुशल मॉडल भी उल्लेखनीय रीज़निंग प्रदर्शन देने में सक्षम सिद्ध हुए हैं।
1.5B से 70B पैरामीटर्स तक फैले ये मॉडल मजबूत रीज़निंग क्षमताओं को बनाए रखते हैं; कई बेंचमार्क्स पर DeepSeek-R1-Distill-Qwen-32B ने OpenAI-o1-mini को भी पीछे छोड़ा है।
छोटे मॉडल, बड़े मॉडलों के रीज़निंग पैटर्न विरासत में लेते हैं, जो डिस्टिलेशन प्रक्रिया की प्रभावशीलता दिखाता है।

स्रोत: deepseek-ai/DeepSeek-R1
पढ़ें यह DeepSeek-R1: फीचर्स, o1 तुलना, डिस्टिल्ड मॉडल्स और अधिक ब्लॉग, जिसमें प्रमुख फीचर्स, डेवलपमेंट प्रक्रिया, डिस्टिल्ड मॉडल्स, एक्सेस, प्राइसिंग और OpenAI o1 से तुलना शामिल है।
DeepSeek R1 का फाइन-ट्यूनिंग: चरण-दर-चरण मार्गदर्शिका
DeepSeek R1 मॉडल को फाइन-ट्यून करने के लिए, आप निम्न चरणों का पालन कर सकते हैं:
1. सेटअप करना
इस प्रोजेक्ट के लिए हम Kaggle को Cloud IDE के रूप में उपयोग कर रहे हैं क्योंकि यह GPUs का निःशुल्क एक्सेस देता है, जो अक्सर Google Colab से अधिक शक्तिशाली होते हैं। शुरू करने के लिए, एक नया Kaggle नोटबुक लॉन्च करें और अपने Hugging Face टोकन तथा Weights & Biases टोकन को सीक्रेट्स के रूप में जोड़ें।
आप Kaggle नोटबुक इंटरफेस में Add-ons टैब पर जाकर Secrets विकल्प चुनकर सीक्रेट्स जोड़ सकते हैं।
सीक्रेट्स सेटअप करने के बाद, unsloth Python पैकेज इंस्टॉल करें। Unsloth एक ओपन-सोर्स फ्रेमवर्क है जो बड़े भाषा मॉडलों (LLMs) का फाइन-ट्यूनिंग 2X तेज और अधिक मेमोरी-कुशल बनाता है।
हमारा Unsloth गाइड: LLM फाइन-ट्यूनिंग को ऑप्टिमाइज़ और स्पीड-अप करें पढ़ें—जिसमें Unsloth की प्रमुख खूबियाँ, विभिन्न फंक्शंस और अपने फाइन-ट्यूनिंग वर्कफ़्लो को ऑप्टिमाइज़ करने के तरीके बताए गए हैं।
%%capture
!pip install unsloth
!pip install --force-reinstall --no-cache-dir --no-deps git+https://github.com/unslothai/unsloth.git
Kaggle Secrets से सुरक्षित रूप से निकाले गए Hugging Face API का उपयोग करके Hugging Face CLI में लॉग इन करें।
from huggingface_hub import login
from kaggle_secrets import UserSecretsClient
user_secrets = UserSecretsClient()
hf_token = user_secrets.get_secret("HUGGINGFACE_TOKEN")
login(hf_token)
Weights & Biases (wandb) में अपने API की से लॉग इन करें और प्रयोगों तथा फाइन-ट्यूनिंग प्रगति को ट्रैक करने के लिए नया प्रोजेक्ट बनाएँ।
import wandb
wb_token = user_secrets.get_secret("wandb")
wandb.login(key=wb_token)
run = wandb.init(
project='Fine-tune-DeepSeek-R1-Distill-Llama-8B on Medical COT Dataset',
job_type="training",
anonymous="allow"
)
2. मॉडल और टोकनाइज़र लोड करना
इस प्रोजेक्ट में, हम DeepSeek-R1-Distill-Llama-8B का Unsloth संस्करण लोड करेंगे। साथ ही, मेमोरी उपयोग और प्रदर्शन को बेहतर बनाने के लिए हम मॉडल को 4-बिट क्वांटाइज़ेशन में लोड करेंगे।
from unsloth import FastLanguageModel
max_seq_length = 2048
dtype = None
load_in_4bit = True
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "unsloth/DeepSeek-R1-Distill-Llama-8B",
max_seq_length = max_seq_length,
dtype = dtype,
load_in_4bit = load_in_4bit,
token = hf_token,
)
3. फाइन-ट्यूनिंग से पहले मॉडल इन्फेरेंस
मॉडल के लिए एक प्रॉम्प्ट शैली बनाने हेतु, हम एक सिस्टम प्रॉम्प्ट परिभाषित करेंगे और प्रश्न व उत्तर निर्माण के लिए प्लेसहोल्डर शामिल करेंगे। यह प्रॉम्प्ट मॉडल को चरण-बद्ध सोचने तथा तार्किक और सटीक उत्तर देने का मार्गदर्शन करेगा।
prompt_style = """Below is an instruction that describes a task, paired with an input that provides further context.
Write a response that appropriately completes the request.
Before answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.
### Instruction:
You are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning.
Please answer the following medical question.
### Question:
{}
### Response:
<think>{}"""
इस उदाहरण में, हम prompt_style को एक मेडिकल प्रश्न देंगे, उसे टोकन्स में बदलेंगे, और फिर उन टोकन्स को मॉडल में पास करेंगे ताकि उत्तर जेनरेट हो सके।
question = "A 61-year-old woman with a long history of involuntary urine loss during activities like coughing or sneezing but no leakage at night undergoes a gynecological exam and Q-tip test. Based on these findings, what would cystometry most likely reveal about her residual volume and detrusor contractions?"
FastLanguageModel.for_inference(model)
inputs = tokenizer([prompt_style.format(question, "")], return_tensors="pt").to("cuda")
outputs = model.generate(
input_ids=inputs.input_ids,
attention_mask=inputs.attention_mask,
max_new_tokens=1200,
use_cache=True,
)
response = tokenizer.batch_decode(outputs)
print(response[0].split("### Response:")[1])
बिना फाइन-ट्यूनिंग के भी, हमारे मॉडल ने सफलतापूर्वक चेन-ऑफ-थॉट जेनरेट की और अंतिम उत्तर देने से पहले तर्क प्रस्तुत किया। रीज़निंग प्रक्रिया <think></think> टैग्स के अंदर समाहित रहती है।
तो फिर फाइन-ट्यूनिंग की ज़रूरत क्यों? रीज़निंग प्रक्रिया विस्तारपूर्ण तो थी, परन्तु अनावश्यक रूप से लंबी और कम संक्षिप्त थी। साथ ही, अंतिम उत्तर बुलेट-पॉइंट प्रारूप में आया, जो उस डेटासेट की संरचना और शैली से भिन्न है जिस पर हम फाइन-ट्यून करना चाहते हैं।
<think>
Okay, so I have this medical question to answer. Let me try to break it down. The patient is a 61-year-old woman with a history of involuntary urine loss during activities like coughing or sneezing, but she doesn't leak at night. She's had a gynecological exam and a Q-tip test. I need to figure out what cystometry would show regarding her residual volume and detrusor contractions.
First, I should recall what I know about urinary incontinence. Involuntary urine loss during activities like coughing or sneezing makes me think of stress urinary incontinence. Stress incontinence typically happens when the urethral sphincter isn't strong enough to resist increased abdominal pressure from activities like coughing, laughing, or sneezing. This usually affects women, especially after childbirth when the pelvic muscles and ligaments are weakened.
The Q-tip test is a common diagnostic tool for stress urinary incontinence. The test involves inserting a Q-tip catheter, which is a small balloon catheter, into the urethra. The catheter is connected to a pressure gauge. The patient is asked to cough, and the pressure reading is taken. If the pressure is above normal (like above 100 mmHg), it suggests that the urethral sphincter isn't closing properly, which is a sign of stress incontinence.
So, based on the history and the Q-tip test, the diagnosis is likely stress urinary incontinence. Now, moving on to what cystometry would show. Cystometry, also known as a filling cystometry, is a diagnostic procedure where a catheter is inserted into the bladder, and the bladder is filled with a liquid to measure how much it can hold (residual volume) and how it responds to being filled (like during a cough or sneeze). This helps in assessing the capacity and compliance of the bladder.
In a patient with stress incontinence, the bladder's capacity might be normal, but the sphincter's function is impaired. So, during the cystometry, the residual volume might be within normal limits because the bladder isn't overfilled. However, when the patient is asked to cough or perform a Valsalva maneuver, the detrusor muscle (the smooth muscle layer of the bladder) might not contract effectively, leading to an increase in intra-abdominal pressure, which might cause leakage.
Wait, but detrusor contractions are usually associated with voiding. In stress incontinence, the issue isn't with the detrusor contractions but with the sphincter's inability to prevent leakage. So, during cystometry, the detrusor contractions would be normal because they are part of the normal voiding process. However, the problem is that the sphincter doesn't close properly, leading to leakage.
So, putting it all together, the residual volume might be normal, but the detrusor contractions would be normal as well. The key finding would be the impaired sphincter function leading to incontinence, which is typically demonstrated during the Q-tip test and clinical history. Therefore, the cystometry would likely show normal residual volume and normal detrusor contractions, but the underlying issue is the sphincter's inability to prevent leakage.
</think>
Based on the provided information, the cystometry findings in this 61-year-old woman with stress urinary incontinence would likely demonstrate the following:
1. **Residual Volume**: The residual volume would be within normal limits. This is because the bladder's capacity is typically normal in cases of stress incontinence, where the primary issue lies with the sphincter function rather than the bladder's capacity.
2. **Detrusor Contractions**: The detrusor contractions would also be normal. These contractions are part of the normal voiding process and are not impaired in stress urinary incontinence. The issue is not with the detrusor muscle but with the sphincter's inability to prevent leakage.
In summary, the key findings of the cystometry would be normal residual volume and normal detrusor contractions, highlighting the sphincteric defect as the underlying cause of the incontinence.<|end▁of▁sentence|>
4. डेटासेट लोड और प्रोसेस करना
डेटासेट प्रोसेसिंग के लिए हम प्रॉम्प्ट शैली में थोड़ा परिवर्तन करेंगे—कॉम्प्लेक्स चेन-ऑफ-थॉट कॉलम के लिए तीसरा प्लेसहोल्डर जोड़ेंगे।
train_prompt_style = """Below is an instruction that describes a task, paired with an input that provides further context.
Write a response that appropriately completes the request.
Before answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.
### Instruction:
You are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning.
Please answer the following medical question.
### Question:
{}
### Response:
<think>
{}
</think>
{}"""
वह Python फ़ंक्शन लिखें जो डेटासेट में एक "text" कॉलम बनाए—जो ट्रेन प्रॉम्प्ट शैली से बना हो। प्लेसहोल्डर्स को प्रश्नों, चेन-ऑफ-टेक्स्ट और उत्तरों से भरें।
EOS_TOKEN = tokenizer.eos_token # Must add EOS_TOKEN
def formatting_prompts_func(examples):
inputs = examples["Question"]
cots = examples["Complex_CoT"]
outputs = examples["Response"]
texts = []
for input, cot, output in zip(inputs, cots, outputs):
text = train_prompt_style.format(input, cot, output) + EOS_TOKEN
texts.append(text)
return {
"text": texts,
}
हम Hugging Face हब पर उपलब्ध FreedomIntelligence/medical-o1-reasoning-SFT डेटासेट से पहले 500 सैंपल लोड करेंगे। उसके बाद, हम formatting_prompts_func फ़ंक्शन का उपयोग करके text कॉलम मैप करेंगे।
from datasets import load_dataset
dataset = load_dataset("FreedomIntelligence/medical-o1-reasoning-SFT","en", split = "train[0:500]",trust_remote_code=True)
dataset = dataset.map(formatting_prompts_func, batched = True,)
dataset["text"][0]
जैसा कि हम देख सकते हैं, text कॉलम में सिस्टम प्रॉम्प्ट, निर्देश, चेन-ऑफ-थॉट और उत्तर शामिल हैं।
"Below is an instruction that describes a task, paired with an input that provides further context. \nWrite a response that appropriately completes the request. \nBefore answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.\n\n### Instruction:\nYou are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning. \nPlease answer the following medical question. \n\n### Question:\nA 61-year-old woman with a long history of involuntary urine loss during activities like coughing or sneezing but no leakage at night undergoes a gynecological exam and Q-tip test. Based on these findings, what would cystometry most likely reveal about her residual volume and detrusor contractions?\n\n### Response:\n<think>\nOkay, let's think about this step by step. There's a 61-year-old woman here who's been dealing with involuntary urine leakages whenever she's doing something that ups her abdominal pressure like coughing or sneezing. This sounds a lot like stress urinary incontinence to me. Now, it's interesting that she doesn't have any issues at night; she isn't experiencing leakage while sleeping. This likely means her bladder's ability to hold urine is fine when she isn't under physical stress. Hmm, that's a clue that we're dealing with something related to pressure rather than a bladder muscle problem. \n\nThe fact that she underwent a Q-tip test is intriguing too. This test is usually done to assess urethral mobility. In stress incontinence, a Q-tip might move significantly, showing urethral hypermobility. This kind of movement often means there's a weakness in the support structures that should help keep the urethra closed during increases in abdominal pressure. So, that's aligning well with stress incontinence.\n\nNow, let's think about what would happen during cystometry. Since stress incontinence isn't usually about sudden bladder contractions, I wouldn't expect to see involuntary detrusor contractions during this test. Her bladder isn't spasming or anything; it's more about the support structure failing under stress. Plus, she likely empties her bladder completely because stress incontinence doesn't typically involve incomplete emptying. So, her residual volume should be pretty normal. \n\nAll in all, it seems like if they do a cystometry on her, it will likely show a normal residual volume and no involuntary contractions. Yup, I think that makes sense given her symptoms and the typical presentations of stress urinary incontinence.\n</think>\nCystometry in this case of stress urinary incontinence would most likely reveal a normal post-void residual volume, as stress incontinence typically does not involve issues with bladder emptying. Additionally, since stress urinary incontinence is primarily related to physical exertion and not an overactive bladder, you would not expect to see any involuntary detrusor contractions during the test.<|end▁of▁sentence|>"
5. मॉडल सेटअप करना
टार्गेट मॉड्यूल्स का उपयोग करते हुए, हम मॉडल में लो-रैंक अडॉप्टर जोड़कर सेटअप करेंगे।
model = FastLanguageModel.get_peft_model(
model,
r=16,
target_modules=[
"q_proj",
"k_proj",
"v_proj",
"o_proj",
"gate_proj",
"up_proj",
"down_proj",
],
lora_alpha=16,
lora_dropout=0,
bias="none",
use_gradient_checkpointing="unsloth", # True or "unsloth" for very long context
random_state=3407,
use_rslora=False,
loftq_config=None,
)
अगले चरण में, हम मॉडल, टोकनाइज़र, डेटासेट और अन्य महत्वपूर्ण ट्रेनिंग पैरामीटर्स प्रदान कर प्रशिक्षण आर्ग्यूमेंट्स तथा ट्रेनर सेट करेंगे, ताकि हमारा फाइन-ट्यूनिंग प्रोसेस ऑप्टिमाइज़ हो।
from trl import SFTTrainer
from transformers import TrainingArguments
from unsloth import is_bfloat16_supported
trainer = SFTTrainer(
model=model,
tokenizer=tokenizer,
train_dataset=dataset,
dataset_text_field="text",
max_seq_length=max_seq_length,
dataset_num_proc=2,
args=TrainingArguments(
per_device_train_batch_size=2,
gradient_accumulation_steps=4,
# Use num_train_epochs = 1, warmup_ratio for full training runs!
warmup_steps=5,
max_steps=60,
learning_rate=2e-4,
fp16=not is_bfloat16_supported(),
bf16=is_bfloat16_supported(),
logging_steps=10,
optim="adamw_8bit",
weight_decay=0.01,
lr_scheduler_type="linear",
seed=3407,
output_dir="outputs",
),
)
6. मॉडल प्रशिक्षण
ट्रेनिंग शुरू करने के लिए निम्न कमांड चलाएँ।
trainer_stats = trainer.train()
ट्रेनिंग प्रक्रिया 44 मिनट में पूरी हुई। ट्रेनिंग लॉस धीरे-धीरे कम हुआ, जो बेहतर मॉडल प्रदर्शन का अच्छा संकेत है।

आप Weights and Biases डैशबोर्ड पर पूर्ण मॉडल मूल्यांकन रिपोर्ट देख सकते हैं—वेबसाइट में लॉगिन कर प्रोजेक्ट देखें।

यदि आपको ऊपर दिया गया कोड चलाने में समस्या आती है, तो Fine-tuning DeepSeek R1 (Reasoning Model) Kaggle नोटबुक देखें।
7. फाइन-ट्यूनिंग के बाद मॉडल इन्फेरेंस
तुलना करने के लिए, हम फाइन-ट्यून किए गए मॉडल से वही प्रश्न पूछेंगे और देखेंगे कि क्या बदला है।
question = "A 61-year-old woman with a long history of involuntary urine loss during activities like coughing or sneezing but no leakage at night undergoes a gynecological exam and Q-tip test. Based on these findings, what would cystometry most likely reveal about her residual volume and detrusor contractions?"
FastLanguageModel.for_inference(model) # Unsloth has 2x faster inference!
inputs = tokenizer([prompt_style.format(question, "")], return_tensors="pt").to("cuda")
outputs = model.generate(
input_ids=inputs.input_ids,
attention_mask=inputs.attention_mask,
max_new_tokens=1200,
use_cache=True,
)
response = tokenizer.batch_decode(outputs)
print(response[0].split("### Response:")[1])
यह पहले से कहीं बेहतर और अधिक सटीक है। चेन-ऑफ-थॉट सीधी थी और उत्तर एक ही अनुच्छेद में स्पष्ट था। फाइन-ट्यूनिंग सफल रही।
<think>
Okay, so let's think about this. We have a 61-year-old woman who's been dealing with involuntary urine loss during things like coughing or sneezing, but she's not leaking at night. That suggests she might have some kind of problem with her pelvic floor muscles or maybe her bladder.
Now, she's got a gynecological exam and a Q-tip test. Let's break that down. The Q-tip test is usually used to check for urethral obstruction. If it's positive, that means there's something blocking the urethra, like a urethral stricture or something else.
Given that she's had a positive Q-tip test, it's likely there's a urethral obstruction. That would mean her urethra is narrow, maybe due to a stricture or some kind of narrowing. So, her bladder can't empty properly during activities like coughing because the urethral obstruction is making it hard.
Now, let's think about what happens when her bladder can't empty. If there's a urethral obstruction, the bladder is forced to hold more urine, increasing the residual volume. That's because her bladder doesn't empty completely. So, her residual volume is probably increased.
Also, if her bladder can't empty properly, she might have increased detrusor contractions. These contractions are usually stronger to push the urine out. So, we expect her detrusor contractions to be increased.
Putting it all together, if she has a urethral obstruction and a positive Q-tip test, we'd expect her cystometry results to show increased residual volume and increased detrusor contractions. That makes sense because of the obstruction and how her bladder is trying to compensate by contracting more.
</think>
Based on the findings of the gynecological exam and the positive Q-tip test, it is most likely that the cystometry would reveal increased residual volume and increased detrusor contractions. The positive Q-tip test indicates urethral obstruction, which would force the bladder to retain more urine, thereby increasing the residual volume. Additionally, the obstruction can lead to increased detrusor contractions as the bladder tries to compensate by contracting more to expel the urine.<|end▁of▁sentence|>
8. मॉडल को स्थानीय रूप से सहेजना
अब, अडॉप्टर, फुल मॉडल और टोकनाइज़र को लोकल में सहेजते हैं ताकि हम इन्हें अन्य प्रोजेक्ट्स में उपयोग कर सकें।
new_model_local = "DeepSeek-R1-Medical-COT"
model.save_pretrained(new_model_local)
tokenizer.save_pretrained(new_model_local)
model.save_pretrained_merged(new_model_local, tokenizer, save_method = "merged_16bit",)

9. मॉडल को Hugging Face हब पर पुश करना
हम अडॉप्टर, टोकनाइज़र और मॉडल को Hugging Face हब पर भी पुश करेंगे, ताकि एआई समुदाय इसे अपने सिस्टम में एकीकृत कर लाभ उठा सके।
new_model_online = "kingabzpro/DeepSeek-R1-Medical-COT"
model.push_to_hub(new_model_online)
tokenizer.push_to_hub(new_model_online)
model.push_to_hub_merged(new_model_online, tokenizer, save_method = "merged_16bit")

स्रोत: kingabzpro/DeepSeek-R1-Medical-COT · Hugging Face
आपकी लर्निंग यात्रा का अगला चरण है—अपने मॉडल को क्लाउड पर सर्व करना और डिप्लॉय करना। इसके लिए How to Deploy LLMs with BentoML गाइड का पालन करें, जो BentoML और vLLM जैसे टूल्स की मदद से बड़े भाषा मॉडलों को कुशलतापूर्वक और किफ़ायती तरीके से डिप्लॉय करने की स्टेप-बाय-स्टेप प्रक्रिया बताता है।
वैकल्पिक रूप से, यदि आप मॉडल को लोकल में उपयोग करना चाहते हैं, तो आप इसे GGUF फ़ॉर्मैट में कन्वर्ट कर अपनी मशीन पर चला सकते हैं। इसके लिए Fine-tuning Llama 3.2 and Using It Locally गाइड देखें, जिसमें लोकल उपयोग के विस्तृत निर्देश दिए गए हैं।
निष्कर्ष
एआई के क्षेत्र में तेज़ी से बदलाव हो रहे हैं। ओपन-सोर्स समुदाय अब आगे आ रहा है और पिछले तीन वर्षों से एआई परिदृश्य पर हावी स्वामित्व वाले मॉडलों की वर्चस्वता को चुनौती दे रहा है।
ओपन-सोर्स बड़े भाषा मॉडल (LLMs) और भी बेहतर, तेज़ और अधिक कुशल हो रहे हैं—जिससे कम कंप्यूट और मेमोरी संसाधनों पर इन्हें फाइन-ट्यून करना पहले से कहीं आसान हुआ है।
इस ट्यूटोरियल में, हमने DeepSeek R1 रीज़निंग मॉडल की पड़ताल की और इसके डिस्टिल्ड संस्करण को मेडिकल Q&A कार्यों के लिए फाइन-ट्यून करना सीखा। एक फाइन-ट्यून किया हुआ रीज़निंग मॉडल न केवल प्रदर्शन बढ़ाता है, बल्कि चिकित्सा, आपातकालीन सेवाओं और स्वास्थ्य सेवा जैसे महत्वपूर्ण क्षेत्रों में अनुप्रयोगों को सक्षम भी बनाता है।
DeepSeek R1 के लॉन्च का जवाब देने के लिए, OpenAI ने दो शक्तिशाली टूल पेश किए हैं: OpenAI का o3—एक अधिक उन्नत रीज़निंग मॉडल—और OpenAI का Operator एआई एजेंट, जो नए Computer-Using Agent (CUA) मॉडल से संचालित है और स्वायत्त रूप से वेबसाइट नेविगेट कर कार्य कर सकता है।
एक प्रमाणित डेटा साइंटिस्ट के रूप में, मैं अत्याधुनिक तकनीक का उपयोग करके नवाचारी मशीन लर्निंग अनुप्रयोग बनाने के लिए उत्साहित रहता/रहती हूँ। स्पीच रिकॉग्निशन, डेटा विश्लेषण और रिपोर्टिंग, MLOps, संवादात्मक AI और NLP में मजबूत पृष्ठभूमि के साथ, मैंने ऐसे बुद्धिमान सिस्टम विकसित करने में अपनी विशेषज्ञता निखारी है जो वास्तविक प्रभाव डाल सकें। तकनीकी दक्षता के अलावा, मैं जटिल अवधारणाओं को स्पष्ट और संक्षिप्त भाषा में प्रस्तुत करने में भी निपुण हूँ। परिणामस्वरूप, मैं डेटा साइंस पर एक मांग में रहने वाला/वाली ब्लॉगर बन गया/गई हूँ, और डेटा प्रोफेशनलों के बढ़ते समुदाय के साथ अपने अनुभव और विचार साझा करता/करती हूँ। वर्तमान में, मैं कंटेंट निर्माण और संपादन पर केंद्रित हूँ, बड़े भाषा मॉडलों के साथ काम करते हुए ऐसा प्रभावशाली और आकर्षक कंटेंट विकसित कर रहा/रही हूँ जो व्यवसायों और व्यक्तियों दोनों को अपने डेटा का अधिकतम लाभ उठाने में मदद कर सके।

DeepSeek ने एआई परिदृश्य में हलचल मचा दी है—उन्नत रीज़निंग मॉडलों की नई श्रृंखला लॉन्च कर OpenAI की बढ़त को चुनौती दी है। सबसे अच्छी बात? ये मॉडल पूरी तरह निःशुल्क हैं और इन पर कोई पाबंदी नहीं है, इसलिए हर कोई इनका उपयोग कर सकता है। नीचे आप DeepSeek को फाइन-ट्यून करने पर हमारा वीडियो ट्यूटोरियल देख सकते हैं।