Upgrade to PRO for Only $50/Yearโ€”Limited-Time Offer! ๐Ÿ”ฅ

Towards Structured Data: LLMs from Prototype to...

Towards Structured Data: LLMs from Prototype toย Production

Large Language Models (LLMs) have enormous potential, but also challenge existing workflows in industry that require modularity, transparency, data privacy and structured data. In this talk, I'll present pragmatic and practical approaches for how to use LLMs beyond just chat bots, how to ship more successful NLP projects from prototype to production and how to use the latest state-of-the-art models in real-world applications and distilling their knowledge into smaller and faster components that can be run and maintained in-house.

Avatar for Ines Montani

Ines Montani PRO

June 12, 2024
Tweet

More Decks by Ines Montani

Other Decks in Programming

Transcript

  1. 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
  2. SOFTWARE IN INDUSTRY black-box models modular ๐Ÿงฉ transparent ๐Ÿ”Ž explainable

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

    ๐Ÿ”ฎ third-party APIs ๐Ÿ”’ data-private โœ… reliable ๐Ÿ’ธ a ff ordable
  4. ๐Ÿ“– 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
  5. ๐Ÿ“– 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
  6. ๐Ÿ”ฎ large generative model ๐Ÿ“ฆ distilled task-specific model in-context learning

    Falcon MIXTRAL GPT-4 transfer learning ELECTRA T5 BERT-base still very competitive!
  7. 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
  8. 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
  9. 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
  10. 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
  11. processing pipeline prototype ๐Ÿ”ฎ ๐Ÿ“ฆ GITHUB.COM/EXPLOSION/SPACY-LLM processing pipeline in production

    ๐Ÿ“ฆ ๐Ÿ“ฆ ๐Ÿ“ฆ ๐Ÿ“ฆ ๐Ÿ“Š structured Doc object ๐Ÿ“Š structured Doc object PROTOTYPE TO PRODUCTION
  12. 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
  13. โ–ช 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
  14. โ–ช 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
  15. โ–ช 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
  16. โ–ช 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
  17. โ–ช LLMs can be one part of a product or

    process, and swapped for di ff erent approaches. CONCLUSION
  18. โ–ช 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
  19. โ–ช 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
  20. THANK YOU! ๐Ÿ’ฅ Explosion ๐Ÿ’ซ spaCy โœจ Prodigy ๐Ÿฆ Twitter

    ๐Ÿ˜ Mastodon ๐Ÿฆ‹ Bluesky ๐Ÿ’ผ LinkedIn explosion.ai spacy.io prodigy.ai @_inesmontani @[email protected] @inesmontani.bsky.social