<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Boris B.</title>
    <description>The latest articles on DEV Community by Boris B. (@iamtechonda).</description>
    <link>https://dev.to/iamtechonda</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F223309%2F4a0ef499-6fdd-450c-9078-82e54b148df6.jpg</url>
      <title>DEV Community: Boris B.</title>
      <link>https://dev.to/iamtechonda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iamtechonda"/>
    <language>en</language>
    <item>
      <title>Why you shouldn't Train your LLM from Scratch</title>
      <dc:creator>Boris B.</dc:creator>
      <pubDate>Tue, 22 Oct 2024 08:35:00 +0000</pubDate>
      <link>https://dev.to/iamtechonda/why-you-shouldnt-train-your-llm-from-scratch-2jb1</link>
      <guid>https://dev.to/iamtechonda/why-you-shouldnt-train-your-llm-from-scratch-2jb1</guid>
      <description>&lt;p&gt;Being the smart and curious person you are, you likely find the prospect of creating an LLM from scratch exciting.&lt;/p&gt;

&lt;p&gt;Or at least, you're interested in knowing what it takes to create one from the ground up. That's completely understandable - who wouldn't?&lt;br&gt;
However, you probably already know you can't but want to know regardless. To be blunt, it is impractical for most individuals and organisations to do this.&lt;/p&gt;

&lt;p&gt;But knowledge is free, so let's see what it takes to build an LLM from scratch 😊.&lt;/p&gt;
&lt;h2&gt;
  
  
  Think It's Expensive? You Have No Idea
&lt;/h2&gt;

&lt;p&gt;Let's use GPT-4 as an example since that's the AI model with the most public information on its associated training costs. It took &lt;strong&gt;25,000 Nvidia A100 GPUs&lt;/strong&gt; running for &lt;strong&gt;90–100 days&lt;/strong&gt; non-stop to train the model. Considering that each A100 GPU costs around $15K, the total GPU expense alone was about &lt;strong&gt;$375M&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To put that into perspective, these costs surpass the annual budgets of many mid-sized companies.&lt;/p&gt;

&lt;p&gt;If buying the hardware seems too steep, renting might appear more accessible. However, renting A100 GPUs on cloud platforms like AWS costs about $3 per hour. Putting the cost for GPT-4s training at $180M , which is cheaper than buying the training hardware but not cheap either.&lt;/p&gt;

&lt;p&gt;Similarly, LLama3 was trained on 24,000 H100 Nvidia GPU, meaning the estimated GPU training costs were &lt;strong&gt;$720m&lt;/strong&gt;. These 2 examples give a good idea of the main cost when it comes to training.&lt;/p&gt;

&lt;p&gt;Funny enough, when people consider the costs of training an LLM, they often focus solely on the above GPU expenses. Forgetting other less spoken-of costs like electricity, extra hardware, personnel costs etc.&lt;/p&gt;

&lt;p&gt;But enough on the GPUs, let's now talk data.&lt;/p&gt;
&lt;h2&gt;
  
  
  Data - Feeding the Beast
&lt;/h2&gt;

&lt;p&gt;My simple definition of an AI model that I have used dating pre-ChatGPT has always been that a model is an Algorithm combined with Data. The interesting thing about LLMs is that they take the data piece to a whole new level. We are talking hundreds of Gigabytes of text.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Artificial Intelligence Model = Algorithm + Data&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Not only do you need large amounts of data to feed this beast, you need diversity as well. The data has to be varied enough to help the model understand language in all its forms.&lt;/p&gt;

&lt;p&gt;Which means ingesting everything from classic literature, and code to the latest blog posts. A nice blend of wonderful Shakespearean writing and a bunch of people like myself on the internet with chaotic writing styles all in one mix. Plus, all of this has to be of high quality and representative of the world we live in today - languages, cultures, you name it.&lt;/p&gt;

&lt;p&gt;Sticking with our GPT-4 example, the model was trained on about 10 trillion words. To give you an idea, it would take all Twitter users over 3.5 years to generate 10 trillion words at current rates.&lt;/p&gt;

