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: pub@towardsai.net
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

Trends in AI  March 2023
Latest   Machine Learning

Trends in AI March 2023

Last Updated on March 21, 2023 by Editorial Team

Author(s): Sergi Castella i Sapé

Originally published on Towards AI.

LLaMA from Meta, an embodied PALM-E model from Google, Consistency Models, and new OpenAI API endpoints plus juicy pricing for ChatGPT: 0.002$/1k tokens.

Source: Zeta Alpha

The fast-paced development of Large Language Models keeps defining this first part of 2023. This month we’ve seen OpenAI releasing its ChatGPT API at 1/10th of the price of the full DaVinci endpoints, and other big tech Meta and Google release some of their latest models (LLaMA and UL2). Moreover, we got to play with Anthropic’s Claude using the Poe app and even though it’s still not publicly released, we were pleasantly surprised by its capabilities and how it’s totally on par with ChatGPT. Fierce competition in the space of chatbots will give us choices and force them to become better and cheaper.

Generative AI startups are taking off, and the rush to invest is stronger than ever. Here’s a comprehensive market map of the space with companies and investors by Ollie Forsyth.

Research

That said, let’s dive into the research! Every month we analyze the most recent research literature and select a varied set of 10 papers you should know. This month we’re covering topics such as Multimodal Language Models, Diffusion Models, Machine Translation, and more.

1. LLaMA: Open and Efficient Foundation Language Models

By Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, Guillaume Lample

❓ Why → A new set of base checkpoints to build upon. Well, if you work in academia!

Key insights → These new language models from Meta are pretty boring to be fair: the standard Transformers with rotatory position embeddings, trained on just over a Trillion tokens. You can see the architecture specs below:

Source: https://arxiv.org/pdf/2302.13971

These models are trained on fully public data, and they manage to achieve strong performance on a variety of QA and Common Sense Reasoning tasks both in zero and few-shot.

Source: https://arxiv.org/pdf/2302.13971

However, we’ve played around with the 7B model, and it’s hard to make it do what you want to do. These models are neither instructed tunned nor RLHF’d, and it shows when it comes to how hard it is to interact with them.

Another point of controversy has been the fact that Meta has released this model solely for non-commercial research purposes, which strongly limits its applicability. Still, the checkpoints are out there in the world for people to play around and tinker with. If you want to know more about it, you can check out Yannic’s video on it.

Finally, one of the most interesting points is the fact that the decoding strategy for these models can have a huge impact on their usability, as @theshawwn points out on Twitter: increasing beam_search top_k, setting the temperature at 0.7 and repetition penalty at 0.85 produces noticeably better results!

2. Consistency Models | Unofficial implementation

By Yang Song, Prafulla Dhariwal, Mark Chen, Ilya Sutskever.

❓ Why → Diffusion Models are expensive computationally cause they need to decode the output iteratively many times.

Key insights → Diffusion Models have been notorious for not needing to be outrageously big in terms of parameters to produce state-of-the-art results. This is because they are applied dozens of times iteratively, unrolling their computational graph to be much more expressive than what a single forward pass would allow. But that makes them slow, unlike GANs, VAEs, or Normalizing Flows.

This work proposes to learn a model that predicts the output of a diffusion process at an arbitrary depth level (see figure below).

Source: https://arxiv.org/pdf/2303.01469.pdf

The key insight into building these models is the realization that any jump f(x, t) needs to be consistent with the composition of its steps; when going from noise to data, different jumps need to end up in the same image; that is they need to be consistent, hence the name.

Previously, Progressive Distillation had shown a method to distill Diffusion Models into ones that required many fewer decoding steps (e.g., only 4), but in this work, a method for training standalone Consistency Models is proposed. The results on small images are not jaw-dropping but certainly promising for future research.

Source: Source: https://arxiv.org/pdf/2303.01469.pdf

3. PaLM-E: An Embodied Multimodal Language Model

By Danny Driess, Fei Xia, Mehdi S. M. Sajjadi, Corey Lynch, Aakanksha Chowdhery, Brian Ichter, Ayzaan Wahid, Jonathan Tompson, Quan Vuong, Tianhe Yu, Wenlong Huang, Yevgen Chebotar, Pierre Sermanet, Daniel Duckworth, Sergey Levine, Vincent Vanhoucke, Karol Hausman, Marc Toussaint, Klaus Greff, Andy Zeng, Igor Mordatch, Pete Florence.

