YouSaid · the spoken record
Tengyu Ma
- lines on the record
- 38
- first
- 2024-06-06
- most recent
- 2024-06-06
- sittings or episodes
- 1
- sources
- podcast
Every line below is reproduced as it was said and linked to the record it came from. Nothing here is summarised or generated. Directory · Search · Corrections
“I spent a lot of time on another thing is that the reasoning tasks, I think the reason why I identified that as one of my lab's direction is because it's challenging and it requires a lot of very innovative research, it's very unclear whether you can really, the scaling law is really enough to get you to prove Riemann hypothesis or any of the math conjectures. So and also you have to be super human performance in some sense. So if you turn on just the common crowd data on the web, can you be a good mathematician? It's kind of very hard to believe that. So we need more innovations there. So that's pretty much what we are doing at the university lab. We try to work on the three to five years agenda and on a smaller scale.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“However, I think in academia there are many, many other things that we can do on a smaller scale. And we probably should focus on more long-term innovations. So what I told my students at the lab is that we should think about what will be the breakthrough in three to five years as opposed to how do you help open eye to improve their large language models in the next in GPD-5. So that's why we work on optimizers, which is like 10 years old. The item is 10 years old optimizer. And we say, okay, that sounds like a long-term project. Maybe in five years we can improve the optimization efficiency by 5 to 10x. That's going to be a game changer for the whole landscape, right? So if we improve the efficiency by 10x, I guess that's like $100 million for training GPD5. Then I think that would change the landscape a lot in the industry. So efficiency is one of the things.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yes, yes. In academia, this is a little bit controversial topic. I think different people have different views. My view is that I think academia probably should work on some different questions from what industry is good at. So if we are just only working on how to scale up the system, then obviously the incentive is not right. We don't have enough capital there. And even open eye, I guess Steph Ottman argues that you need a lot of capital to start to do this in some sense. So at the very beginning, I think the point is that you first have, it cannot be non-profit because if it's non-profit, then you don't have enough capital and you cannot scale up enough. I think I kind of agree with that. And that's why in academia it's very hard to scale up and have enough resources to do the large scale research.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“10 people right now. So, yeah, and also talking to a lot of angel investors, talking to Sarah and my other lead investors. So I think all of this helped me a lot in reducing the enforced mistakes in this process. To me, I think it's really about how to reduce the number of errors you make so that you can maximize the efficiency. At least this is what happens to me and also how to correct the mistakes as fast as possible. If you correct mistakes every one week after you made them versus like one month after you made them, then that's a 4x efficiency improvement.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, I think it's very, very different funding a company is very different from doing research at big tech and also even from actually it's a little bit closer to being academia because to run a university lab, I'm the CEO, CTO, CFO, and HR for the university lab, right? So you touched on a little bit of everything. But at a slightly different scale, right? So I think one of the biggest thing I learned actually from one of our Angel investor is that I should read some of the books, even those I think for probably experienced entrepreneur, many of the books are very basic. But for me, they are very, very useful when I read some of even the basic books, including Elijah's book, by the way. But his book is a little bit advanced in the sense that his book is talking about how to scale from 10 people to a thousand people. And I only read a few chapters of that because we are about.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“A weird file might you can even dump JSON files to it, right? So the same thing would happen for embedding models as well.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, so my prediction is that the system will be simpler and simpler. Maybe this is my biased view. So at least this is something that we are working towards. So the idea world would be that it's a very, very simple system. So you just have three components like large English model vector database and embedding models and maybe four components another will ranker which refine the retift results. And you connect all of this and each of the new networks that add everything else, you don't have to worry anything about chunking multi-modality, changing the data format because new artworks can do most of them. So seven years ago, if you talk to any of the so-called language models seven years ago, you have to turn the format into a very, very clean format. And now you talk to GPT4, you can have typos, you can have all kind of like”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, I think they can do it even from day one as long as they have a prototype available. So basically my default suggestion for our users is that when they have the right, first of all, of course, you want to connect the components and at least see some response. And then probably do some kind of basic profiling in terms of the latency and the quality so you can check the retrieval quality, meaning that how often you retrieve relevant documents. There are some default ways to evaluate the retrieval quality. And then you also do the end-to-end evaluation for the responses. And then you can see which part is the bottleneck. And in many cases, people found that the retrieval quality is not good so that the final response is not good. And then you can swipe some of the components. You can say, I'm going to try void embedding. I can try the voice re-rankers, which we haven't discussed too much about.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, exactly. And going back to the domain specificity and fine tuning, so the second level of customization is that we can customize to a particular company, right? So we fine-tune the proprietary data of a particular company, and we can see 10 to 20% improvement on top of the domain-specific fine-tuning as well. So of course there's a total budget in terms of how much additive improvements you have there, right? So if you start with like 50% accuracy, then you only have 50% handroom. But if you start with 90%, you only have 10% headroom. So the improvement, the absolute improvement varies a little bit across the domains.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Exactly, exactly. So basically, the first time you have to first turn the query into vectors and then do the search with vector database. And actually related to this, the dimension of the vectors, you produce also affects the latency for the vector-based search. If the dimension of the embedding is likely 100, then it's going to be much, much faster than when the dimension of the embeddings is 1,000. And actually, this is something we are very good at as well. So we produce embeddings that is like a 3x, you know, 4x smaller dimension than some of the competitors.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Requires a lot of deep understanding of the algorithmic part of the code. And for legal domain, the baseline is a little bit better so that the headroom is slightly smaller. So that's why we see 5 to 15% improvement depending on the data sets for some of the very complex legal data sets we have seen bigger improvements.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“So because you only have a latency budget, something like maybe one second, sometimes like 200 milliseconds, some people even want 50 milliseconds. And then basically it's impossible to use more than 10 billion parameters for embedding models. And we have limit parameters, any customization is very important because customization means that you use the limit number of parameters on the right tasks, the right domain, so that you excel in that domain. There's no way that you can use this 10 billion parameters to excel in everything. So that's why you have to specialize in one domain. And we have seen like five to 20% of improvements by this domain specific fine-tuning depending on the particular domains. For code, we have seen 15 to 20% improvement, partly because we have a lot of data there and the headroom there is also bigger because code.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, fine-tuning and domain specific embedding models are what we are very good at at Voyage. So just to have some context here. So what we do is that we start with a general purpose-based embedding model, which is also what we train from scratch. And from there, we first fine-tune or continue pre-trun whatever you call it on some domain specific data. So for example, we fine-tune on two trillions of code snippets, tokens. And then we get the code embedding model and we do the fine-tuning on one trillion legal tokens. And that's how we got the legal embedding model. And this domain specific embedding models, I didn't use any of the preparatory data so that everyone can use them. But they really excel in one particular domain and the performance in other domains are not changed much. And the reason why we do this is because the number of parameters in the embedding model is a limit.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Becomes longer and longer, and the long context embedding model, relatively long context embedding model. Long context here means like 10K, for example, maybe 16K, so that you can put 50 pages PDF into it. Because this long context embedding model becomes much better, there's less of a need to trunk the documents into pieces of like 5, 12 tokens. And I think this works.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Proving one way is to improve the neural artworks, either the embedding models or the revampers, or you improve the ways to use the neural networks with software engineering, right? Better trunking iterations or other kind of heuristics or kind of tricks on top of that. So what we are specialized in is that we want to improve the neural networks because that requires a lot of heavy lifting. It's a very data driven approach. We train our neural networks on trillions of tokens at least. And we fine-tune them for special use cases. And this is something that probably a company should do instead of the users, the end users should optimize themselves. And my long-term vision here is that some of the software engineering layers on top of the networks will be less and less needed when the networks are more and more clever. So for example, right now we already see that trunkings becomes less needed because the context window”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, so I guess there are a few ways, right? One way that you improve the prompting of the large language models. For example, you could tell the large language models to abstain if there's no relevant information in the retrieve documents. But because the large language models are so good these days, I think you'll need a lot of prompting anymore. It just responds to those instructions so well. And then the next thing is to improve the retrieval part, which is the bottleneck, in my opinion, because most of our users found out that if they improve the retrieval quality directly, that affects the response quality. And improving the retrieval part, I think there are two ways. One way is to improve the embedding model. One way is that you improve some of the other things on top of that. For example, how you trunk the data, whether you do iterative retrieval, whether you put in some of the meta-information in the data, so on so forth. So basically, I would say there are two ways of improving.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Models become more and more clever, right? So once the inviting models are more clever, then maybe one round or two rounds is going to be enough.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, exactly. Right. But if you use a very, very large language model to manage the system and the knowledge system, I think you again lose the efficiency, right? So it has to be a somewhat kind of like smaller model to manage the knowledge. And then at that point, embedding model might be the right thing to do in that agent training framework. Maybe another angle to look at is that whether we should do iterative retrieval versus just retrieve at once. I think iterative retrieval is definitely useful, especially because now there are still a lot of hydro room's performance. So that's why sometimes you have to retrieve multiple times because the models are not clever enough. However, in the long run, my suspicion is that iterative retrieval will be useful, but it will be a bit less useful if the”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“So agent chaining, this is a growing area, and many people are doing research on it. I think it's a little bit less well defined in some sense. On the first level, but I would say is that I think it's kind of orthogonal to embedding models and re-rankers to some degree because even when you have agent chaining, right, you still probably use embedding models as part of the chain, right? You probably do iterative retrieval as part of the chain. And of course, you use large language models as part of the chain as well. In some senses, it's orthogonal direction. So I probably rephrase the agent chaining as more like an iterative, multi-steps retrieval augmented, large language model augmented system, and some part of this retrieval probably is done by a large language model, sometimes part of the system is done by a small large language model, and some part of the system is done by embedding model, so on and so forth.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, yeah, exactly. And just to add a little bit on that, so one million tokens, five books, right? So by many companies has 100 million tokens. That's 100x difference, right? So 100x, you know, for cost is a big difference. That could be just $100K versus like $10 million. $10 million is unacceptable, but $100K sounds okay. Yeah, I think that's probably what's going to happen. So at least for many of the companies, right? So right now, if they have 100 million tokens, I don't think they can use long contact transformers at home because it's way too expensive.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“So the embedding model that we rank are in some sense the large language model that are managing the long-term memory. Of course, there might be variance and other ways to manage the long-term memory, but I think it will be somewhat similar. It's going to be more, the technology always evolves, right? Gradually, right? So maybe two years later, Voyage or maybe other companies will have a new version of the long-term memory, which is based on embedding models, but kind of like extending the embedding model in some way. That's entirely possible.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“So, the question is, for example, when you answer any question why you have to go through the entire library every time put all of the entire library in your short-term memory for answer a single question. It sounds like the right approach should be that for every single question, you retrieve a subset of the information and use those to answer the question. That seems to be the most efficient way to do that. It should be some kind of hierarchies in some sense in terms of how we solve the problem so that we can get the best efficiency. Even when we do the computer architecture, like the hardware stuff, right? So you have a different level of caching, right? So you have disk, you have CPU caching and so forth. So in that sense, I feel like the more hierarchical two-level kind of like system like rag is more cost efficient.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Most likely. Or maybe in CPU memory of all the 1 billion tokens context. You know, you may argue that, okay, over time, everything will become cheaper and cheaper, but red will be cheaper as well, right? Because many of the technologies under Reg are neural network-based and the GPUs will become cheaper, the neural networks will all become smaller. So my prediction is that REG will be much cheaper than long context going forward. And another way to think about this is that maybe just on the first principle, right, so my analogy of long context is that, so in some sense, the context is a shorter memory in some sense, right? And the rag is more like long-term memory in some sense.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Just put in all the proprietary data 1 billion tokens into the context of the transformer. So will be very, very expensive. If you use the price right now, it's going to be just impossible to do it. It's probably like 5, 10 magnitudes of difference depending on how many documents you have in the context. Of course, you can bring the cost down by, for example, one approach is you catch the activations of all of the internal corporations of the documents you put in the context. So that will bring the cost down by a lot, but I think still if you do the calculation, theoretically still much more expensive than RAC. So I think that's the more practical answer. So in terms of cost, it's going to be much more expensive than rack because you have to save all of this activations or intermediate computations in the GPU memory.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Actually, there was also a debate last year about Reich versus fine tuning. And I think that debate was kind of like getting to a consensus now. It sounds like Reich is much easier than fine-tuning and fine-tuning in many cases doesn't work because you need a lot of data to see the results and they are still hallucinations even after fine-tuning. And now, as you said, the debate becomes rag versus aging changing or long context. So maybe let's talk about long context first. So I think there are probably two answers to this from different angles because the long context right now is not practical yet, right? So we have to kind of anticipate what long context transformer can do and then do the debate at a future time in some sense or anticipate the debate at a future time. In the near term, I think the long context transformer where you”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, so we have a lot of users and they are all over the places. I think we have even a customer who is a chemistry company who is building this rack system to understand their chemistry documents or products in descriptions. And I think just it's almost everywhere, like finance, legal code retrieval code generation, so on and so forth. I think it can be applied to almost any cases and also even for individual users where you have a lot of individual personal information and you want to have a rec system on a phone so that you can access your past information in a much more easy way and you want to retrieve. For example, we all have seen that when you search your documents on your laptop, it's actually pretty hard. You have to use the exact file name. It will be much easier if... This search can be semantic based.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Code into vectors, everything into vectors. And so the vectors are the representations of each piece of the knowledge or documents. And all they are the indices. And then you put these vectors into a vector database and then you search the right of information using the vectors as indices”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“And so there's two steps. The first step is to retrieve some relevant information given the query. And then this relevant information are given to large language model. The retrieval step is important because once the large language model sees the random information, it can reduce the hallucination rate dramatically because it used the relevant information as an anchor to refine the answers in some sense. And what we are doing here is that we want to improve the quality of the retrieval or the relevancy or accuracy of the retrieved documents and information. And the way to do this is that there are two steps. The first step is that you vectorize all of your documents or all of your knowledge base. So you turn the documents to vectors, you turn the videos into vectors.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, so I guess just a little bit of background. So a retrieval of my generation, the idea is that there's a retrieval step, there's a generation step. So the main point here is that if you just use a large language model as a black box, as is, then the large language model”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, so with Voyage, I think we are mostly building these two components, Rika and embeddings for improving the quality of the retrieval or the search system. So the reason why we focus on this is because we talk to so many customers and we found that right now for implementing RAC, the bottleneck seems to be that it's not very hard to implement it, right? You can just connect the components and have your REC system ready very quickly. But the bottleneck seems to be the quality of the response. And the quality of the response is heavily affected or is kind of almost bottlenecked by the quality of the retrieval part. If the larger wish model see very relevant documents, then they can synthesize very good answers, even like Lama 70B can do that very well.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“So the first step is to define your problem, the second step is to collect your data, and you choose the loss function, you trim it, and you iterate, so on and so forth. So it's pretty complicated at that point. And now the foundation model arrives to power. And in the new foundation model era, the only thing you have to do is that you have to, you know, someone will train the foundation model for you, and then you tune the prompt and you add retrieve augment generation on top of it, and that's pretty much it. So applying machine learning AI to an industry environment is much, much easier than seven years ago. And that's why I felt that this is probably the right time to commercialize many of the technologies because the technologies are more mature.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“I think I came to Stanford party because there's a very strong industry connection here at Stanford compared to some of the other universities and also probably entrepreneurship is just part of my career plan anyways. And in terms of the timing, I felt that this is the right timing in the sense that the technologies are more and more mature so that it seems that the commercialization is the right timing right now. So for example, I think one story I have is that I look up some of my slide stack for my lectures at Stanford CS29 seven years ago when I started teaching at Stanford. At that point, machine learning, we have a lecture with Chris Ray and the machine learning on applied machine learning. So how do you apply machine learning industry? And there are seven steps there.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“More than 100 billion parameters, they found that on that scale, there is a 1.6x improvement in the efficiency of the training. So that's like $10 million versus $16 million.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, he's 10 years old now. I think that's the interesting part about it. So, optimizers, you know, I think people have tried in the last 10 years for so many times. There were so many papers published, which has improvements over item in various cases. But so far, item is still the default algorithms for training large language models. And that's why we thought that it's the time to really, we spend a lot of time on this. I think I started probably around 2018, 2019. And I asked a few students work on this. And finally, we had one paper out after a few years and failed ideas. And recently, I think one of the Facebook friends actually used this in their large scale multi-model training, and they found that on that scale, I don't know exactly how many parameters there are, but I assume it's kind of”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“The paper we last year was Sophia, which we found that we have a neutron optimizer which can improve the training efficiency by 2x for pre-training.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“In the very early days, I think I worked on some of this matrix completion optimization for matrix completion that's like 10 years ago. And then I move on to embedding models, like sentence embeddings, vector embeddings. One of the papers we wrote is a very actually simple paper where we average the word embeddings to get sentence embeddings. And then we did some of these transformations using PCA to make the performance much better. That was even before Transformer came out. And then I think I move on to Transformers, Large Language Models, and Contrastive Learning, which is the new way of training the embedding models, especially the direction started with some of the papers on using contrasted learning for images, and we work on improving those and understanding why contrastive learning can work. And recently, we work on optimizers for large language models, for example.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“In some sense, kind of like a risky direction in the sense that we don't know exactly how fast we can solve those challenging reasoning questions yet.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT
“Yeah, so I think most of the papers I wrote have some theoretical thinking in it. I guess maybe that's the commonality. And besides that, I think I worked on quite a few topics, as you mentioned, reading from the theoretical understanding, mathematical proofs of deep learning systems to all the way to practical large language models, reinforcement learning, deep reinforcement learning. And these days recently, I think what we are working on more centralized to efficiency of training the large language models and improving the reasoning tasks for large language models. So my vision is that in the future, the efficiency is very important because we are running out of data and compute, so we have to either use the data much better and use the compute much better. And also reasoning tasks seems to be a pretty important direction.”
2024-06-06 · No Priors · The evolution and promise of RAG architecture with Tengyu Ma from Voyage AI · IDENTIFIED FROM THE TRANSCRIPT