Developing open-source software: lessons, benefits, and challenges - Nils Reimers

Cohere · Beginner ·📄 Research Papers Explained ·3y ago

Key Takeaways

Nils Reimers discusses developing open-source software, specifically Sentence-BERT and Sentence Transformers, and shares lessons and challenges from his experience, including evaluating embeddings through MTEB and BEIR.

Full Transcript

foreign coming to to the final Point developing open source models which is also my Computing slide um as you know I've been developing a lot of Open Source Frameworks all of the time and what I can recommend is to focus on the user experience so what does your user want to build with your framework sadly you see a lot of Open Source Frameworks that are not built for the user but maybe just built for the prison itself or built for an experienced user or just build to reproduce some numbers in a paper um and a test I put out is like really okay I want your framework so simple that you can explain me the framework when we're drunk at a bar with just penetrate with a pen and paper on a bmat so so can I just bump into you at a bar and ask you hey how does this framework works and that's like my guiding principle so for example easy nmt it's a framework to do machine translation which I developed I don't know a few years ago to simplify machine translation it's kind of easy so first you run pip install Easy nmt then you do uh imported load the model and you call it translate and say what's the language and that's pretty much all the code you need and now you can start to machine translation and do what the user wants to translate text from one language to another language also you should heavily focus on documentation do you think that's what successful open source project sets apart from unsuccessful open source projects really focus on documentation documentation is way more critical than the code itself and the code architecture software architecture beneath the library so it's a really invest heavily on the documentation and here it's not easy so start with an example like this so here take a sentence translate it to German and then over time you can build up complexity say okay this is also what you can do and this is like different sentence betting and language identification and so on and so on and so on but really start easy finally if you want that other people contribute to your open source Library um aim for like simple code or software architecture um really simple for people outside people to understand the architecture to contribute to your code so don't use all the fancy Technologies from object-oriented programming with a lot of abstractions and decorator and spread your code across 1000 classes cells I don't have like a really fancy complex software architecture but I found it really good if the software architecture is easy you can just look at the code see how does it work even if you're just a beginner in the world of programming yeah that's so much for my search um thanks for listening and looking forward to your questions and also questions from Jay amazing thank you so much Niels I'd love to remind everybody who was either watching this on YouTube or live uh we have the thread in the Discord that's the right place for questions uh and we can you know answer them as they come in and and after the session as well so I'd love to direct you there um yeah thank you so much Niels that was a great sort of run over you know a lot of the different topics um that we uh on this late late last slide I'm really curious to hear more from you about your experience sort of running sentence pert so it's this research project and it's code that you've uh launched but then it sort of it succeeded and it took a life of its own I'm curious to hear from you sort of you know what are the benefits what are the insights that you get as a let's say a maintainer of a popular open source uh package like sentence Transformers but also what are the challenges yeah um so yeah first I would say it's that the sentence from formal library is a bit different than to a lot of libraries you see people put publish with the code so often what you see was a lot of Frameworks is um that they published the code just with the aim to reproduce the experiments in the paper to say okay this is the table we have and here's like the few lines of code you can run to reproduce the numbers but people do not really care about the numbers so they do not really care about scores on this one Benchmark like blue Benchmark what they care about like okay I want to take this and build my own thing and here sometimes Transformer library is different you can't take the sentence from formal library to reproduce the results from the sentence part there are like some models available where you can reproduce the numbers but because it's an actively maintained Library always up to date also up to date with the new side effects Transformer Library there's been like a lot of changes and you cannot really reproduce the results but still it's focused on the user experience so so people are not really interested to take this and reproduce this one number in this one table but they are interested to run it on like topic modeling to see what other topics in the document um so so benefit here is like if you publish the code there's like not really a way how you can betray so so totally with this jelly beans you can just run a lot of tests a lot of ablation hyper parameter tuning and then you find like aesthetic which works well but if you put out the model so that other people should use it it has to be provide value to them so if your model just works for this one setting and will not work for anyone else and provides no value for them so for other people and people will not use it so my goal was always not to publish a paper and get like this build line and claim this is a cool new model if I really put out models that are useful and that are easy to use for for other people's second inside I get is like a lot of sense from what other challenges people have in the field so number one question I got a long time is like multilingual embeddings How can I get embeddings for other languages than English where at that like two years ago I said okay there's like no good way how you can get sentence embeddings for other languages and there are no good models available and methods available so I started research to do this um softness was like a paper presented two years ago at the NLP on sentence level not paragraph level second question was like out of the main generalization like people say hey my system doesn't work well for legal domain or fashion industry um what can I do and so that's where I started the gear benchmarks say Okay first I wanted to have members on it and then investigate ways how you can adapt these models to other domains um challenges is yeah it's time consuming so so if you put it out and you interact with the community and answer questions and pull requests and try to troubleshoot things it takes away time you could spend on like research creating new papers building new things so there you have to find like the right balance for that