&lt;p&gt;That said, one could argue that more and more free datasets for training LLMs are becoming available (The Pile - 825GiB, Common Crawlt) making this "easier". True, but most of them still require extensive cleaning and formatting. Moreover, handling data on such a large scale requires robust infrastructure for storage and quick access during training.&lt;/p&gt;
&lt;h2&gt;
  
  
  Not Just Another Neural Network
&lt;/h2&gt;

&lt;p&gt;There's a good reason why only a few people can DIY an LLM. In fact, Mistral AIᅳa French companyᅳmanaged to raise an astounding &lt;a href="https://medium.com/r/?url=https%3A%2F%2Fsifted.eu%2Farticles%2Fpitch-deck-mistral" rel="noopener noreferrer"&gt;$113 million&lt;/a&gt; in seed funding without a product, simply by stating to investors that they had five employees with the expertise to create an LLM from scratch.&lt;/p&gt;


  &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvu4x1dntycv5gf4hb00z.jpg" width="800" height="533"&gt;Photo by Clint Adair on Unsplash
  
&lt;br&gt;


&lt;p&gt;Large Language Models use an advanced type of neural network called Transformers. These are especially efficient at producing models good at predicting the next word in a sentence, which is key for generating coherent text. While bigger isn't always better in most fields, it often is, with LLMs. And now the challenge becomes figuring out how to beat down your large collected dataset into this sophisticated algorithm ᅳthe process known as training.&lt;/p&gt;

&lt;p&gt;Because training can be incredibly time-consuming, optimization becomes a must. This usually involves techniques like distributed training or parallelization to handle computations more efficiently, using mixed precision (32 &amp;amp; 64-bit) to reduce memory usage, and checkpointing to save your progress over time.&lt;/p&gt;

&lt;p&gt;Not to bore you with the details, but my point here is that training an LLM is not for the weak. In fact, at times, a Python implementation of a transformer architecture can look less like Python and more like C.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;MultiHeadAttention&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;Module&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d_model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;n_head&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="nf"&gt;super&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;MultiHeadAttention&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;n_head&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;n_head&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;attention&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;ScaleDotProductAttention&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;w_q&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Linear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d_model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d_model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;w_k&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Linear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d_model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d_model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;w_v&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Linear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d_model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d_model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;w_concat&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;nn&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Linear&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;d_model&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d_model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;forward&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mask&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;w_q&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;w_k&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;w_v&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;attention&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;attention&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;q&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;k&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mask&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;mask&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;concat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;w_concat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;out&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tensor&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
        split tensor by number of head

        :param tensor: [batch_size, length, d_model]
        :return: [batch_size, head, length, d_tensor]
        &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
        &lt;span class="n"&gt;batch_size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d_model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tensor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;size&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

        &lt;span class="n"&gt;d_tensor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;d_model&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;n_head&lt;/span&gt;
        &lt;span class="n"&gt;tensor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tensor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;batch_size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;n_head&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d_tensor&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;transpose&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;tensor&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;concat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tensor&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="sh"&gt;"""&lt;/span&gt;&lt;span class="s"&gt;
        inverse function of self.split(tensor : torch.Tensor)

        :param tensor: [batch_size, head, length, d_tensor]
        :return: [batch_size, length, d_model]
        &lt;/span&gt;&lt;span class="sh"&gt;"""&lt;/span&gt;
        &lt;span class="n"&gt;batch_size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;head&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d_tensor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tensor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;size&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="n"&gt;d_model&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;head&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;d_tensor&lt;/span&gt;

        &lt;span class="n"&gt;tensor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tensor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;transpose&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;contiguous&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;view&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;batch_size&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;d_model&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;tensor&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Beyond Training
&lt;/h2&gt;

&lt;p&gt;After training, you need to make sure you have something useful. And fortunately or unfortunately the bar for a useful model is quite high these days.&lt;/p&gt;