❓ Why → The latest incarnation of robots x LMs.

Key insights → Physical robots can only learn from a few samples because their training is not scalable (unless you do simulations, but they’re just not as expressive), and LMs encode powerful expressive priors and allow for very efficient learning via prompts. Why not use them together?

This thread was initiated by “Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agents”, and this work takes a similar idea to the next level. Conceptually, it’s simple: tokenize images, states, and language into a shared vocabulary, then train a joint model for next-token prediction. To encode images, they use the Vision Transformer (ViT) and to encode text PaLM, both from Google and up to a combined 562 billion parameters (22B + 540B respectively).

Source: https://arxiv.org/pdf/2303.03378

While this work sells itself as being an end-to-end solution, the truth is that robot control still heavily relies on traditional techniques, and the language model only provides high-level action instructions.

This results in strong visual question answering and reasoning performance, but perhaps the most relevant results are positive transfer: joint modality performance greatly surpassing the performance of models trained on each modality independently. While no strong positive transfer was exhibited by the similar GATO (which was vision + language + actions but not in the physical world), PaLM-E shows once again the relevance of scale when it comes to the emergence of certain phenomena.

Source: https://arxiv.org/pdf/2303.03378

4. In-context Instruction Learning

By Seonghyeon Ye, Hyeonbin Hwang, Sohee Yang, Hyeongu Yun, Yireun Kim, Minjoon Seo.

❓ Why → Instruction tuning can also be done in the prompt!

Key insights → Instruction tuning is the technique of including labeled datasets in the training corpus in a natural language instruction format, which has been shown to generalize beyond the training tasks and into new tasks and make LMs more usable when humans give instructions.

This paper investigates what happens when you do this in the prompt; instead of adding examples of the task at hand (i.e., few-shot learning), you give it examples of a variety of other language tasks, then prompt it to perform a novel task.

TL;DR, this actually works! The necessary disclaimer is that you need to be careful about how you do it, and it’s not as simple as the “let’s think step by step” trick… But still, this is once again evidence that very complex information can be introduced with in-context learning, and the space of prepended fixed prompts has only just begun. These are prompts that are hidden to users have become an essential tool for building products with LMs as ChatGPT and Sydney from Microsoft have shown us.

Source: https://arxiv.org/pdf/2302.14691

5. How Good Are GPT Models at Machine Translation? A Comprehensive Evaluation | Code

By Amr Hendy, Mohamed Abdelrehim, Amr Sharaf, Vikas Raunak, Mohamed Gabr, Hitokazu Matsushita, Young Jin Kim, Mohamed Afify, and Hany Hassan Awadalla.

❓ Why → One of the most underappreciated skills of ChatGPT was translation. Now this is put under rigorous evaluation.

Key insights → The overall gist of it is that GPT models perform close to SOTA and traditional machine translation models (of course with many caveats, but you’ll have to read the paper for that). However, one of my favorite takeaways from this work is that existing Neural Machine Translation and GPT based translation show complementary strengths.

Given that it wasn’t trained on parallel corpora, it avoids its common pitfalls such as problems with data memorization of noisy or low-quality samples, or long-tailed errors such as translation of physical units or currencies which might appear very sparsely in the parallel corpora.

Source: https://arxiv.org/pdf/2302.09210

Overall, it’s still impressive and mindblowing that such translation performance can emerge largely from unsupervised pertaining, instruction tuning, and RLHF which wasn’t particularly targeted for translation.

6. Composer: Creative and Controllable Image Synthesis with Composable Conditions | Project Page | Code

By Lianghua Huang, Di Chen, Yu Liu, Yujun Shen, Deli Zhao, Jingren Zhou.

❓ Why → One of the foundational strengths of Diffusion Models is their convenience when it comes to training with conditioning data, which is why they are so successful in a text-guided generation. This work takes controllability to the next level.

Key insights → The authors develop a method that allows for a wide range of image attributes to be controlled during image generation: spatial layout, color palette, style, intensity, etc.

Compositionality is the core idea behind this model, which decomposes images into representative factors, and then uses a diffusion model to recompose the input when conditioned with these factors. The elements into which images are decomposed are caption (text), Semantics and style (via CLIP embedding), Color (via histogram statistics), sketch (via an edge detection model), instances (i.e., object segmentation), depthmap (via a pretrained monocular model), intensity (via grayscale image), and masking. Thus, image generation can be conditioned to all these attributes and can be iteratively refined with the previous output as a new conditioning input.

