How to use the Llama 2 LLM in Python

  Рет қаралды 104,205

Data Professor

Data Professor

10 ай бұрын

In this video, you'll learn how to use the Llama 2 in Python. Llama 2 is an open source large language model created by Meta AI . The LLM model used in this tutorial is hosted on the Replicate platform.
⭐️ Watch this video on how to build a Llama 2 chatbot app using @streamlitofficial • How to build a Llama 2...
📒 Jupyter notebook github.com/dataprofessor/llama2
🛠️ Tutorial blog on building the Llama 2 chatbot blog.streamlit.io/how-to-buil...
🔗 Llama 2 release note ai.meta.com/llama/
🦙 Llama 2 model (7B) on Replicate replicate.com/a16z-infra/llam...
🦙 Llama 2 model (13B) on Replicate replicate.com/a16z-infra/llam...
🦙 Llama 2 model (70B) on Replicate replicate.com/replicate/llama...
Support my work:
👪 Join as Channel Member:
/ @dataprofessor
✉️ Newsletter newsletter.dataprofessor.org
📖 Join Medium to Read my Blogs / membership
☕ Buy me a coffee www.buymeacoffee.com/dataprof...
Recommended Resources
📚 Books kit.co/dataprofessor
😎 Taro (Tech Career Mentorship) www.jointaro.com/r/dataprofes...
📜 Google Data Analytics Professional Certificate click.linksynergy.com/deeplin...
🤔 Interview Query www.interviewquery.com/?ref=d...
🖥️ Stock photos, graphics and videos used on this channel 1.envato.market/c/2346717/628...
Subscribe:
🌟 Coding Professor / @codingprofessor
🌟 Data Professor kzbin.info...
Disclaimer:
Recommended books and tools are affiliate links that gives me a portion of sales at no cost to you, which will contribute to the improvement of this channel's contents.
#datascience #machinelearning #dataprofessor