&lt;p&gt;Without proper evaluation, your model might spit out nonsense or even harmful content. The best way to assess it is by benchmarking against existing LLMs. But sometimes, only a human can catch the subtle details, so human evaluation is imperative at this stage.&lt;/p&gt;

&lt;p&gt;If you're lucky enough to have a model that performs well, you can move on to post-training techniques like &lt;strong&gt;fine-tuning&lt;/strong&gt; and &lt;strong&gt;prompt engineering&lt;/strong&gt;. All methods that you might be more familiar with that allow you to adjust your model based on the evaluation results to improve its performance.&lt;br&gt;
And if you're feeling up for it, why not release it to the world with built-in feedback loops to further refine your model over time?&lt;/p&gt;




&lt;p&gt;⁤Still thinking about creating an LLM from scratch? ⁤⁤Go aheadᅳbe my guest!&lt;/p&gt;

&lt;p&gt;Personally, I'll be sticking to finetuning or prompt engineering my way through existing Large Language Models. And though, a Data Scientist, ⁤⁤I'll only consider training Machine Learning models for specific use cases where LLMs are too costly or fail altogether.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;br&gt;
Like this story? Subscribe below, or Connect with me on &lt;a href="https://www.linkedin.com/in/bamboriz/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; &amp;amp; &lt;a href="https://x.com/iamtechonda" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;!&lt;/p&gt;

</description>
      <category>llm</category>
      <category>gpu</category>
      <category>machinelearning</category>
      <category>ai</category>
    </item>
    <item>
      <title>The Emergence of AI Tools: A New Era of Productivity and Efficiency</title>
      <dc:creator>Boris B.</dc:creator>
      <pubDate>Sat, 29 Apr 2023 23:25:53 +0000</pubDate>
      <link>https://dev.to/iamtechonda/the-emergence-of-ai-tools-a-new-era-of-productivity-and-efficiency-63j</link>
      <guid>https://dev.to/iamtechonda/the-emergence-of-ai-tools-a-new-era-of-productivity-and-efficiency-63j</guid>
      <description>&lt;p&gt;As we move further into the digital age, the demand for tools and software that can boost productivity and efficiency has never been higher. In recent years, artificial intelligence (AI) has emerged as a game-changer in this space, with AI tools becoming increasingly prevalent across multiple industries.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In fact, according to AI tool sites like AIToolFinder and Theresanaiforthat, over 2000 AI products have launched in the past year alone. With the launch of GPT-4, it's clear that the influence of AI tools will only continue to grow.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this article, we'll explore the prevalence of AI tools and their impact on productivity, as well as the challenges that come with the abundance of choices. We'll also delve into the future of these tools and how they will continue to shape our society. So buckle up and let's take a deep dive into the world of &lt;strong&gt;AI tools&lt;/strong&gt;!&lt;/p&gt;

&lt;h2&gt;
  
  
  Impact on Productivity
&lt;/h2&gt;

&lt;p&gt;There's no denying that AI tools have a significant impact on productivity. In fact, in some cases, they have been shown to boost productivity by more than five times. This is because they can automate repetitive and time-consuming tasks, allowing us to focus on more complex and creative work.&lt;/p&gt;

&lt;p&gt;This impact is being felt across multiple industries, from marketing to music, programming and art. For example, in marketing, AI tools can analyze vast amounts of data to help businesses make data-driven decisions and create personalized marketing campaigns. &lt;/p&gt;

&lt;p&gt;In the music industry, AI tools can help artists create new sounds and generate music based on different genres and styles. In the art world, AI tools can help artists create stunning pieces by generating new ideas and designs.&lt;/p&gt;

&lt;p&gt;However, it's important to exercise caution when it comes to our dependence on these tools. The risk of becoming too reliant is high. While they can undoubtedly improve productivity, it's important to remember that they are not infallible. &lt;/p&gt;

&lt;p&gt;This is because they are only as good as the data they are trained on, and there is always the risk of bias or errors in the data. Moreover, if we become too reliant, we risk losing critical thinking skills and creativity, which are essential for problem-solving and innovation.&lt;/p&gt;