Original Description

Sentence Transformers and Embedding Evaluation - Talking Language AI Ep#3 Full episode: https://youtu.be/apuDeylm1uE About The Speaker: Nils is the creator of Sentence-BERT and has authored several well-known research papers, including Sentence-BERT and the popular Sentence Transformers library. He’s also worked as a Research Scientist at HuggingFace, (co-)founded several web companies, and worked as an AI consultant in the area of investment banking, media, and IoT. === In our conversation, Nils gives us an introduction to the Sentence-BERT package and the large language models provided in it. He also shares some lessons from his experience in open-source development of such a popular package. Finally, Nils touches on his research collaborations on how to evaluate embeddings through works like MTEB: Massive Text Embedding Benchmark and BEIR. To go deeper into these tools, and other concepts around embeddings, watch the video and join the conversation on Discord. Stay tuned for more episodes in our Talking Language AI series! === Join the Cohere Discord: https://discord.gg/co-mmunity Discussion thread for this episode (feel free to ask questions): https://discord.com/channels/954421988141711382/1052547510910062624 Watch more episodes of Talking Language AI: https://www.youtube.com/playlist?list=PLLalUvky4CLJ9ZgtZguDJ7dAYuI1bfaYW === Resources: Bonjour. مرحبا. Guten tag. Hola. Cohere's Multilingual Text Understanding Model is Now Available: https://txt.cohere.ai/multilingual/ SBERT: https://www.sbert.net/ SBERT Paper: https://arxiv.org/abs/1908.10084 MTEB: Massive Text Embedding Benchmark: https://arxiv.org/abs/2210.07316 BEIR: A Heterogeneous Benchmark for Zero-shot Evaluation of Information Retrieval Models: https://openreview.net/forum?id=wCu6T5xFjeJ SetFit - Efficient Few-shot Learning with Sentence Transformers https://github.com/huggingface/setfit
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from Cohere · Cohere · 53 of 60