Source: https://arxiv.org/pdf/2302.09778.pdf

This work demonstrates how image generation technology can be designed to give more control to human creativity, and elevate the creative process instead of replacing it.

7. Prismer: A Vision-Language Model with Multi-Modal Experts

By Shikun Liu, Linxi Fan, Edward Johns, Zhiding Yu, Chaowei Xiao, Anima Anandkumar

❓ Why → The return of expert systems..? I like this paper cause it’s a departure from the end-to-end raw computing revolution. That’s not to say I’m bearish on the bitter lesson, but it’s still refreshing.

Key insights → Not quite, but this paper takes a quite structured approach to multimodal language modeling and comes out with some convincing benefits:

  • The paper takes a structured approach to multimodal language modeling and achieves comparable performance with one or two orders of magnitude fewer data compared to other models.
  • “Experts” refer to frozen computer vision models that output information such as depth maps or object segmentations when processing an image. Only adaptors are trained, allowing the design to plug and play with other black-box vision models.
  • The largest Prismer model has 1.6B parameters with only 360M trainable ones, resulting in less performance but greater efficiency than massive models.
  • Prismer shows strong robustness to noisy experts and improves with more/higher-quality experts, suggesting its practicality for multi-modal learning at scale.
Source: https://shikun.io/projects/prismer

Overall, the paper presents an effective technique for safely including many modality experts without degrading performance, enabling a practical approach to scaling down multi-modal learning. For another work on multimodal language models, see “Language Is Not All You Need: Aligning Perception with Language Models” from Microsoft, which tunes a vision-language model with instruction learning.

8. Augmented Language Models: a Survey

By Grégoire Mialon, Roberto Dessì, Maria Lomeli, Christoforos Nalmpantis, Ram Pasunuru, Roberta Raileanu, Baptiste Rozière, Timo Schick, Jane Dwivedi-Yu, Asli Celikyilmaz, Edouard Grave, Yann LeCun, Thomas Scialom.

❓ Why → We have witnessed an explosion of proposed approaches for enhancing language models with memory, reasoning, and tools. This article is your one-stop shop to stay up-to-date on the latest developments in this space.

Key insights → LMs are famously limited when it comes to robust reasoning and accuracy, which is why there is an active area of research to augment them with computational devices that enhance their abilities. For instance, LMs that use calculators, compile and run generated code, or call arbitrary APIs to gather data. The space has just gotten started.

Retrieval Augmented Generation (RAG) is one of the most common cases (we use it on our platform, and both Bing and Google are actively working on it). Here, for instance 4 works that look into Retrieval Augmented LMs (RAGs) and how they compare:

Source: https://arxiv.org/pdf/2302.07842.pdf

One of the interesting points made by the survey is that augmenting LMs with tools and explicit structure makes them more interpretable, given that their output can be attributed explicitly to its modules, which makes them more usable by humans.

9. Symbolic discovery of optimization algorithms

By Xiangning Chen, Chen Liang, Da Huang, Esteban Real, Kaiyuan Wang, Yao Liu, Hieu Pham, Xuanyi Dong, Thang Luong, Cho-Jui Hsieh, Yifeng Lu, Quoc V. Le.

❓ Why → Adam has been king for way too long. Is there any way we’ll get rid of it? Probably not, but this could still be useful!

Key insights → The method is called Lion (evolved sign moment) and the handwavy gist of it is that you can apply symbolic program search to learn a trainer function that outputs updated weight values given weights, gradients, and learning rates of a network.

This work contributes to the space of learned optimizers with the twist that the learned optimizer here is not learned via gradient descent but via symbolic discovery. This method works very well in the experiments showcased in the paper, achieving around 2x training speedups when compared to commonplace vanilla optimizers such as Adam.

Source: https://arxiv.org/pdf/2302.06675.pdf

However, as usual with these papers, it’s very hard to assess the most important feature of optimizers: convenience. Adam is not the chosen optimizer because it always works best and most efficiently but because it works well enough most of the time, and relevant bottlenecks are elsewhere. That said, I would love to see learned optimizers take off and become the new defacto for challenging unstable learning scenarios such as 100 billion scale language models.

10. MarioGPT: Open-Ended Text2Level Generation through Large Language Models

By Shyam Sudhakaran, Miguel González-Duque, Claire Glanois, Matthias Freiberger, Elias Najarro, Sebastian Risi.