&lt;p&gt;In the next section, we'll explore the challenge of too many AI tools and how to navigate this landscape to make informed decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem with Too Many AI Tools
&lt;/h2&gt;

&lt;p&gt;While the proliferation of AI tools has undoubtedly improved productivity, it has also created a new problem: too many options. With the launch of GPT4, this number is likely to increase even further.&lt;/p&gt;

&lt;p&gt;The sheer number of AI tools available can make it challenging to decide which one to use. Moreover, many of these tools are GPT-powered, which means they offer similar functionality. As a result, it can be difficult to discern which one is the best fit for your needs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2zabltxm154w05h38lw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fl2zabltxm154w05h38lw.jpg" alt="Confused with options" width="800" height="830"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;One solution to this problem is to look for a tool that combines multiple functionalities needed for your work. For instance, some tools may offer both natural language processing and image recognition capabilities, which can be useful for marketing campaigns that require both text and visuals. &lt;/p&gt;

&lt;p&gt;Additionally, directory sites like &lt;a href="https://aitoolfinder.net/" rel="noopener noreferrer"&gt;AItoolfinder&lt;/a&gt; can be helpful because they categorize tools by industry, task, and other parameters. These sites may also offer exclusive deals on certain products, making them an attractive option.&lt;/p&gt;

&lt;p&gt;For builders or individuals with a curiosity for how these tools work, there is a different problem. While it's natural to want to build one's own AI tool, it's important to keep in mind that most of these tools powered by GPT are simply extensions of it. &lt;/p&gt;

&lt;p&gt;This means that a simple feature addition by OpenAI could render hundreds of these tools useless. However, it's worth noting that OpenAI and GPT still struggle with user experience, which presents a unique opportunity for builders to create a better user experience.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Future of AI Tools for Builders
&lt;/h2&gt;

&lt;p&gt;For those with a builder mindset, the future of AI tools presents an exciting opportunity. While the majority of current tools are powered by GPT and are merely extensions, there is still room for real innovation and growth.&lt;/p&gt;

&lt;p&gt;As AI technology continues to improve, we can expect to see more AI-enhanced traditional systems across different industries. For instance, AI tools can be used to automate repetitive tasks, analyze data, and make predictions. &lt;br&gt;
This will enable companies to work more efficiently and make better decisions. A nice example is *&lt;em&gt;EarlyBird *&lt;/em&gt;- a voice-based onboarding tool powered by AI for employability providers.&lt;/p&gt;

&lt;p&gt;Moreover, as AI becomes more ubiquitous, there will be a growing demand for customization and integration. This presents an opportunity for builders to create new and innovative systems that meet specific needs and integrate with existing systems.&lt;/p&gt;

&lt;p&gt;In addition to building new tools, builders can also contribute to the development of GPT and other AI technologies. By identifying and solving UX problems, builders can help improve the user experience of AI tools and make them more accessible to a wider audience.&lt;/p&gt;

&lt;p&gt;Ultimately, the future of AI tools for builders is one of endless possibility. As the technology evolves, so too will the opportunities for builders to create new and innovative products that reshape the way we work and live.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wrapping Up ...
&lt;/h2&gt;

&lt;p&gt;In conclusion, the prevalence of AI tools has brought about both benefits and challenges. On the one hand, these tools have the potential to revolutionize productivity and reshape society. On the other hand, the sheer number of tools available has led to the problem of choice overload, and the risk of dependence on these tools is high.&lt;/p&gt;

&lt;p&gt;Despite these challenges, the future of AI tools looks bright. With the continued development of AI technologies, we can expect to see more advanced and sophisticated tools that are tailored to specific needs and industries.&lt;/p&gt;

&lt;p&gt;Nonetheless, it's important to approach AI with a critical eye, understanding the potential benefits and limitations. It's also crucial to consider the ethical implications of AI tools and to ensure that they are used in a responsible and equitable manner.&lt;/p&gt;