1 Andreas Madsen on Independent Research and Interpretability
Andreas Madsen on Independent Research and Interpretability
Cohere
2 Plex: Towards Reliability using Pretrained Large Model Extensions
Plex: Towards Reliability using Pretrained Large Model Extensions
Cohere
3 Independent Research Panel Discussion
Independent Research Panel Discussion
Cohere
4 The Future of ML Ops: Open Challenges and Opportunities
The Future of ML Ops: Open Challenges and Opportunities
Cohere
5 C4AI Special - Grad School Applications
C4AI Special - Grad School Applications
Cohere
6 Cohere For AI Fireside Chat: Samy Bengio
Cohere For AI Fireside Chat: Samy Bengio
Cohere
7 Cohere For AI - Scholars Program Information Session
Cohere For AI - Scholars Program Information Session
Cohere
8 Modular and Composable Transfer Learning with Jonas Pfeiffer
Modular and Composable Transfer Learning with Jonas Pfeiffer
Cohere
9 Jay Alammar Presents Large Language Models for Real World Applications
Jay Alammar Presents Large Language Models for Real World Applications
Cohere
10 Catherine Olsson - Mechanistic Interpretability: Getting Started
Catherine Olsson - Mechanistic Interpretability: Getting Started
Cohere
11 How To Prompt Engineer a Tech Interview App | TOHacks 2022 Winners
How To Prompt Engineer a Tech Interview App | TOHacks 2022 Winners
Cohere
12 C4AI Sparks: Samy Bengio
C4AI Sparks: Samy Bengio
Cohere
13 BERTopic for Topic Modeling - Maarten Grootendorst - Talking Language AI Ep#1
BERTopic for Topic Modeling - Maarten Grootendorst - Talking Language AI Ep#1
Cohere
14 Exploring News Headlines With Text Clustering | Jay Alammar
Exploring News Headlines With Text Clustering | Jay Alammar
Cohere
15 Scale TransformX | Fireside Chat: Aidan Gomez and Alexandr Wang
Scale TransformX | Fireside Chat: Aidan Gomez and Alexandr Wang
Cohere
16 Making Large Language Models Accessible | Scale AI Fireside chat with Bill MacCartney
Making Large Language Models Accessible | Scale AI Fireside chat with Bill MacCartney
Cohere
17 Intro to KeyBERT - BERTopic for Topic Modeling
Intro to KeyBERT - BERTopic for Topic Modeling
Cohere
18 Intro to PolyFuzz - BERTopic for Topic Modeling
Intro to PolyFuzz - BERTopic for Topic Modeling
Cohere
19 API Design Philosophy - BERTopic for Topic Modeling
API Design Philosophy - BERTopic for Topic Modeling
Cohere
20 Code demo of BERTopic - BERTopic for Topic Modeling
Code demo of BERTopic - BERTopic for Topic Modeling
Cohere
21 Short texts vs long texts in BERTopic- BERTopic for Topic Modeling
Short texts vs long texts in BERTopic- BERTopic for Topic Modeling
Cohere
22 How People can help BERTopic - BERTopic for Topic Modeling
How People can help BERTopic - BERTopic for Topic Modeling
Cohere
23 Cohere For AI: Training Sensorimotor Agency in Cellular Automata with Bert Chan
Cohere For AI: Training Sensorimotor Agency in Cellular Automata with Bert Chan
Cohere
24 Cohere API Community Demos | October 2022
Cohere API Community Demos | October 2022
Cohere
25 Perfect Prompt Demo By Arjun Patel
Perfect Prompt Demo By Arjun Patel
Cohere
26 Project Idea Generator Demo By Tobechukwu Okamkpa
Project Idea Generator Demo By Tobechukwu Okamkpa
Cohere
27 SuperTransformer Demo By Amir Nagri and Team Megatron
SuperTransformer Demo By Amir Nagri and Team Megatron
Cohere
28 Cohere For AI Fireside Chat: Pablo Samuel Castro
Cohere For AI Fireside Chat: Pablo Samuel Castro
Cohere
29 How Startups Can Use NLP to Build a Competitive Moat
How Startups Can Use NLP to Build a Competitive Moat
Cohere
30 Build Chatbots Faster with Large Language Models
Build Chatbots Faster with Large Language Models
Cohere
31 Tools to Improve Training Data - Vincent Warmerdam - Talking Language AI Ep#2
Tools to Improve Training Data - Vincent Warmerdam - Talking Language AI Ep#2
Cohere
32 Utku Evci - Sparsity and Beyond Static Network Architectures
Utku Evci - Sparsity and Beyond Static Network Architectures
Cohere
33 Adding human intelligence to ML models with human-learn #shorts #machinelearning #nlp
Adding human intelligence to ML models with human-learn #shorts #machinelearning #nlp
Cohere
34 Iterating on your data with doubtlab - Tools to Improve Training Data
Iterating on your data with doubtlab - Tools to Improve Training Data
Cohere
35 Adding Human Intelligence to ML models with Human learn - Tools to Improve Training Data
Adding Human Intelligence to ML models with Human learn - Tools to Improve Training Data
Cohere
36 Scikt Learn embeddings helpers with Embetter - Tools to Improve Training Data
Scikt Learn embeddings helpers with Embetter - Tools to Improve Training Data
Cohere
37 Building Cohere API Demo App With Streamlit | Adrien Morisot
Building Cohere API Demo App With Streamlit | Adrien Morisot
Cohere
38 Rosanne Liu - career creation for non-standard candidates
Rosanne Liu - career creation for non-standard candidates
Cohere
39 Giving computers many human languages with Cohere's multilingual embeddings
Giving computers many human languages with Cohere's multilingual embeddings
Cohere
40 Learning by Distilling Context with Charlie Snell
Learning by Distilling Context with Charlie Snell
Cohere
41 Sentence Transformers and Embedding Evaluation - Nils Reimers - Talking Language AI Ep#3
Sentence Transformers and Embedding Evaluation - Nils Reimers - Talking Language AI Ep#3
Cohere
42 Reflecting on for.ai...
Reflecting on for.ai...
Cohere
43 Create a Custom Language Model with Surge AI and Cohere
Create a Custom Language Model with Surge AI and Cohere
Cohere
44 Cohere API Community Demos | November 2022
Cohere API Community Demos | November 2022
Cohere
45 Cohere API Community Demos | December 2022
Cohere API Community Demos | December 2022
Cohere
46 Cohere For AI Presents: Colin Raffel
Cohere For AI Presents: Colin Raffel
Cohere
47 Lucas Beyer - FlexiViT: One Model for All Patch Sizes
Lucas Beyer - FlexiViT: One Model for All Patch Sizes
Cohere
48 What is Neural Search? Nils Reimers - Sentence Transformers and Embedding Evaluation
What is Neural Search? Nils Reimers - Sentence Transformers and Embedding Evaluation
Cohere
49 Evaluating Information Retrieval with BEIR
Evaluating Information Retrieval with BEIR
Cohere
50 Evaluating Embeddings with MTEB Massive text embeddings benchmark - Nils Reimers
Evaluating Embeddings with MTEB Massive text embeddings benchmark - Nils Reimers
Cohere
51 High quality text classification with few training examples with SetFit
High quality text classification with few training examples with SetFit
Cohere
52 Multilingual and cross lingual embeddings - Nils Reimers
Multilingual and cross lingual embeddings - Nils Reimers
Cohere
Developing open-source software: lessons, benefits, and challenges - Nils Reimers
Developing open-source software: lessons, benefits, and challenges - Nils Reimers
Cohere
54 Ask Me Anything with Ed Grefenstette, Head of Machine Learning at Cohere
Ask Me Anything with Ed Grefenstette, Head of Machine Learning at Cohere
Cohere
55 HyperWrite Powers Its Generative AI Service with Cohere
HyperWrite Powers Its Generative AI Service with Cohere
Cohere
56 EMNLP 2022 Conference Special Edition - Talking Language AI #4
EMNLP 2022 Conference Special Edition - Talking Language AI #4
Cohere
57 Cohere API Community Demos | January 2023
Cohere API Community Demos | January 2023
Cohere
58 C4AI Sparks: Rosanne Liu on Career Creation for Non-Standard Candidates
C4AI Sparks: Rosanne Liu on Career Creation for Non-Standard Candidates
Cohere
59 Michael Tschannen -  Image-and-Language Understanding from Pixels Only
Michael Tschannen - Image-and-Language Understanding from Pixels Only
Cohere
60 How to Add AI to your App
How to Add AI to your App
Cohere

