Llama 3 के साथ काम करना
Imtihan Ahmed
Machine Learning Engineer
from llama_cpp import Llama
llm = Llama(model_path="path/to/model.gguf")
output = llm("What are some ways to improve customer retention?")


→ तथ्यपरक और संक्षिप्त होना चाहिए

→ आकर्षक और क्रिएटिव होना चाहिए
$$
$$
$$

$$
$$

मान आमतौर पर 0 और 1 के बीच होते हैं
Low temperature (जैसे 0 के पास):
A smartwatch with a heart rate monitor, GPS, and a long-lasting battery
for all-day tracking.
Your personal fitness coach on your wrist - track every heartbeat, every step,
and every adventure without limits.
Llama कितने सबसे सम्भावित शब्दों में से चुन सकता है, इसे सीमित करता है
Low k value (जैसे, 1):
Track fitness, stream music, and receive notifications with our sleek smartwatch.
High k value (जैसे, 50):
Experience the future with our cutting-edge smartwatch, featuring fitness tracking, music streaming, customizable notifications, personalized insights, and seamless smartphone integration always.
कॉन्फिडेंस के आधार पर आउटपुट शब्दों के चयन को नियंत्रित करता है
High top-p value (जैसे, 1 के पास):
Stay connected with our sleek smartwatch, featuring fitness tracking,
music, and customizable notifications, perfect for fitness
enthusiasts and busy professionals.
Low top-p value (जैसे, 0 के पास):
Smartwatch with fitness tracking and music control, perfect for workouts.
टोकन की गिनती—शब्दों की इकाइयाँ—जो प्रतिक्रिया में होती हैं
Low max_tokens मान:
Stay connected with our sleek smartwatch, featuring fitness tracking
and music control.
Stay connected with our sleek smartwatch, featuring fitness tracking,
music control, customizable notifications, and seamless smartphone
integration. Monitor your health, track your progress, and receive
alerts on your wrist. Perfect for fitness enthusiasts.
llm = Llama(model_path="path/to/model.gguf") output_concise = llm( "Describe an electric car.",temperature=0.2,top_k=1,top_p=0.4,max_tokens=20)
A fast, eco-friendly electric car with a long range and cutting-edge technology.
output_creative = llm( "Describe an electric car.",temperature=0.8,top_k=10,top_p=0.9,max_tokens=100)
Glide into the future with an electric car that blends speed, luxury,
and sustainability. Silent yet powerful, it redefines the road ...
Llama 3 के साथ काम करना