❓ Why → A fun one! Using GPT-2 to generate Mario Bros worlds.

Key insights → That’s pretty much it. The authors do Procedural Content Generation (PCG, the idea of generating content for games algorithmically) by tokenizing elements of Mario Bros into characters and training a language model that is then conditioned on text prompts.

They further increase the diversity of generated levels with evolutionary computing, embedding MarioGPT into a novelty search loop that samples existing levels, mutates them, and applies selection criteria to keep or discard them.

The resulting levels are playable 88% of the time and display high controllability via text prompting. This is only an exciting start to potentially more expressive and personalized gaming experiences!

Source: https://arxiv.org/pdf/2302.05981.pdf

This month’s selection is all wrapped up — if you want to stay ahead of the curve, give us a follow on Twitter @zetavector and stay tuned for next month’s picks!

 

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 ↓

Sign Up for the Course
`; } else { console.error('Element with id="subscribe" not found within the page with class "home".'); } } }); // Remove duplicate text from articles /* Backup: 09/11/24 function removeDuplicateText() { const elements = document.querySelectorAll('h1, h2, h3, h4, h5, strong'); // Select the desired elements const seenTexts = new Set(); // A set to keep track of seen texts const tagCounters = {}; // Object to track instances of each tag elements.forEach(el => { const tagName = el.tagName.toLowerCase(); // Get the tag name (e.g., 'h1', 'h2', etc.) // Initialize a counter for each tag if not already done if (!tagCounters[tagName]) { tagCounters[tagName] = 0; } // Only process the first 10 elements of each tag type if (tagCounters[tagName] >= 2) { return; // Skip if the number of elements exceeds 10 } const text = el.textContent.trim(); // Get the text content const words = text.split(/\s+/); // Split the text into words if (words.length >= 4) { // Ensure at least 4 words const significantPart = words.slice(0, 5).join(' '); // Get first 5 words for matching // Check if the text (not the tag) has been seen before if (seenTexts.has(significantPart)) { // console.log('Duplicate found, removing:', el); // Log duplicate el.remove(); // Remove duplicate element } else { seenTexts.add(significantPart); // Add the text to the set } } tagCounters[tagName]++; // Increment the counter for this tag }); } removeDuplicateText(); */ // Remove duplicate text from articles function removeDuplicateText() { const elements = document.querySelectorAll('h1, h2, h3, h4, h5, strong'); // Select the desired elements const seenTexts = new Set(); // A set to keep track of seen texts const tagCounters = {}; // Object to track instances of each tag // List of classes to be excluded const excludedClasses = ['medium-author', 'post-widget-title']; elements.forEach(el => { // Skip elements with any of the excluded classes if (excludedClasses.some(cls => el.classList.contains(cls))) { return; // Skip this element if it has any of the excluded classes } const tagName = el.tagName.toLowerCase(); // Get the tag name (e.g., 'h1', 'h2', etc.) // Initialize a counter for each tag if not already done if (!tagCounters[tagName]) { tagCounters[tagName] = 0; } // Only process the first 10 elements of each tag type if (tagCounters[tagName] >= 10) { return; // Skip if the number of elements exceeds 10 } const text = el.textContent.trim(); // Get the text content const words = text.split(/\s+/); // Split the text into words if (words.length >= 4) { // Ensure at least 4 words const significantPart = words.slice(0, 5).join(' '); // Get first 5 words for matching // Check if the text (not the tag) has been seen before if (seenTexts.has(significantPart)) { // console.log('Duplicate found, removing:', el); // Log duplicate el.remove(); // Remove duplicate element } else { seenTexts.add(significantPart); // Add the text to the set } } tagCounters[tagName]++; // Increment the counter for this tag }); } removeDuplicateText(); //Remove unnecessary text in blog excerpts document.querySelectorAll('.blog p').forEach(function(paragraph) { // Replace the unwanted text pattern for each paragraph paragraph.innerHTML = paragraph.innerHTML .replace(/Author\(s\): [\w\s]+ Originally published on Towards AI\.?/g, '') // Removes 'Author(s): XYZ Originally published on Towards AI' .replace(/This member-only story is on us\. Upgrade to access all of Medium\./g, ''); // Removes 'This member-only story...' }); //Load ionic icons and cache them if ('localStorage' in window && window['localStorage'] !== null) { const cssLink = 'https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css'; const storedCss = localStorage.getItem('ionicons'); if (storedCss) { loadCSS(storedCss); } else { fetch(cssLink).then(response => response.text()).then(css => { localStorage.setItem('ionicons', css); loadCSS(css); }); } } function loadCSS(css) { const style = document.createElement('style'); style.innerHTML = css; document.head.appendChild(style); } //Remove elements from imported content automatically function removeStrongFromHeadings() { const elements = document.querySelectorAll('h1, h2, h3, h4, h5, h6, span'); elements.forEach(el => { const strongTags = el.querySelectorAll('strong'); strongTags.forEach(strongTag => { while (strongTag.firstChild) { strongTag.parentNode.insertBefore(strongTag.firstChild, strongTag); } strongTag.remove(); }); }); } removeStrongFromHeadings(); "use strict"; window.onload = () => { /* //This is an object for each category of subjects and in that there are kewords and link to the keywods let keywordsAndLinks = { //you can add more categories and define their keywords and add a link ds: { keywords: [ //you can add more keywords here they are detected and replaced with achor tag automatically 'data science', 'Data science', 'Data Science', 'data Science', 'DATA SCIENCE', ], //we will replace the linktext with the keyword later on in the code //you can easily change links for each category here //(include class="ml-link" and linktext) link: 'linktext', }, ml: { keywords: [ //Add more keywords 'machine learning', 'Machine learning', 'Machine Learning', 'machine Learning', 'MACHINE LEARNING', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, ai: { keywords: [ 'artificial intelligence', 'Artificial intelligence', 'Artificial Intelligence', 'artificial Intelligence', 'ARTIFICIAL INTELLIGENCE', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, nl: { keywords: [ 'NLP', 'nlp', 'natural language processing', 'Natural Language Processing', 'NATURAL LANGUAGE PROCESSING', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, des: { keywords: [ 'data engineering services', 'Data Engineering Services', 'DATA ENGINEERING SERVICES', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, td: { keywords: [ 'training data', 'Training Data', 'training Data', 'TRAINING DATA', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, ias: { keywords: [ 'image annotation services', 'Image annotation services', 'image Annotation services', 'image annotation Services', 'Image Annotation Services', 'IMAGE ANNOTATION SERVICES', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, l: { keywords: [ 'labeling', 'labelling', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, pbp: { keywords: [ 'previous blog posts', 'previous blog post', 'latest', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, mlc: { keywords: [ 'machine learning course', 'machine learning class', ], //Change your article link (include class="ml-link" and linktext) link: 'linktext', }, }; //Articles to skip let articleIdsToSkip = ['post-2651', 'post-3414', 'post-3540']; //keyword with its related achortag is recieved here along with article id function searchAndReplace(keyword, anchorTag, articleId) { //selects the h3 h4 and p tags that are inside of the article let content = document.querySelector(`#${articleId} .entry-content`); //replaces the "linktext" in achor tag with the keyword that will be searched and replaced let newLink = anchorTag.replace('linktext', keyword); //regular expression to search keyword var re = new RegExp('(' + keyword + ')', 'g'); //this replaces the keywords in h3 h4 and p tags content with achor tag content.innerHTML = content.innerHTML.replace(re, newLink); } function articleFilter(keyword, anchorTag) { //gets all the articles var articles = document.querySelectorAll('article'); //if its zero or less then there are no articles if (articles.length > 0) { for (let x = 0; x < articles.length; x++) { //articles to skip is an array in which there are ids of articles which should not get effected //if the current article's id is also in that array then do not call search and replace with its data if (!articleIdsToSkip.includes(articles[x].id)) { //search and replace is called on articles which should get effected searchAndReplace(keyword, anchorTag, articles[x].id, key); } else { console.log( `Cannot replace the keywords in article with id ${articles[x].id}` ); } } } else { console.log('No articles found.'); } } let key; //not part of script, added for (key in keywordsAndLinks) { //key is the object in keywords and links object i.e ds, ml, ai for (let i = 0; i < keywordsAndLinks[key].keywords.length; i++) { //keywordsAndLinks[key].keywords is the array of keywords for key (ds, ml, ai) //keywordsAndLinks[key].keywords[i] is the keyword and keywordsAndLinks[key].link is the link //keyword and link is sent to searchreplace where it is then replaced using regular expression and replace function articleFilter( keywordsAndLinks[key].keywords[i], keywordsAndLinks[key].link ); } } function cleanLinks() { // (making smal functions is for DRY) this function gets the links and only keeps the first 2 and from the rest removes the anchor tag and replaces it with its text function removeLinks(links) { if (links.length > 1) { for (let i = 2; i < links.length; i++) { links[i].outerHTML = links[i].textContent; } } } //arrays which will contain all the achor tags found with the class (ds-link, ml-link, ailink) in each article inserted using search and replace let dslinks; let mllinks; let ailinks; let nllinks; let deslinks; let tdlinks; let iaslinks; let llinks; let pbplinks; let mlclinks; const content = document.querySelectorAll('article'); //all articles content.forEach((c) => { //to skip the articles with specific ids if (!articleIdsToSkip.includes(c.id)) { //getting all the anchor tags in each article one by one dslinks = document.querySelectorAll(`#${c.id} .entry-content a.ds-link`); mllinks = document.querySelectorAll(`#${c.id} .entry-content a.ml-link`); ailinks = document.querySelectorAll(`#${c.id} .entry-content a.ai-link`); nllinks = document.querySelectorAll(`#${c.id} .entry-content a.ntrl-link`); deslinks = document.querySelectorAll(`#${c.id} .entry-content a.des-link`); tdlinks = document.querySelectorAll(`#${c.id} .entry-content a.td-link`); iaslinks = document.querySelectorAll(`#${c.id} .entry-content a.ias-link`); mlclinks = document.querySelectorAll(`#${c.id} .entry-content a.mlc-link`); llinks = document.querySelectorAll(`#${c.id} .entry-content a.l-link`); pbplinks = document.querySelectorAll(`#${c.id} .entry-content a.pbp-link`); //sending the anchor tags list of each article one by one to remove extra anchor tags removeLinks(dslinks); removeLinks(mllinks); removeLinks(ailinks); removeLinks(nllinks); removeLinks(deslinks); removeLinks(tdlinks); removeLinks(iaslinks); removeLinks(mlclinks); removeLinks(llinks); removeLinks(pbplinks); } }); } //To remove extra achor tags of each category (ds, ml, ai) and only have 2 of each category per article cleanLinks(); */ //Recommended Articles var ctaLinks = [ /* ' ' + '

