Posts

Showing posts with the label NLP

[Day 112] db2chat - Talk with your (sqlite3) database

Image
 Hello :) Today is Day 112! A quick summary of today: made a webapp to talk with a database ( webapp ) ( github ) This morning I saw this langchain post on creating a chat agent with a database, and it hit me - I need to make one myself! The short but concise tutorial uses GPT, but I am just a poor student that prefers to use open source, and from a random X post I learned about Groq. It is crazy that we can use Groq models off-the-shelf (like mistral-8x7b, gemma-7b-it, and even llama3-8b). A quick summary of the code 1st: create a query chain for the sql code 2nd: query the model for a natural response 3rd: I used streamlit because it is so easy to develop, and deploy a webapp with it Webapp summary 1. Input your Groq/OpenAI API key and select a model (mistral-8x7b, gpt-4, llama3-8b, gemma-7b-it) 2. Load your sqlite3 db file (optional) 3. Select a database to chat with (default is chinook) + click 'Connect' You can view your db's schema: 4. Enter a query, run ...

[Day 107] Transforming natural language to charts

Image
 Hello :) Today is Day 107! A quick summary of today: created text2chart - transforming natural language to charts [ github ] [ webapp ] I am super sick, but in the around 3 hours of my fever not being high, I managed to study a bit. I was again thinking about creating some nlp project but was stuck on the idea of how to host a model. After looking around I found this article where they create a similar app called chat2vis  and they use codellama. I know codellama is an open source model that I can get from huggingface and I wondered, how did they host it. Turns out - they ask the user to input a huggingface api key, which then allows for querying and generating content. (AWESOME! this is applicable to some of the other PDF chat apps that I have, but I will look to make an app of them later).  My fever eased a bit, and I sat on my chair to do some work ^^ Here is a breakdown of the app. I used streamlit. Also, 2 default datasets during dev: Financial Statements of Ma...

[Day 100] Embeddings in practice + reading a couple of research papers + trying to deploy an LLM in production

Image
 Hello :) Today is Day 100! A quick summary of today: finished Vicki Boykis' 'What are embeddings?' read 2 papers Graph Convolutional Neural Networks for Web-Scale Recommender Systems (Ying et al., 2018) TwHIN: Embedding the Twitter Heterogeneous Information Network for Personalized Recommendation (El-Kishky et al., 2022) tried to deploy a PDF chat app using streamlit (spoiler: failed) My full notes from Vicki Boykis' What are embeddings? book The research papers below, I saw them in Vicki Boykis' vook and read them because they referenced GNNs. Graph Convolutional Neural Networks for Web-Scale Recommender Systems (Ying et al., 2018) The paper talks about a a large-scale deep recommendation engine developed and deployed at Pinterest called PinSage which tackles the challenge of scaling deep neural networks for graph-structured data to web-scale recommendation tasks with huge amounts of users and items (pictures in pinterest's case). PinSage utilizes an efficient...

[Day 98] Finishing XCS224W: ML with Graphs' 2nd homework on GNNs Using PyTorch Geometric

Image
 Hello :)  Today is Day 98! A quick summary of today: completed the whole 2nd homework of XCS224W: ML with Graphs started reading Vicki Boykis' 'What are embeddings?' book About the homework The topic was: GNNs Using PyTorch Geometric, but I am afraid that is as far as I can go. We are not allowed to share info about the homeworks, but it was based on my notes from Days 94, 95 and 96.  My score: I had a quick look at assignment 3 and apparently its based on Days 94, 95 and 96 as well, so for tomorrow I will either take a break and not do 2 assignments in a row by continuing to watch the next lectures, or do it as well. (the 1st option is more likely) As for the book 'What are embeddings?' by Vicki Boykis  I had it on my list for a bit and I just wanted to read it and make take some notes (which are below). But most (if not all) the info was already covered when I covered CS224N NLP with DL : from Day 57 ~ Day 65. Still it was nice to confirm my knowledge....

[Day 86] Made a youtube video - Chat with your PDF for free in colab using huggingface, mongodb, llama_index, langchain

Image
 Hello :) Today is Day 86! A quick summary of today: Coded, planned, recorded and posted a video tutorial making a chat with your pdf rag system for free All code + colab link + pdf used is on this github repo Well, after waking up today, I definitely did not expect to plan, execute and upload an almost 1hr tutorial on youtube.  I was looking around chat with your PDF videos, to see what I can improve in my pdf_rag_from_scratch  but I saw that most of the videos require an OpenAI api key, and I did not like that, given the availability of so many free resources and models.  And I found this great resource from huggingface  - Building A RAG System with Gemma, MongoDB and Open Source Model. Instead of a pdf, they were using some dataframe for films, so I decided to improve upon that, and make the code preprocess a pdf, embed it, upload to mongodb, load gemma, create a prompt and chat with the pdf (kind of a combination of the tutorial + my pdf_rag_from_scrat...

[Day 84] Lecture 13 and 14 of CMU 11-711's Advanced NLP: Debugging and model interpretation; Ensembling methods

Image
 Hello :) Today is Day 84! A quick summary: Covered Lecture 13 of CMU 11-711's Advanced NLP class: Debugging and interpretation , and Lecture 14 : Ensembling and mixture of experts Lecture 13 notes: Lecture 14 notes: I am on the look out for the next lectures. All of the next 4 are really exciting 15. Tour of Modern Large Language Models 16. Long Sequence Models 17. Code Generation 18. Knowledge-based QA and Information Extraction But maybe we will get them in a month or so :( That is all for today! See you tomorrow :)