Slide 1

Slide 1 text

Ines Montani Explosion TOWARDS STRUCTURED LARGE LANGUAGE MODELS โœจ CHATGPT ๐Ÿค– ARTIFICIAL INTELLIGENCE ๐Ÿง  MACHINE LEARNING โœจ PROTOTYPE TO PRODUCTION LLAMA ๐Ÿฆ™ NATURAL LANGUAGE PROCESSING ๐Ÿ’ฌ โœจ OPEN SOURCE ๐ŸŒŽ PYTHON ๐Ÿ PROMPT ENGINEERING โš™ ZERO-SHOT LEARNING ๐ŸŽฏ GPT-4 EVALUATION ๐Ÿ“ˆ COPILOT ๐Ÿš€ GENERATIVE AI ๐Ÿ‘พ DATA LLMS FROM Ines Montani ๐Ÿ’ฅ Explosion

Slide 2

Slide 2 text

SPACY SPACY.IO ๐ŸŒŽ GITHUB.COM/EXPLOSION/SPACY Open-source library for industrial-strength Natural Language Processing 225m+ downloads

Slide 3

Slide 3 text

SPACY SPACY.IO ๐ŸŒŽ GITHUB.COM/EXPLOSION/SPACY Open-source library for industrial-strength Natural Language Processing 225m+ downloads ChatGPT can write spaCy code!

Slide 4

Slide 4 text

PRODIGY Modern scriptable annotation tool for machine learning developers PRODIGY.AI 10k+ users 900+ companies

Slide 5

Slide 5 text

PRODIGY Modern scriptable annotation tool for machine learning developers PRODIGY.AI 10k+ users 900+ companies

Slide 6

Slide 6 text

SOFTWARE IN INDUSTRY

Slide 7

Slide 7 text

SOFTWARE IN INDUSTRY modular ๐Ÿงฉ

Slide 8

Slide 8 text

SOFTWARE IN INDUSTRY modular ๐Ÿงฉ transparent ๐Ÿ”Ž

Slide 9

Slide 9 text

SOFTWARE IN INDUSTRY modular ๐Ÿงฉ transparent ๐Ÿ”Ž explainable ๐Ÿ”ฎ

Slide 10

Slide 10 text

SOFTWARE IN INDUSTRY modular ๐Ÿงฉ transparent ๐Ÿ”Ž explainable ๐Ÿ”ฎ ๐Ÿ”’ data-private

Slide 11

Slide 11 text

SOFTWARE IN INDUSTRY modular ๐Ÿงฉ transparent ๐Ÿ”Ž explainable ๐Ÿ”ฎ ๐Ÿ”’ data-private โœ… reliable

Slide 12

Slide 12 text

SOFTWARE IN INDUSTRY modular ๐Ÿงฉ transparent ๐Ÿ”Ž explainable ๐Ÿ”ฎ ๐Ÿ”’ data-private โœ… reliable ๐Ÿ’ธ a ff ordable

Slide 13

Slide 13 text

SOFTWARE IN INDUSTRY black-box models modular ๐Ÿงฉ transparent ๐Ÿ”Ž explainable ๐Ÿ”ฎ ๐Ÿ”’ data-private โœ… reliable ๐Ÿ’ธ a ff ordable

Slide 14

Slide 14 text

SOFTWARE IN INDUSTRY black-box models modular ๐Ÿงฉ transparent ๐Ÿ”Ž explainable ๐Ÿ”ฎ third-party APIs ๐Ÿ”’ data-private โœ… reliable ๐Ÿ’ธ a ff ordable

Slide 15

Slide 15 text

๐Ÿ“– single/multi-doc summarization โœ… problem solving โœ paraphrasing ๐Ÿงฎ reasoning ๐Ÿ–ผ style transfer Generative โ“question answering ๐Ÿ“š text classification ๐Ÿท entity recognition ๐Ÿ”— relation extraction ๐Ÿงฌ grammar & morphology ๐ŸŽฏ semantic parsing ๐Ÿ‘ซ coreference resolution ๐Ÿ’ฌ discourse structure Predictive UNDERSTANDING NLP TASKS

Slide 16

Slide 16 text

๐Ÿ“– single/multi-doc summarization โœ… problem solving โœ paraphrasing ๐Ÿงฎ reasoning ๐Ÿ–ผ style transfer Generative โ“question answering ๐Ÿ“š text classification ๐Ÿท entity recognition ๐Ÿ”— relation extraction ๐Ÿงฌ grammar & morphology ๐ŸŽฏ semantic parsing ๐Ÿ‘ซ coreference resolution ๐Ÿ’ฌ discourse structure Predictive UNDERSTANDING NLP TASKS human-readable machine-readable

