Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Read by thought-leaders and decision-makers around the world. Phone Number: +1-650-246-9381 Email: [email protected]
228 Park Avenue South New York, NY 10003 United States
Website: Publisher: https://towardsai.net/#publisher Diversity Policy: https://towardsai.net/about Ethics Policy: https://towardsai.net/about Masthead: https://towardsai.net/about
Name: Towards AI Legal Name: Towards AI, Inc. Description: Towards AI is the world's leading artificial intelligence (AI) and technology publication. Founders: Roberto Iriondo, , Job Title: Co-founder and Advisor Works for: Towards AI, Inc. Follow Roberto: X, LinkedIn, GitHub, Google Scholar, Towards AI Profile, Medium, ML@CMU, FreeCodeCamp, Crunchbase, Bloomberg, Roberto Iriondo, Generative AI Lab, Generative AI Lab Denis Piffaretti, Job Title: Co-founder Works for: Towards AI, Inc. Louie Peters, Job Title: Co-founder Works for: Towards AI, Inc. Louis-François Bouchard, Job Title: Co-founder Works for: Towards AI, Inc. Cover:
Towards AI Cover
Logo:
Towards AI Logo
Areas Served: Worldwide Alternate Name: Towards AI, Inc. Alternate Name: Towards AI Co. Alternate Name: towards ai Alternate Name: towardsai Alternate Name: towards.ai Alternate Name: tai Alternate Name: toward ai Alternate Name: toward.ai Alternate Name: Towards AI, Inc. Alternate Name: towardsai.net Alternate Name: pub.towardsai.net
5 stars – based on 497 reviews

Frequently Used, Contextual References

TODO: Remember to copy unique IDs whenever it needs used. i.e., URL: 304b2e42315e

Resources

Take our 85+ lesson From Beginner to Advanced LLM Developer Certification: From choosing a project to deploying a working product this is the most comprehensive and practical LLM course out there!

Publication

#56 Let’s Start the Year With LLM Fundamentals and Emerging Trends!
Artificial Intelligence   Latest   Machine Learning

#56 Let’s Start the Year With LLM Fundamentals and Emerging Trends!

Last Updated on January 3, 2025 by Editorial Team

Author(s): Towards AI Editorial Team

Originally published on Towards AI.

Good morning, AI enthusiasts! We are starting the new year strong with discussions on LLM basics like transformers and neural networks and emerging techniques such as fine-tuning, agents, and RAG. You can read our ‘members-only’ posts exclusively in the newsletter, where we share friend links to all these articles. Read along to access these resources and find other very interesting collaboration opportunities, polls, and memes in this week’s issue. Enjoy the read!

— Louis-François Bouchard, Towards AI Co-founder & Head of Community

Learn AI Together Community section!

AI poll of the week!

The rapid pace of AI development is unprecedented. There is so much happening every day, but the key is to know what timeless principles will have a lasting impact and what trends will fade. Our key focus has been identifying those principles, focusing our energies on building on those technologies, and helping others do the same. According to you, what are some techniques you think are here to stay? Tell us in the thread!

Collaboration Opportunities

The Learn AI Together Discord community is flooding with collaboration opportunities. If you are excited to dive into applied AI, want a study partner, or even want to find a partner for your passion project, join the collaboration channel! Keep an eye on this section, too — we share cool opportunities every week!

1. Captainpre is looking for someone experienced with AI and interested in SaaS. If this sounds interesting and you want to know more, reach out in the thread!

2. Splinter_science_95 is starting a ‘Fine-Tuning LLM with Hugging Face Transformers for NLP’ course on Udemy and wants to form a study group for it. If you want to learn fine-tuning too, connect in the thread!

3. Xplicitttt is looking to form a peer study group to learn machine learning and AI. If you are also new to AI and want to study with a group, respond in the thread!

Meme of the week!

Meme shared by ghost_in_the_machine

TAI Curated section

Article of the week

Building Intelligent AI Agents: Exploring Function Calling, RAG, and ReACT with Llama Index By Isuru Lakshan Ekanayaka

