laitimes

Demystified: How are AI models made?

author:Korean drama King

Artificial intelligence in 2023 is like a beast, sweeping the world, involving every industry in this battle intentionally or unintentionally, or even "forced" to be involved in this "battle".

Demystified: How are AI models made?

Perhaps someone will ask, "For ordinary people like us, is it useful for us to know this?" Will it affect our monthly salary of 3,000 yuan? ”

The answer is yes, it's useful and has an impact on wages, so it's important to raise our awareness!

Everything in the world has its own development cycle, and a certain news boss declares that it is necessary to plan ahead.

Demystified: How are AI models made?

Also, now people are even starting to train virtual girlfriends! These virtual girlfriends can make 24-hour video calls, send messages at any time, reply to messages at any time, etc., and they will not lose their temper, they will only find ways to make you happy.

Demystified: How are AI models made?

Virtual girlfriend trained by a foreign company

Well, without further ado, let's get back to business.

First, training a model goes through three steps.

The first step is to collect a dataset, which is a long and highly technical undertaking. For example, if you want to train an "MVP model" that generates emotional copy, you'll need to source a lot of copy online, including positive, negative, and neutral text, covering a variety of emotions and topics. You can get this data through search engines, social media, news articles, movie reviews, and more. Remember, collect enough data!

Demystified: How are AI models made?

The second step is data cleaning and preprocessing, where the collected data often contains noisy, redundant or inconsistent parts that need to be cleaned and collated to ensure data quality and consistency. This includes actions such as removing duplicates, handling missing values, correcting errors, and so on. Preprocessing may also include operations such as word segmentation, removal of stop words, stemming, or part-of-speech tagging. During preprocessing, make sure that your PC configuration and model parameters match so that the model can better represent and understand the text content. Keep in mind that the larger the dataset, the longer the preprocessing time.

Demystified: How are AI models made?

This is the pre-processing system

The third step is model training and optimization, choosing the appropriate machine learning or deep learning model for your task, such as a recurrent neural network (RNN) or Transformer model, and training the model using the prepared dataset. During the training process, you need to adjust the hyperparameters of the model, select the appropriate loss function and optimization algorithm, and perform iterative optimization until the expected performance level is reached.

The loss value is small

batch_acc The accuracy rate should be high

The LR learning rate should be moderate

[Refer to the following figure, this is not trained, but you have to remember what these three parameters mean]

Demystified: How are AI models made?

The model in training

Like the general training of a self-used "MVP model" how long to question, you need to see the size of the graphics card, speed is linked to money!

Once you've trained a model, it can be applied to a variety of domains. For example, if you want to build an intelligent customer service bot, you can apply the model to automatically reply to the user's messages; If you want to do sentiment analysis, you can use the model to identify sentimental tendencies in text; If you want to do text generation, you can use models to automatically generate copywriting or articles, etc.

Well, the above are the three main steps of model training. For ordinary people like us, there is still an opportunity to participate in the training of small language models. Successfully training a model can entertain itself and is also a fun experiment. Even if the training is unsuccessful, it is a learning process that is beneficial regardless of the outcome.

Mastering the basic steps of AI training models will not only allow you to better understand and apply AI technology, but also improve your competitiveness in related industries. Whether you work in a technical or non-technical job, understanding the fundamentals and applications of AI will be one of the must-have skills for the future.

In the future, the development of artificial intelligence will bring more opportunities and challenges. By constantly learning and adapting to new technological developments, we are better able to cope with these changes and maintain a competitive edge in this era of artificial intelligence.

Demystified: How are AI models made?

Read on