Slide 17

Slide 17 text

๐Ÿ”ฎ large generative model

Slide 18

Slide 18 text

๐Ÿ”ฎ large generative model ๐Ÿ“ฆ distilled task-specific model

Slide 19

Slide 19 text

๐Ÿ”ฎ large generative model ๐Ÿ“ฆ distilled task-specific model in-context learning Falcon MIXTRAL GPT-4

Slide 20

Slide 20 text

๐Ÿ”ฎ large generative model ๐Ÿ“ฆ distilled task-specific model in-context learning Falcon MIXTRAL GPT-4 transfer learning ELECTRA T5

Slide 21

Slide 21 text

๐Ÿ”ฎ large generative model ๐Ÿ“ฆ distilled task-specific model in-context learning Falcon MIXTRAL GPT-4 transfer learning ELECTRA T5 BERT-base still very competitive!

Slide 22

Slide 22 text

GITHUB.COM/EXPLOSION/SPACY-LLM TOWARDS STRUCTURED DATA Prompt Template ๐Ÿ”ฎ LLM London is bigger than Berlin LOCATION: London, Berlin LOCATION

Slide 23

Slide 23 text

GITHUB.COM/EXPLOSION/SPACY-LLM TOWARDS STRUCTURED DATA Prompt Template ๐Ÿ”ฎ LLM London is bigger than Berlin LOCATION: London, Berlin LOCATION

Slide 24

Slide 24 text

GITHUB.COM/EXPLOSION/SPACY-LLM ๐Ÿ’ฌ unstructured text input ๐Ÿ“Š structured Doc object

Slide 25

Slide 25 text

GITHUB.COM/EXPLOSION/SPACY-LLM Named Entity Recognition Text Classification Relation Extraction Lemma- tization ๐Ÿ’ฌ unstructured text input ๐Ÿ“Š structured Doc object

Slide 26

Slide 26 text

GITHUB.COM/EXPLOSION/SPACY-LLM Named Entity Recognition Text Classification Relation Extraction Lemma- tization ๐Ÿ’ฌ unstructured text input ๐Ÿ“Š structured Doc object ๐Ÿ”ฎ LLM โš™ Supervised Model โœ Rules mix, match and replace techniques

Slide 27

Slide 27 text

CLOSE THE GAP BETWEEN PROTOTYPE AND PRODUCTION

Slide 28

Slide 28 text

CLOSE THE GAP BETWEEN PROTOTYPE AND PRODUCTION ๐Ÿ”— standardize inputs and outputs

Slide 29

Slide 29 text

CLOSE THE GAP BETWEEN PROTOTYPE AND PRODUCTION ๐Ÿ”— standardize inputs and outputs ๐Ÿ“ˆ start with evaluation

Slide 30

Slide 30 text

CLOSE THE GAP BETWEEN PROTOTYPE AND PRODUCTION ๐Ÿ”— standardize inputs and outputs ๐Ÿ“ˆ start with evaluation EXPLOSION.AI/BLOG/APPLIED-NLP-THINKING ๐ŸŽฏ assess utility, not just accuracy

Slide 31

Slide 31 text

CLOSE THE GAP BETWEEN PROTOTYPE AND PRODUCTION ๐Ÿ”— standardize inputs and outputs ๐Ÿ“ˆ start with evaluation EXPLOSION.AI/BLOG/APPLIED-NLP-THINKING ๐ŸŽฏ assess utility, not just accuracy ๐Ÿ” work on data iteratively

Slide 32

Slide 32 text

CLOSE THE GAP BETWEEN PROTOTYPE AND PRODUCTION ๐Ÿ”— standardize inputs and outputs ๐Ÿ“ˆ start with evaluation EXPLOSION.AI/BLOG/APPLIED-NLP-THINKING ๐ŸŽฏ assess utility, not just accuracy ๐Ÿ” work on data iteratively ๐Ÿ’ฌ consider structure and ambiguity of natural language

Slide 33

Slide 33 text

processing pipeline prototype ๐Ÿ”ฎ ๐Ÿ“ฆ GITHUB.COM/EXPLOSION/SPACY-LLM processing pipeline in production ๐Ÿ“ฆ ๐Ÿ“ฆ ๐Ÿ“ฆ ๐Ÿ“ฆ ๐Ÿ“Š structured Doc object ๐Ÿ“Š structured Doc object PROTOTYPE TO PRODUCTION

Slide 34

Slide 34 text