&lt;p&gt;For those with a builder mindset, there is a wealth of opportunity in the AI tool space. By building new and innovative products, and contributing to the development of existing ones, builders can help shape the future of work and technology. &lt;/p&gt;

&lt;p&gt;If you are a builder interested in discussing ideas or potential collaborations, feel free to reach out to me on &lt;a href="https://twitter.com/iamtechonda" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>futuristic</category>
      <category>productivity</category>
      <category>discuss</category>
    </item>
    <item>
      <title>How much does your GitHub profile reflect your experience as a DEV ?</title>
      <dc:creator>Boris B.</dc:creator>
      <pubDate>Thu, 23 Jul 2020 09:54:03 +0000</pubDate>
      <link>https://dev.to/iamtechonda/how-much-does-your-github-profile-reflect-your-experience-as-a-dev-56be</link>
      <guid>https://dev.to/iamtechonda/how-much-does-your-github-profile-reflect-your-experience-as-a-dev-56be</guid>
      <description>&lt;p&gt;I find myself having an empty GitHub profile mainly because I work mostly with companies who tend to have private repos on GitHub. As a result, my personal Github is empty and does not reflect my experience as a Dev.  &lt;/p&gt;

&lt;p&gt;What are your thoughts ?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>github</category>
    </item>
    <item>
      <title>Strapi vs API Platform</title>
      <dc:creator>Boris B.</dc:creator>
      <pubDate>Wed, 29 Apr 2020 22:27:45 +0000</pubDate>
      <link>https://dev.to/iamtechonda/strapi-vs-api-platform-gdl</link>
      <guid>https://dev.to/iamtechonda/strapi-vs-api-platform-gdl</guid>
      <description>&lt;p&gt;What are your thoughts on these 2 options for building backend APIs ?&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Do u use Tailwind in React?</title>
      <dc:creator>Boris B.</dc:creator>
      <pubDate>Mon, 16 Dec 2019 15:05:45 +0000</pubDate>
      <link>https://dev.to/iamtechonda/do-u-use-tailwind-in-react-46m8</link>
      <guid>https://dev.to/iamtechonda/do-u-use-tailwind-in-react-46m8</guid>
      <description>&lt;p&gt;Hearing à lot about Tailwind CSS recently. Is there a React implementation and is it better than Material-ui ? &lt;/p&gt;

</description>
      <category>css</category>
      <category>react</category>
      <category>discuss</category>
    </item>
    <item>
      <title>Is React ➕ Firebase the perfect combo?</title>
      <dc:creator>Boris B.</dc:creator>
      <pubDate>Fri, 13 Dec 2019 22:28:41 +0000</pubDate>
      <link>https://dev.to/iamtechonda/is-react-firebase-the-perfect-combo-med</link>
      <guid>https://dev.to/iamtechonda/is-react-firebase-the-perfect-combo-med</guid>
      <description>&lt;p&gt;Am just learning React js and am wondering if React and Firebase are the right pick for my projects going forward. What do y'all think? &lt;/p&gt;

</description>
      <category>react</category>
      <category>firebase</category>
      <category>discuss</category>
    </item>
    <item>
      <title>CORS is always so annoying</title>
      <dc:creator>Boris B.</dc:creator>
      <pubDate>Sat, 05 Oct 2019 11:44:48 +0000</pubDate>
      <link>https://dev.to/iamtechonda/cors-is-always-so-annoying-1jco</link>
      <guid>https://dev.to/iamtechonda/cors-is-always-so-annoying-1jco</guid>
      <description>&lt;p&gt;Why is CORS always so annoying?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>aws</category>
    </item>
    <item>
      <title>The Untold Secret to SYMFONY REST APIs in Less Than Ten Minutes</title>
      <dc:creator>Boris B.</dc:creator>
      <pubDate>Sun, 15 Sep 2019 21:23:17 +0000</pubDate>
      <link>https://dev.to/iamtechonda/the-untold-secret-to-symfony-rest-apis-in-less-than-ten-minutes-52fh</link>
      <guid>https://dev.to/iamtechonda/the-untold-secret-to-symfony-rest-apis-in-less-than-ten-minutes-52fh</guid>
      <description>&lt;p&gt;Hello, today I will love to share a very interesting experience I had this year with API Development. Basically it is about how I was able to build a production-ready Symfony REST API with little prior knowledge of the framework.   &lt;/p&gt;

