Our journey to build an A.I. with Perl.


 We love Perl at Supervene LLC! So we have documented our failures and success while developing an A.I. using the Perl language.


Project Categories:

 A.I. is a hot button topic all over the internet with release of ChatGPT. If you haven't tried it yet, I would highly recommend testing its abilities. However, the exact methds used to develop such a system are somewhat obfuscated by layers or different software, programming languages, and frameworks that have to be configured in such a way that it all just works together. While we don;t yet know the full working set of ChatGPT (GPT-4) we do know what makes GPT-3.5 work and here is the list:

  • Python
  • PyTorch
  • C++
  • CUDA
  • OpenCL
  • jQuery
  • Node.js
  • TensorFlow
  • WebAssembly
  • Javascript
  • CSS
  • HTML
  • Others..

We don't really know what else is being used without downloading and diving deep int othe code, but the point is, it is bloated. This is why we set out to build an A.I. solution that was simple and used only standard "off the shelf" components. The only exception here is CUDA libraries, but this is only neccessary for the scaling process later on. So lets dive into the process and see what happens! So how does it all work? This is the question we started with. So we will break it down without all the "lingo" and try explain it in plain old english.

In order to create an A.I. similar to ChatGPT, you need to setup a neural network. This is just a fancy way of creating a system of checks that provide weights to saved values. A weight is numeric assignment that detemines how important or relevant an item is. So each word, number, or symbol has a weight. The weights are constantly shifted based on user input, for exmaple if you ask an A.I. about what dog food is best, weights are shifted for categories regarding dogs and food and best. The shifting of weights are called biases. So user input affects the output by creating biases in saved data and the rest of the weights are there to determine what words are used to form a complete sentence. This is only a partial answer, because this doesn't explain HOW an A.I. knows what to use to form a proper sentence. So whats the going on? Training. The A.I. must digest millions of lines of human sentances, paragraphs, articles, conversations, stories, and more in order to learn the proper syntax. A well known method is N-Grams. N-Grams are word pairs that get evaluated to determine the weight of the leading word. The "N" in N-Gram is a place holder for a value, so it can be 2-gram, 3-gram-4-gram, or more if your wish. But the practicality of N-Grams higher than 4 or 5 begin to lose value as the weights are shifted less and less between trainings. For instance, if we were to use 2-gram training set of the phrase: "This is a sentence for training", the 2-grams would appear as these:

  • This, is
  • is, a
  • a, sentence
  • sentence, for
  • for, training

The idea behind n-grams, is to see how often the leading word is followed by the next word i nthe sequence. To find out which word is most relevant, we assign weights. So now our example looks like this:

  • This, is, 0
  • is, a, 0
  • a, sentence, 0
  • sentence, for, 0
  • for, training, 0

This is a compelte 2-gram data set that is untrained. So each weight is zero. in order to make this data useful, we need more data to create more fine tuned values. For this we will create a new test sentence: "This is a second sentence for training the AI". And here is the 2-Gram data again:

  • This, is, 0
  • is, a, 0
  • a, second, 0
  • second, sentence, 0
  • sentence, for, 0
  • for, training, 0
  • training, the, 0
  • the, ai, 0
More coming soon...


 This collection is still rather small, but using 2,3,4 gram configurations, we are able to create models with over 500 million parameters.


Here is a list of data files used for training our A.I.


 This collection is still rather small, but using 2,3,4 gram configurations, we are able to create models with over 500 million parameters.


Here are the basic requirements to command and control the A.I.


 These are the minimum requirements we used to train, save, load, and interact with our A.I.


Building a CLI

Here are the basic requirements to command and control the A.I.


 These are the minimum requirements we used to train, save, load, and interact with our A.I.


Building a CLI

Here are the basic requirements to command and control the A.I.


 These are the minimum requirements we used to train, save, load, and interact with our A.I.


Scaling A.I.