This article is a comprehensive guide to building intelligent AI agents using the Llama Index library. It covers several key concepts, including function calls, which allow LLMs to interact with external APIs for real-time data; agent runners, which streamline the management of multiple tools and complex workflows; and agentic RAG (Retrieval-Augmented Generation), which enhances LLMs by dynamically retrieving information from knowledge sources. It also explores ReACT agents, which utilize a reasoning and acting loop for improved accuracy. It provides step-by-step implementations for each concept, using Mistral AI and DuckDuckGo Search as examples, and concludes with best practices for building and maintaining these systems.

Our must-read articles

1. PCA and Neural Networks: Bridging Linear Autoencoders, Non-Linear Extensions, and Attention Mechanisms By Shenggang Li

This article explores the relationship between Principal Component Analysis (PCA) and neural networks, particularly autoencoders and attention mechanisms. It mathematically demonstrates that a linear autoencoder with identity activation functions is equivalent to PCA. The author then extends this to non-linear autoencoders, showing how they perform a form of local PCA. The connection between attention mechanisms and kernel PCA is also explored. Furthermore, the article proposes novel methods to incorporate PCA into attention mechanisms for handling temporal dependencies and sparse data, introducing “pre” and “post” methods for temporal weighting and regulation. Finally, it introduces the concept of Supervised PCA and suggests its application within attention models for improved supervised learning performance, outlining two approaches: using a weighted covariance matrix and conditional expectations.

2. Llm Fine Tuning Guide: Do You Need It and How to Do It By Igor Novikov

This article discusses fine-tuning large language models (LLMs). It emphasizes that fine-tuning is often unnecessary for many commercial applications due to the cost and time involved. However, it becomes necessary when specific chat formats, domain expertise, or cost-cutting through smaller models are required. It details when to fine-tune, highlighting the disadvantages of increased cost, the need for high-quality data, and the potential for hallucinations. It then explores data acquisition, preparation (including deduplication, personal information removal, and decontamination), and evaluation methods. Fine-tuning techniques like full retraining, LoRA, and QLoRA are explained, along with their advantages and disadvantages regarding memory usage and computational cost. Finally, It covers preference alignment using RLHF and DPO and suggests platforms like AWS SageMaker and Hugging Face for fine-tuning and model hosting.

3. Step-by-Step Exploration of Transformer Attention Mechanisms By Shenggang Li

This article provides a practical walkthrough of Transformer models, focusing on attention mechanisms and positional encoding. It details data preprocessing, tokenization, and the creation of word and sentence embeddings. The core concept of positional encoding is explained, highlighting its importance in maintaining word order during parallel processing of text chunks. It then details the attention mechanism, including query, key, and value vectors, score calculation using softmax, and the concept of multi-head attention for capturing complex relationships. Finally, it discusses the training process, including loss computation at both chunk and batch levels, and contrasts the application of Transformers to NLP and tabular data. It concludes by suggesting extensions, such as applying Transformers to different data types and exploring alternative positional encoding methods.

4. The Complete Guide to Implementing RAG Locally: No Cloud or Frameworks are Required By BeastBoyJay

This article details building a local Retrieval-Augmented Generation (RAG) system without cloud services or frameworks like LangChain. It explains RAG’s architecture, comprising retrieval, augmentation, and generation stages. It provides a step-by-step implementation using Python, processing PDFs, generating embeddings with Sentence Transformers, performing semantic search via dot product, creating prompts, and utilizing a Falcon-based LLM for response generation. The code includes functions for PDF processing, embedding generation and saving, semantic search, prompt creation, and LLM interaction, culminating in a complete local RAG pipeline. Areas for improvement, such as using FAISS for faster retrieval and more sophisticated chunking techniques, are also discussed.

If you are interested in publishing with Towards AI, check our guidelines and sign up. We will publish your work to our network if it meets our editorial policies and standards.

Join thousands of data leaders on the AI newsletter. Join over 80,000 subscribers and keep up to date with the latest developments in AI. From research to projects and ideas. If you are building an AI startup, an AI-related product, or a service, we invite you to consider becoming a sponsor.

Published via Towards AI

Feedback ↓