Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Large Language Models: From Prototype to Produc...

Large Language Models: From Prototype to Production (PyData London keynote)

Large Language Models (LLMs) have shown some impressive capabilities and their impact is the topic of the moment. What will the future look like? Are we going to only talk to bots? Will prompting replace programming? Or are we just hyping up unreliable parrots and burning money? In this talk, I'll present visions for NLP in the age of LLMs and a pragmatic, practical approach for how to use Large Language Models to ship more successful NLP projects from prototype to production today.

Ines Montani

June 03, 2023
Tweet

More Decks by Ines Montani

Other Decks in Technology

Transcript

  1. Ines Montani Explosion LARGE LANGUAGE LARGE LANGUAGE MODELS ✨ CHATGPT

    " ARTIFICIAL INTELLIGENCE # MACHINE LEARNING ✨ PROTOTYPE TO PRODUCTION MODELS FROM LLAMA $ NATURAL LANGUAGE PROCESSING % ✨ OPEN SOURCE & PYTHON ' PROMPT ENGINEERING ⚙ ZERO-SHOT LEARNING ) GPT-4 EVALUATION * COPILOT + GENERATIVE AI , Ines Montani - Explosion
  2. SPACY SPACY.IO & @SPACY_IO ✍ SPACY.TV / GITHUB.COM/EXPLOSION/SPACY Open-source library

    for industrial-strength Natural Language Processing 140m+ downloads
  3. SPACY SPACY.IO & @SPACY_IO ✍ SPACY.TV / GITHUB.COM/EXPLOSION/SPACY Open-source library

    for industrial-strength Natural Language Processing 140m+ downloads ChatGPT can write spaCy code!
  4. PRODIGY Modern scriptable annotation tool for machine learning developers PRODIGY.AI

    & GITHUB.COM/EXPLOSION/PRODIGY-RECIPES 8k+ users 700+ companies
  5. PRODIGY Modern scriptable annotation tool for machine learning developers PRODIGY.AI

    & GITHUB.COM/EXPLOSION/PRODIGY-RECIPES 8k+ users 700+ companies
  6. NLP IN THE AGE OF LLMS SQL is all you

    need dialogue is all you need 0 %
  7. NLP IN THE AGE OF LLMS SQL is all you

    need dialogue is all you need 0 % lots of humans is all you need prompting is all you need 1 "
  8. VISION #1 dialogue is all you need % 2 LLM

    3 user actions or information natural language input
  9. VISION #1 dialogue is all you need % 2 LLM

    3 user actions or information natural language input LLM is the system and needs to manage the whole interaction
  10. VISION #2 prompting is all you need " 2 LLM

    4 text % prompt 5 system 3 user 6 structured data
  11. VISION #2 prompting is all you need " 2 LLM

    4 text % prompt 5 system 3 user LLM replaces the specific ML model 6 structured data
  12. VISION #3 modern practical NLP - 7 developer 8 code

    2 LLM 9 training data 5 system 3 user 6 structured data ⚙ ML system
  13. VISION #3 modern practical NLP - 7 developer 8 code

    2 LLM 9 training data 5 system 3 user 6 structured data ⚙ ML system LLM helps with building the pipeline
  14. VISION #3 modern practical NLP - 7 developer 8 code

    2 LLM 9 training data 5 system 3 user 6 structured data ⚙ ML system LLM helps with building the pipeline
  15. VISION #3 modern practical NLP - 7 developer 8 code

    2 LLM 9 training data 5 system 3 user 6 structured data ⚙ ML system LLM helps with building the pipeline
  16. COMPANY COMPANY MONEY INVESTOR “Hooli raises $5m to revolutionize search,

    led by ACME Ventures” 5923214 1681056 CLASSIC NLP PROBLEM: EXTRACT STRUCTURED DATA Database
  17. Database CLASSIC NLP PROBLEM: EXTRACT STRUCTURED DATA named entity recognition

    entity disambiguation custom database lookup currency normalization
  18. Database CLASSIC NLP PROBLEM: EXTRACT STRUCTURED DATA named entity recognition

    entity disambiguation custom database lookup currency normalization entity relation extraction
  19. Database CLASSIC NLP PROBLEM: EXTRACT STRUCTURED DATA named entity recognition

    entity disambiguation custom database lookup currency normalization entity relation extraction 6 structured data 2 LLM 7 developer quick prototype
  20. Database CLASSIC NLP PROBLEM: EXTRACT STRUCTURED DATA named entity recognition

    entity disambiguation custom database lookup currency normalization entity relation extraction 6 structured data 2 LLM 7 developer quick prototype ⚡ fast to develop, slow to run, hard to improve
  21. NLP IN THE AGE OF LLMS SQL is all you

    need dialogue is all you need 0 % lots of humans is all you need prompting is all you need 1 " modern practical NLP -
  22. NLP IN THE AGE OF LLMS SQL is all you

    need dialogue is all you need 0 % lots of humans is all you need prompting is all you need 1 " modern practical NLP - structured data
  23. NLP IN THE AGE OF LLMS SQL is all you

    need dialogue is all you need 0 % lots of humans is all you need prompting is all you need 1 " modern practical NLP - structured data humans in the loop
  24. NLP IN THE AGE OF LLMS SQL is all you

    need dialogue is all you need 0 % lots of humans is all you need prompting is all you need 1 " modern practical NLP - structured data fast prototyping humans in the loop
  25. NLP IN THE AGE OF LLMS SQL is all you

    need dialogue is all you need 0 % lots of humans is all you need prompting is all you need 1 " modern practical NLP - structured data fast prototyping humans in the loop powered by open source
  26. NLP IN THE AGE OF LLMS SQL is all you

    need dialogue is all you need 0 % lots of humans is all you need prompting is all you need 1 " modern practical NLP - structured data fast prototyping humans in the loop powered by open source conversational and graphical interfaces
  27. NLP IN THE AGE OF LLMS SQL is all you

    need dialogue is all you need 0 % lots of humans is all you need prompting is all you need 1 " modern practical NLP - structured data fast prototyping humans in the loop powered by open source robust evaluation conversational and graphical interfaces
  28. A CASE FOR LLM PRAGMATISM EXPLOSION.AI/BLOG/AGAINST-LLM-MAXIMALISM NOOO YOU CAN'T JUST

    MIX UP ALL THE STEPS OF YOUR TASK AND ASK AN LLM TO DO IT ALL. HOW WILL YOU EVER MAKE A RELIABLE AND EXTENSIBLE SYSTEM THAT WAY? HAHA LLM GO BRRR
  29. A CASE FOR LLM PRAGMATISM EXPLOSION.AI/BLOG/AGAINST-LLM-MAXIMALISM NOOO YOU CAN'T JUST

    MIX UP ALL THE STEPS OF YOUR TASK AND ASK AN LLM TO DO IT ALL. HOW WILL YOU EVER MAKE A RELIABLE AND EXTENSIBLE SYSTEM THAT WAY? HAHA LLM GO BRRR avoid coupling prediction tasks to arbitrary business logic
  30. A CASE FOR LLM PRAGMATISM EXPLOSION.AI/BLOG/AGAINST-LLM-MAXIMALISM NOOO YOU CAN'T JUST

    MIX UP ALL THE STEPS OF YOUR TASK AND ASK AN LLM TO DO IT ALL. HOW WILL YOU EVER MAKE A RELIABLE AND EXTENSIBLE SYSTEM THAT WAY? HAHA LLM GO BRRR avoid coupling prediction tasks to arbitrary business logic design modular solutions
  31. A CASE FOR LLM PRAGMATISM EXPLOSION.AI/BLOG/AGAINST-LLM-MAXIMALISM NOOO YOU CAN'T JUST

    MIX UP ALL THE STEPS OF YOUR TASK AND ASK AN LLM TO DO IT ALL. HOW WILL YOU EVER MAKE A RELIABLE AND EXTENSIBLE SYSTEM THAT WAY? HAHA LLM GO BRRR avoid coupling prediction tasks to arbitrary business logic design modular solutions prototype modules with LLMs
  32. A CASE FOR LLM PRAGMATISM EXPLOSION.AI/BLOG/AGAINST-LLM-MAXIMALISM NOOO YOU CAN'T JUST

    MIX UP ALL THE STEPS OF YOUR TASK AND ASK AN LLM TO DO IT ALL. HOW WILL YOU EVER MAKE A RELIABLE AND EXTENSIBLE SYSTEM THAT WAY? HAHA LLM GO BRRR avoid coupling prediction tasks to arbitrary business logic design modular solutions prototype modules with LLMs evaluate alternatives
  33. TRADE-OFFS Supervised 1 LLM 2 accuracy words/s accuracy words/s Textcat

    on SST2 (Stanford Sentiment Treebank) 0.9 4019 0.9 <100 Textcat on Banking77 (intent recognition) 0.9 3234 0.7 <100 NER on AnEm (anatomical entity mentions) 0.7 5146 0.1 <100 1. RoBERTa-base with spaCy, 2. text-davinci-003 zero-shot ongoing experiments comparing LLMS to task-specific models performance on the bar exam kentlaw.iit.edu OpenAI API latency promptlayer.com
  34. LLM-POWERED NLP IN PRACTICE LLM-powered collaborative data development environment 7

    Assign labeling tasks to LLMs " Review label decisions, correct errors ;
  35. LLM-POWERED NLP IN PRACTICE LLM-powered collaborative data development environment 7

    Assign labeling tasks to LLMs " Review label decisions, correct errors ; Tune prompts and compare LLMs empirically 6
  36. LLM-POWERED NLP IN PRACTICE LLM-powered collaborative data development environment 7

    Assign labeling tasks to LLMs " Review label decisions, correct errors ; Tune prompts and compare LLMs empirically 6 Build data sets to train and evaluate e icient, production-ready pipelines +
  37. THANK YOU! - Explosion – explosion.ai < spaCy – spacy.io

    ✨ Prodigy – prodigy.ai = Twitter – @_inesmontani > Mastodon – @[email protected] ? LinkedIn