Introducere în modelele de limbaj de mari dimensiuni (LLM)

Introducere în LLM-uri cu Python

Jasmin Ludolf

Senior Data Science Content Developer, DataCamp

Cunoștințe anterioare

  • Navigarea Hugging Face Hub
  • Modele de deep learning

Creier animat care citește o carte

Introducere în LLM-uri cu Python

Introducere în LLM-uri

 

Pictogramă cu un bec și un creier reprezentând înțelegerea

Introducere în LLM-uri cu Python

Introducere în LLM-uri

 

Ilustrație cu un laptop reprezentând utilizarea

Introducere în LLM-uri cu Python

Ilustrație abstractă a unui model de limbaj de mari dimensiuni

Introducere în LLM-uri cu Python

Ilustrație abstractă a unui model de limbaj de mari dimensiuni cu un balon de rezumare

Introducere în LLM-uri cu Python

Ilustrație abstractă a unui model de limbaj de mari dimensiuni cu un balon de rezumare și generare

Introducere în LLM-uri cu Python

Ilustrație abstractă a unui model de limbaj de mari dimensiuni cu baloane de rezumare, generare și traducere

Introducere în LLM-uri cu Python

Ilustrație abstractă a unui model de limbaj de mari dimensiuni cu baloane de rezumare, generare, traducere și Q&A

Logo-uri LLM

Introducere în LLM-uri cu Python

LLM-uri

 

  • Bazate pe arhitecturi de deep learning

 

  • Cel mai frecvent transformere

 

  • Rețele neuronale mari cu mulți parametri și date text

Logo Hugging Face

Introducere în LLM-uri cu Python

Utilizarea modelelor Hugging Face

from transformers import pipeline


summarizer = pipeline(task="summarization", model="facebook/bart-large-cnn")
text = "Walking amid Gion's Machiya wooden houses is a mesmerizing experience. The beautifully preserved structures exuded an old-world charm that transports visitors back in time, making them feel like they had stepped into a living museum. The glow of lanterns lining the narrow streets add to the enchanting ambiance, making each stroll a memorable journey through Japan's rich cultural history." summary = summarizer(text, max_length=50)
  • clean_up_tokenization_spaces=True: elimină spațiile albe inutile
Introducere în LLM-uri cu Python

Rezultatele modelului

print(summary)
[{'summary_text': "Gion's Machiya
  wooden houses exuded an old-world 
  charm that transports visitors back 
  in time. The glow of lanterns lining 
  the narrow streets add to the 
  enchanting ambiance, making each 
  stroll a memorable journey through 
  Japan's"}]
print(summary[0]["summary_text"])
Gion's Machiya wooden houses exuded an 
old-world charm that transports 
visitors back in time. The glow of 
lanterns lining the narrow streets add 
to the enchanting ambiance, making each 
stroll a memorable journey through 
Japan's
Introducere în LLM-uri cu Python

Urmează

 

  • Construiți pe cunoștințe existente despre LLM
  • Realizați sarcini noi
  • Înțelegeți cum sunt construite LLM-urile
  • Ajustați fin LLM-urile
  • Evaluați performanța LLM-urilor

Traseu de învățare

Introducere în LLM-uri cu Python

Să exersăm!

Introducere în LLM-uri cu Python

Preparing Video For Download...