Exploring Hugging Face and RAG | DDS AI Residency, Cohort 12 (MC07)
This week's MC07 session focused on the Hugging Face Hub, open-weight models and a hands-on RAG walkthrough.
For the model exploration activity, each of us picked a different model family: Dr. Samer worked with Mistral, Jacob with Llama, Nevin with Falcon, and I explored Qwen.
I got to load Qwen in Google Colab using the pipeline() function from Hugging Face's Transformers library. It's always nice to see how a few lines of code can get you started with a model running in your own environment.
A few things I took away from the session:
Read the model card before using a model. Check its intended use, license, hardware requirements and limitations. It's easy to focus on getting a model running, but choosing the right one matters just as much.
Open-weight models offer more control. We discussed privacy, deployment flexibility, cost and reduced dependency on proprietary providers. These aren't just technical considerations, especially when looking at enterprise AI adoption.
Revisiting the retrieval side of RAG. I've previously built RAG-based applications, so I was already familiar with the overall workflow. This session gave us another opportunity to work through how document chunks are converted into embeddings and matched using cosine similarity.
One example from the exercise was asking, "How many leave days can I carry over?" The retrieval process brought back the relevant policy section with a similarity score of 0.826.
Thanks to Mr.Mohammad Arshad and the Decoding Data Science team for the session, and to Dr. Samer, Jacob and Nevin for the discussions!
#HuggingFace #RAG #GenerativeAI #OpenWeightModels #Qwen #LLM #DecodingDataScience #AIResidency #Cohort12
4
1 comment
Sumaya Fathima
4
Exploring Hugging Face and RAG | DDS AI Residency, Cohort 12 (MC07)
powered by
Decoding Data Science
skool.com/decoding-data-science-6929
Learn AI, data science, and career growth through practical workshops, mentoring, challenges, and a supportive community.
Build your own community
Bring people together around your passion and get paid.
Powered by