Introduction aux grands modèles de langage (LLM)

Introduction aux LLM en Python

Jasmin Ludolf

Senior Data Science Content Developer, DataCamp

Connaissances préalables

  • Naviguer dans le Hub Hugging Face
  • Modèles d'apprentissage profond

Cartoon brain reading a book

Introduction aux LLM en Python

Introduction aux LLM

 

Icon of a lightbulb and brain to represent understanding

Introduction aux LLM en Python

Introduction aux LLM

 

Illustration of laptop to represent using

Introduction aux LLM en Python

Abstract illustration of a large language model

Introduction aux LLM en Python

Abstract illustration of a large language model with a summarize bubble

Introduction aux LLM en Python

Abstract illustration of a large language model with a summarize and generate bubble

Introduction aux LLM en Python

Abstract illustration of a large language model with a summarize, generate, and translate bubble

Introduction aux LLM en Python

Abstract illustration of a large language model with a summarize, generate, translate, Q&A bubble

LLM logos

Introduction aux LLM en Python

LLM

 

  • Basé sur des architectures de deep learning

 

  • Les transformers les plus courants

 

  • Réseaux neuronaux de grande envergure avec de nombreux paramètres et données textuelles

Hugging Face logo

Introduction aux LLM en Python

Utilisation des modèles 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 : supprimer les espaces blancs inutiles
Introduction aux LLM en Python

Résultats du modèle

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
Introduction aux LLM en Python

À suivre

 

  • Tirer parti des connaissances existantes en matière de LLM
  • Effectuer de nouvelles tâches
  • Découvrez comment les LLM sont développés
  • Affiner les LLM
  • Évaluer les performances du LLM

Learning path

Introduction aux LLM en Python

Passons à la pratique !

Introduction aux LLM en Python

Preparing Video For Download...