Пікірлер: 43
@vihaanravishankar5189
@vihaanravishankar5189 9 ай бұрын
how do i get an API Key
@hukushmolambi8355
@hukushmolambi8355 10 ай бұрын
Just began with Python and I'm finding it surprisingly accessible. The syntax is so simple, perfect for beginners in programming like myself. Furthermore, the applicability of Python in numerous areas is astounding.
@DheemanSaha
@DheemanSaha 8 ай бұрын
It's a high level language that's the reason
@vd.se.17
@vd.se.17 7 ай бұрын
Hello, I have question regarding the hardware for LLM transfer learning. If I want to use the pre trained LLM model, and do transfer learning on related domain data. How much system RAM I required? and, how much vRAM required for the gpu? (I want to do the transfer learning only, not want to trained LLM from scratch). Thank you for your valuable time.
@user-dx7kn6id5x
@user-dx7kn6id5x 8 ай бұрын
Where does we get "llm model path" which you have mentioned inside the output=replicate.run() ??
@dakshbhatnagar
@dakshbhatnagar 9 ай бұрын
Hey, Will I have to get some permission to the model by filling out a form or can I just go register on their website and then I simply have the access??
@Dimension2364
@Dimension2364 8 ай бұрын
Very good video and explanation Thank you for sharing!
@bourbe
@bourbe 9 ай бұрын
Hello, 1 request on gpt 3.5 turbo cost is 0.0036$ , what is the cost of one resuest for replicate pls ?
@abseed1
@abseed1 4 ай бұрын
That is great Many thanks.
@codeWith.Sam_
@codeWith.Sam_ 7 ай бұрын
how did he get the api key?
@chintusharma1
@chintusharma1 8 ай бұрын
Thank you.
@TriDoHuu
@TriDoHuu 4 ай бұрын
So underrated channels!!!
@DataProfessor
@DataProfessor 4 ай бұрын
Thanks!
@waterbottleart2662
@waterbottleart2662 10 ай бұрын
Hey I downloaded the 70B-chat and if gave me a bunch of consolidate files. is there a way to use it locally not with colab or replicate?
@DataProfessor
@DataProfessor 10 ай бұрын
Hi, yes it can be used locally but may require a high-end PC as the computation would require a lot of computational resource.
@RoungYul
@RoungYul 10 ай бұрын
@@DataProfessor The same confusion can you let us know how we can use it as I,m a Linux user.
@DataProfessor
@DataProfessor 10 ай бұрын
@@RoungYul Hi, the code in this tutorial can be used in a Python environment on all OS via replicate.
@DemoGPT
@DemoGPT 10 ай бұрын
Your video is amazing, and I'm grateful for your effort. Are you thinking of making a video about DemoGPT?
@martinjolivares1
@martinjolivares1 6 ай бұрын
Hi, how can I use llama2 on a react project?
@jennilthiyam1261
@jennilthiyam1261 6 ай бұрын
how to have llama-2 on my local system to have interactive conversation. In almost all videos available in youtube, they talked about only one time interaction, and not like conversation. I have GPU system, and I can setup llama 2 model, but i want the model to be able to have interactive conversation.
@ggopi767
@ggopi767 10 ай бұрын
Just a small doubt, so we don't need to download llama model and can run without downloading the model?
@DataProfessor
@DataProfessor 10 ай бұрын
Yes, the model is cloud hosted on Replicate and it works in a similar fashion to OpenAI models where we perform API calls to access the model and generate a response.
@user-yl7ub4hl2p
@user-yl7ub4hl2p 4 ай бұрын
import os os.environ["REPLICATE_API_TOKEN"] = "r8_generated_token_from_replicate" ReplicateError Traceback (most recent call last) in () 1 # The meta/llama-2-70b-chat model can stream output as it's running. ----> 2 for event in replicate.stream( 3 "meta/llama-2-70b-chat", 4 input={ 5 "debug": False, 3 frames /usr/local/lib/python3.10/dist-packages/replicate/client.py in _raise_for_status(resp) 356 def _raise_for_status(resp: httpx.Response) -> None: 357 if 400 358 raise ReplicateError(resp.json()["detail"]) ReplicateError: You did not pass an authentication token @@DataProfessor
@fauzi5848
@fauzi5848 Ай бұрын
can I use other language? Javascript (Node) for example
@alikhan-jb3kl
@alikhan-jb3kl Ай бұрын
Hello Professor kindly make video on LLma for bioinformatics problem
@serychristianrenaud
@serychristianrenaud 10 ай бұрын
❤ thank
@ToluOnawole
@ToluOnawole 10 ай бұрын
Thanks for your video but couldn't find the link to download the notebook
@DataProfessor
@DataProfessor 10 ай бұрын
Hi, thanks for the reminder, it's available at the GH repo here github.com/dataprofessor/llama2
@PANDURANG99
@PANDURANG99 3 ай бұрын
Is this safe for security reasons, that our data will not be shared
@aiwithak256
@aiwithak256 10 ай бұрын
Best 💯
@gracengari303
@gracengari303 10 ай бұрын
hae plz do a video on sql injection tutorial ur content is always lit and easy to follow
@cartoonchan182
@cartoonchan182 10 ай бұрын
I would say the same too... Out of everyone tech tutorial in yt your channel is the easiest to follow and really a great place to start learning new concepts
@EshSL
@EshSL 9 ай бұрын
will this cost money after time to run?
@DataProfessor
@DataProfessor 9 ай бұрын
Yes, each run will be charged in a similar fashion to using a similar service like OpenAI
@AeroJules
@AeroJules Ай бұрын
And... How do you get an API key ??
@quantumbyte-studios
@quantumbyte-studios 3 ай бұрын
Is Replicate free?
@user-yl7ub4hl2p
@user-yl7ub4hl2p 4 ай бұрын
ReplicateError: You did not pass an authentication token this is after generating the new token
@jodter1
@jodter1 2 ай бұрын
and local ?
@DataProfessor
@DataProfessor 2 ай бұрын
Check out this video for How to use Llama2 locally kzbin.info/www/bejne/qXu9ZHxjd9iffrs
@merlecarey2392
@merlecarey2392 9 ай бұрын
Promo*SM
@susi2rekavasas136
@susi2rekavasas136 9 ай бұрын
why is your voice like duffy duck man
Llama 3 Fine Tuning for Dummies (with 16k, 32k,... Context)
23:16
Nodematic Tutorials
Рет қаралды 16 М.
Indian sharing by Secret Vlog #shorts
00:13
Secret Vlog
Рет қаралды 55 МЛН
Chips evolution !! 😔😔
00:23
Tibo InShape
Рет қаралды 42 МЛН
How I prepare to meet the brothers Mbappé.. 🙈 @KylianMbappe
00:17
Celine Dept
Рет қаралды 55 МЛН
Build Anything with Llama 3 Agents, Here’s How
12:23
David Ondrej
Рет қаралды 101 М.
How to Improve LLMs with RAG (Overview + Python Code)
21:41
Shaw Talebi
Рет қаралды 19 М.
How OpenAI’s Board Learned About the Launch of ChatGPT
3:13
Bloomberg Technology
Рет қаралды 3,9 М.
What is LangChain?
8:08
IBM Technology
Рет қаралды 131 М.
The easiest way to chat with Knowledge Graph using LLMs (python tutorial)
18:35
Llama - EXPLAINED!
11:44
CodeEmporium
Рет қаралды 24 М.
What is Retrieval-Augmented Generation (RAG)?
6:36
IBM Technology
Рет қаралды 516 М.
Xiaomi Note 13 Pro по безумной цене в России
0:43
Простые Технологии
Рет қаралды 1,9 МЛН
Куда пропал 3D Touch? #apple #iphone
0:51
Не шарю!
Рет қаралды 822 М.
📱 SAMSUNG, ЧТО С ЛИЦОМ? 🤡
0:46
Яблочный Маньяк
Рет қаралды 1,7 МЛН
Выложил СВОЙ АЙФОН НА АВИТО #shorts
0:42
Дмитрий Левандовский
Рет қаралды 1,4 МЛН