Subscribe to our AI newsletter!

' + */ '

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!

'+ '

Towards AI has published Building LLMs for Production—our 470+ page guide to mastering LLMs with practical projects and expert insights!

' + '
' + '' + '' + '

Note: Content contains the views of the contributing authors and not Towards AI.
Disclosure: This website may contain sponsored content and affiliate links.

' + 'Discover Your Dream AI Career at Towards AI Jobs' + '

Towards AI has built a jobs board tailored specifically to Machine Learning and Data Science Jobs and Skills. Our software searches for live AI jobs each hour, labels and categorises them and makes them easily searchable. Explore over 10,000 live jobs today with Towards AI Jobs!

' + '
' + '

🔥 Recommended Articles 🔥

' + 'Why Become an LLM Developer? Launching Towards AI’s New One-Stop Conversion Course'+ 'Testing Launchpad.sh: A Container-based GPU Cloud for Inference and Fine-tuning'+ 'The Top 13 AI-Powered CRM Platforms
' + 'Top 11 AI Call Center Software for 2024
' + 'Learn Prompting 101—Prompt Engineering Course
' + 'Explore Leading Cloud Providers for GPU-Powered LLM Training
' + 'Best AI Communities for Artificial Intelligence Enthusiasts
' + 'Best Workstations for Deep Learning
' + 'Best Laptops for Deep Learning
' + 'Best Machine Learning Books
' + 'Machine Learning Algorithms
' + 'Neural Networks Tutorial
' + 'Best Public Datasets for Machine Learning
' + 'Neural Network Types
' + 'NLP Tutorial
' + 'Best Data Science Books
' + 'Monte Carlo Simulation Tutorial
' + 'Recommender System Tutorial
' + 'Linear Algebra for Deep Learning Tutorial
' + 'Google Colab Introduction
' + 'Decision Trees in Machine Learning
' + 'Principal Component Analysis (PCA) Tutorial
' + 'Linear Regression from Zero to Hero
'+ '