&lt;p&gt;So I had this project a client wanted me to work on but was very specific about using Symfony. It was a backend API to be used to power a front-end React SPA. Even though I had never worked with Symfony, I felt I could handle it. I did have some experience with CodeIgniter 3 and Slim PHP which I knew I could leverage but I had never built an API before. But I knew I could not let this go – the experience – plus the client was playing really well 😉 . So I got to work …&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Magic of Books&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;“Books are a uniquely portable magic.” ― Stephen King&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I needed some magic. I had to build not just an API but a good one. And yes, I am one of those who believe in doing work only if you can get well done. So I turned to books. The first that crossed my mind was Philip Sturgeon’s &lt;strong&gt;BUILDING APIs YOU WON’T HATE&lt;/strong&gt;. A friend had once recommended it but I didn’t need it at the time.&lt;/p&gt;

&lt;p&gt;I grabbed the book and finished it in no time. And what I really loved was how the book demystified the whole thing for me. In his book, Philp really makes it fun and I immediately began feeling very confident after just knowing all these new concepts. I then went further to read another book – &lt;strong&gt;UNDISTURBED REST&lt;/strong&gt; by Michael Stowe. After those two, I literally felt APIs run the world.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;SYMFONY REST APIs: A First Try&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I was now ready to get my hands. But first I had to learn Symfony.&lt;/p&gt;

&lt;p&gt;I watched YouTube videos and took some courses but the best by far was the &lt;strong&gt;Stellar Development with Symfony 4 course&lt;/strong&gt; on &lt;a href="https://symfonycasts.com/screencast/symfony" rel="noopener noreferrer"&gt;SymfonyCasts&lt;/a&gt;. If you are like me and really new to Symfony like I was, SymfonyCasts is the place you should go to. Symfony 4 is very interesting and when I found out that most of the cool stuff came in Version 4, I was so happy I had never tried Symfony before that 😊 . Once the fundamentals were in place I had to start seeing how to bring in the whole API stuff into the show. That’s when I came across FOSRESTBundle and API Platform. And now there was a dilemma!&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;FOSRESTBundle VS API Platform&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;There are a lot of articles and posts all over about this so I am going to rant about which is better but rather what worked for me. So I read all the comparisons I could find and decided to try the two out for myself. I first built a simple API in Symfony (no tools) which was really cool and simple. I then tried doing the same with &lt;a href="https://github.com/FriendsOfSymfony/FOSRestBundle" rel="noopener noreferrer"&gt;FOSRESTBundle&lt;/a&gt; but found it a bit tricky and I spent a lot of time trying to figure out how to make it work. It made the process easier but I probably did not feel the ease like I would have loved to.&lt;/p&gt;

&lt;p&gt;At that point, I was already wanting to build the API with Symfony (no tools) but then I gave API Platform a try and sincerely, I was blown away !&lt;/p&gt;

&lt;p&gt;So there I was, excited about this new discovery which made building an API – So Super Easy. It was too good to be true so I got did a lot of research and a very good article I read was one by Marek Gajda – &lt;a href="https://tsh.io/blog/practical-guide-to-api-platform-how-to-tell-if-its-the-right-framework-for-you/" rel="noopener noreferrer"&gt;Practical guide to API Platform: How to tell if it’s the right framework for you&lt;/a&gt;. And then I decided API Platform was the guy for my SYMFONY REST API.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Conclusion&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To keep it really brief API platform is a framework built on Symfony that speeds up the development RESTful APIs. It is based upon best practices and focuses on not reinventing the wheel when it comes to API Development.&lt;/p&gt;

