फाइन-ट्यूनिंग के तरीके

Python में LLMs का परिचय

Jasmin Ludolf

Senior Data Science Content Developer, DataCamp

फाइन-ट्यूनिंग

 

LLMs फाइन-ट्यूनिंग का केमिस्ट्री उपयोग-मामला

Python में LLMs का परिचय

फुल फाइन-ट्यूनिंग

 

  • पूरे मॉडल के वेट अपडेट होते हैं
  • कम्प्यूटेशनल रूप से महँगा

 

फुल फाइन-ट्यूनिंग

Python में LLMs का परिचय

पार्शियल फाइन-ट्यूनिंग

 

  • कुछ लेयर फिक्स रहती हैं
  • केवल टास्क-विशिष्ट लेयर अपडेट होती हैं

 

पार्शियल फाइन-ट्यूनिंग

Python में LLMs का परिचय

ट्रांसफर लर्निंग

 

  • एक प्री-ट्रेंड मॉडल को अलग पर संबंधित टास्क के लिए एडाप्ट किया जाता है
  • एक डोमेन का ज्ञान संबंधित डोमेन में उपयोग होता है

ट्रांसफर लर्निंग पैराडाइम

Python में LLMs का परिचय

N-shot learning

  • Zero-shot learning: कोई उदाहरण नहीं
  • One-shot learning: एक उदाहरण
  • Few-shot learning: कुछ उदाहरण
Python में LLMs का परिचय

वन-शॉट लर्निंग

from transformers import pipeline

generator = pipeline(task="sentiment-analysis", model="distilbert-base-uncased-finetuned-sst-2-english")

input_text = """
Classify the sentiment of this sentence as either Positive or Negative.
Example:
Text: "I'm feeling great today!" Sentiment: Positive
Text: "The weather today is lovely." Sentiment:
"""

result = generator(input_text, max_length=100)
print(result[0]["label"])
POSITIVE
Python में LLMs का परिचय

अभ्यास करते हैं!

Python में LLMs का परिचय

Preparing Video For Download...