', /* + '

Join thousands of data leaders on the AI newsletter. It’s free, we don’t spam, and we never share your email address. Keep up to date with the latest work 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.

',*/ ]; var replaceText = { '': '', '': '', '
': '
' + ctaLinks + '
', }; Object.keys(replaceText).forEach((txtorig) => { //txtorig is the key in replacetext object const txtnew = replaceText[txtorig]; //txtnew is the value of the key in replacetext object let entryFooter = document.querySelector('article .entry-footer'); if (document.querySelectorAll('.single-post').length > 0) { //console.log('Article found.'); const text = entryFooter.innerHTML; entryFooter.innerHTML = text.replace(txtorig, txtnew); } else { // console.log('Article not found.'); //removing comment 09/04/24 } }); var css = document.createElement('style'); css.type = 'text/css'; css.innerHTML = '.post-tags { display:none !important } .article-cta a { font-size: 18px; }'; document.body.appendChild(css); //Extra //This function adds some accessibility needs to the site. function addAlly() { // In this function JQuery is replaced with vanilla javascript functions const imgCont = document.querySelector('.uw-imgcont'); imgCont.setAttribute('aria-label', 'AI news, latest developments'); imgCont.title = 'AI news, latest developments'; imgCont.rel = 'noopener'; document.querySelector('.page-mobile-menu-logo a').title = 'Towards AI Home'; document.querySelector('a.social-link').rel = 'noopener'; document.querySelector('a.uw-text').rel = 'noopener'; document.querySelector('a.uw-w-branding').rel = 'noopener'; document.querySelector('.blog h2.heading').innerHTML = 'Publication'; const popupSearch = document.querySelector$('a.btn-open-popup-search'); popupSearch.setAttribute('role', 'button'); popupSearch.title = 'Search'; const searchClose = document.querySelector('a.popup-search-close'); searchClose.setAttribute('role', 'button'); searchClose.title = 'Close search page'; // document // .querySelector('a.btn-open-popup-search') // .setAttribute( // 'href', // 'https://medium.com/towards-artificial-intelligence/search' // ); } // Add external attributes to 302 sticky and editorial links function extLink() { // Sticky 302 links, this fuction opens the link we send to Medium on a new tab and adds a "noopener" rel to them var stickyLinks = document.querySelectorAll('.grid-item.sticky a'); for (var i = 0; i < stickyLinks.length; i++) { /* stickyLinks[i].setAttribute('target', '_blank'); stickyLinks[i].setAttribute('rel', 'noopener'); */ } // Editorial 302 links, same here var editLinks = document.querySelectorAll( '.grid-item.category-editorial a' ); for (var i = 0; i < editLinks.length; i++) { editLinks[i].setAttribute('target', '_blank'); editLinks[i].setAttribute('rel', 'noopener'); } } // Add current year to copyright notices document.getElementById( 'js-current-year' ).textContent = new Date().getFullYear(); // Call functions after page load extLink(); //addAlly(); setTimeout(function() { //addAlly(); //ideally we should only need to run it once ↑ }, 5000); }; function closeCookieDialog (){ document.getElementById("cookie-consent").style.display = "none"; return false; } setTimeout ( function () { closeCookieDialog(); }, 15000); console.log(`%c 🚀🚀🚀 ███ █████ ███████ █████████ ███████████ █████████████ ███████████████ ███████ ███████ ███████ ┌───────────────────────────────────────────────────────────────────┐ │ │ │ Towards AI is looking for contributors! │ │ Join us in creating awesome AI content. │ │ Let's build the future of AI together → │ │ https://towardsai.net/contribute │ │ │ └───────────────────────────────────────────────────────────────────┘ `, `background: ; color: #00adff; font-size: large`); //Remove latest category across site document.querySelectorAll('a[rel="category tag"]').forEach(function(el) { if (el.textContent.trim() === 'Latest') { // Remove the two consecutive spaces (  ) if (el.nextSibling && el.nextSibling.nodeValue.includes('\u00A0\u00A0')) { el.nextSibling.nodeValue = ''; // Remove the spaces } el.style.display = 'none'; // Hide the element } }); // Add cross-domain measurement, anonymize IPs 'use strict'; //var ga = gtag; ga('config', 'G-9D3HKKFV1Q', 'auto', { /*'allowLinker': true,*/ 'anonymize_ip': true/*, 'linker': { 'domains': [ 'medium.com/towards-artificial-intelligence', 'datasets.towardsai.net', 'rss.towardsai.net', 'feed.towardsai.net', 'contribute.towardsai.net', 'members.towardsai.net', 'pub.towardsai.net', 'news.towardsai.net' ] } */ }); ga('send', 'pageview'); -->