Nils Reimers shares his experience developing open-source software, including Sentence-BERT and Sentence Transformers, and discusses evaluating embeddings through MTEB and BEIR. He provides lessons and challenges from his experience and introduces tools like SetFit for efficient few-shot learning.

Key Takeaways
  1. Develop open-source software like Sentence-BERT and Sentence Transformers
  2. Evaluate embeddings using MTEB and BEIR
  3. Use tools like SetFit for efficient few-shot learning
  4. Read research papers on NLP and embeddings evaluation
💡 Evaluating embeddings is crucial for developing effective language models, and tools like MTEB and BEIR provide a comprehensive benchmark for this purpose.

Related Reads

📰
Don’t Read Another 30-Page Paper Until You Try This
Improve your research paper reading skills with a simple technique to tackle complex 30-page papers
Medium · AI
📰
6.5% of the Neuro-Symbolic Literature Can Be Reproduced from Its Published Artifacts, a Six-Stage Audit Framework and First Instantiation
Only 6.5% of neuro-symbolic AI literature can be reproduced from published artifacts, highlighting the need for a reproducibility audit framework
ArXiv cs.AI
📰
Research Publications, Patents & Innovation Output at Quantum University
Boost academic reputation through research output and innovation at Quantum University
Medium · Machine Learning
📰
Every Researcher Should Start Managing Research Intelligence Assets™
Researchers can generate long-term value from their intellectual assets by managing them effectively, which is crucial for maximizing research impact
Medium · AI
Up next
Why the Best Ideas Can't Be Neatly Explained
David Perell
Watch →