processing pipeline prototype ๐Ÿ”ฎ ๐Ÿ“ฆ prompt model & transform output to structured data GITHUB.COM/EXPLOSION/SPACY-LLM processing pipeline in production ๐Ÿ“ฆ ๐Ÿ“ฆ ๐Ÿ“ฆ ๐Ÿ“ฆ ๐Ÿ“Š structured Doc object ๐Ÿ“Š structured Doc object PROTOTYPE TO PRODUCTION

Slide 35

Slide 35 text

๐Ÿ”ฎ HUMAN IN THE LOOP

Slide 36

Slide 36 text

continuous evaluation baseline ๐Ÿ”ฎ HUMAN IN THE LOOP

Slide 37

Slide 37 text

continuous evaluation baseline prompting ๐Ÿ”ฎ HUMAN IN THE LOOP

Slide 38

Slide 38 text

continuous evaluation baseline prompting PRODIGY.AI ๐Ÿ”ฎ HUMAN IN THE LOOP

Slide 39

Slide 39 text

continuous evaluation baseline prompting ๐Ÿ“ฆ transfer learning PRODIGY.AI ๐Ÿ”ฎ HUMAN IN THE LOOP

Slide 40

Slide 40 text

continuous evaluation baseline prompting ๐Ÿ“ฆ transfer learning PRODIGY.AI distilled model ๐Ÿ”ฎ HUMAN IN THE LOOP

Slide 41

Slide 41 text

task-specific distillation workflow continuous evaluation baseline prompting ๐Ÿ“ฆ transfer learning PRODIGY.AI distilled model ๐Ÿ”ฎ HUMAN IN THE LOOP

Slide 42

Slide 42 text

โ–  PyData NYC 2023 workshop: extracting dishes, ingredients and equipment from r/cooking Reddit posts SPACY.FYI/PYDATA-NYC CASE STUDY ๐Ÿ•“ 8 hours DATA DEV TIME ๐Ÿ“ฆ 400mb MODEL SIZE ๐Ÿ”ฅ 2000+ WORDS / SECOND

Slide 43

Slide 43 text

โ–  PyData NYC 2023 workshop: extracting dishes, ingredients and equipment from r/cooking Reddit posts โ–  used LLM during annotation SPACY.FYI/PYDATA-NYC CASE STUDY ๐Ÿ•“ 8 hours DATA DEV TIME ๐Ÿ“ฆ 400mb MODEL SIZE ๐Ÿ”ฅ 2000+ WORDS / SECOND

Slide 44

Slide 44 text

โ–  PyData NYC 2023 workshop: extracting dishes, ingredients and equipment from r/cooking Reddit posts โ–  used LLM during annotation โ–  beat few-shot LLM baseline of 0.74 with task-specific model SPACY.FYI/PYDATA-NYC CASE STUDY ๐Ÿ•“ 8 hours DATA DEV TIME ๐Ÿ“ฆ 400mb MODEL SIZE ๐Ÿ”ฅ 2000+ WORDS / SECOND

Slide 45

Slide 45 text

โ–  PyData NYC 2023 workshop: extracting dishes, ingredients and equipment from r/cooking Reddit posts โ–  used LLM during annotation โ–  beat few-shot LLM baseline of 0.74 with task-specific model โ–  20ร— inference time speedup SPACY.FYI/PYDATA-NYC CASE STUDY ๐Ÿ•“ 8 hours DATA DEV TIME ๐Ÿ“ฆ 400mb MODEL SIZE ๐Ÿ”ฅ 2000+ WORDS / SECOND

Slide 46

Slide 46 text

CONCLUSION

Slide 47

Slide 47 text

โ–  LLMs can be one part of a product or process, and swapped for di ff erent approaches. CONCLUSION

Slide 48

Slide 48 text

โ–  LLMs can be one part of a product or process, and swapped for di ff erent approaches. โ–  Iteration and the right tooling can get you past the prototype plateau. CONCLUSION

Slide 49

Slide 49 text

โ–  LLMs can be one part of a product or process, and swapped for di ff erent approaches. โ–  Iteration and the right tooling can get you past the prototype plateau. โ–  Thereโ€™s no need to compromise on development best practices or privacy. CONCLUSION

Slide 50

Slide 50 text

THANK YOU! ๐Ÿ’ฅ Explosion ๐Ÿ’ซ spaCy โœจ Prodigy ๐Ÿฆ Twitter ๐Ÿ˜ Mastodon ๐Ÿฆ‹ Bluesky ๐Ÿ’ผ LinkedIn explosion.ai spacy.io prodigy.ai @_inesmontani @[email protected] @inesmontani.bsky.social