&lt;p&gt;SYMFONY REST APIs with API Platform are definitely worth considering for any small, medium or large scale projects. Although far from perfect I just really believe in the project and the team. They do a great job to fix issues and respond to questions on their Slack channel. That’s what enabled me to complete my first project and to build a production-ready RESTFUL API with little prior experience in Symfony.&lt;/p&gt;

&lt;p&gt;I would be putting up a full post on my &lt;a href="https://camertechtrends.com/secret-to-symfony-rest-apis-in-less-than-ten-minutes/" rel="noopener noreferrer"&gt;blog&lt;/a&gt; on some challenges I faced with API Platform (and still face now), some tips on how to get through them and how I went to complete the API and host it on AWS Elastic Beanstalk.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do leave any questions you have and if you have any experience with API platform, I will love to hear it&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;

</description>
      <category>php</category>
      <category>productivity</category>
      <category>career</category>
    </item>
    <item>
      <title>What’s the Difference Between Data Science and Data Analytics?</title>
      <dc:creator>Boris B.</dc:creator>
      <pubDate>Thu, 12 Sep 2019 17:02:46 +0000</pubDate>
      <link>https://dev.to/iamtechonda/what-s-the-difference-between-data-science-and-data-analytics-3917</link>
      <guid>https://dev.to/iamtechonda/what-s-the-difference-between-data-science-and-data-analytics-3917</guid>
      <description>&lt;p&gt;As businesses collect more and more data, the roles of data scientists and data analysts have grown exponentially.&lt;/p&gt;

&lt;p&gt;But what exactly do they each do?&lt;/p&gt;

&lt;p&gt;To get a better idea of which path is right for you, you must first decide whether you’re more interested in working with numbers and business intelligence tools or with programming and machine learning.&lt;/p&gt;

&lt;p&gt;You must also determine where you see yourself sitting in your future office environment. If you see yourself collaborating with business managers, stakeholders and CEOs, the path of a data analyst will challenge you daily to contribute to business growth. If you find yourself more comfortable with engineering teams, you may be best suited to the field of data science.&lt;/p&gt;

&lt;p&gt;Just thoughts I should share some notes from a webinar I participated in.&lt;/p&gt;

&lt;p&gt;Cheers!&lt;/p&gt;

</description>
      <category>career</category>
    </item>
    <item>
      <title>The Early Internet is disappearing</title>
      <dc:creator>Boris B.</dc:creator>
      <pubDate>Mon, 09 Sep 2019 08:30:25 +0000</pubDate>
      <link>https://dev.to/iamtechonda/the-early-internet-is-disappearing-5789</link>
      <guid>https://dev.to/iamtechonda/the-early-internet-is-disappearing-5789</guid>
      <description>&lt;p&gt;Online Now ≠ Online Tomorrow&lt;br&gt;
The early #internet is disappearing. Wanna at least know what it looked like? 🤓&lt;/p&gt;

&lt;p&gt;&lt;a href="https://oneterabyteofkilobyteage.tumblr.com/" rel="noopener noreferrer"&gt;https://oneterabyteofkilobyteage.tumblr.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>html</category>
    </item>
    <item>
      <title>Googling as a Software Engineer</title>
      <dc:creator>Boris B.</dc:creator>
      <pubDate>Wed, 04 Sep 2019 14:49:59 +0000</pubDate>
      <link>https://dev.to/iamtechonda/googling-as-a-software-engineer-3a1n</link>
      <guid>https://dev.to/iamtechonda/googling-as-a-software-engineer-3a1n</guid>
      <description>&lt;p&gt;How much Googling to you do as a Software Engineer? As for me ... ALOT&lt;br&gt;
&lt;a href="https://localghost.dev/2019/09/everything-i-googled-in-a-week-as-a-professional-software-engineer/" rel="noopener noreferrer"&gt;https://localghost.dev/2019/09/everything-i-googled-in-a-week-as-a-professional-software-engineer/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>career</category>
      <category>jokes</category>
    </item>
  </channel>
</rss>
