Experience Open Resource with AIN Cloud beta

AIN Cloud beta release posting series (2/2)

DS
6 min readFeb 11, 2019

Language: English / 한국어

  1. What is Open Resource and why is it necessary?
  2. Experience Open Resource with AIN Cloud beta (This article)

Driven by our vision for Open Resource, we here at the AI Network have been working hard for the past few months, and are finally proud to announce the release of our Beta version today. This beta version contains minimal features for the purpose of providing a proof-of-concept. We will continue to improve based on your feedback.

🖥 AIN Cloud beta is optimized for desktop Chrome browser.

AIN Cloud access and membership

First, select the AIN Cloud menu on the AI ​​Network homepage(ainetwork.ai) or enter cloud.ainetwork.ai in the address bar of the browser. Select Login / Sign up in the upper right corner of the screen. When you register, you will receive an e-mail address verification e-mail in your mailbox. If you open this e-mail and select the authentication link, you will receive 150 AIN as free credits which you can use directly in the AIN Cloud after the authentication is completed.

Experience Open Resource

Now, when you log in to the AIN Cloud, you can see that 150 free AIN credits have been added to the left of your email address. Next, click on the purple “Run” button below your address. You will shortly see the screen below. You have just experienced some of the Open Resource. I expect the process was much easier than you expected.

(Currently, the beta version does not handle more than one run request at a time, so you may have to wait for a minute while the first request is being handled)

What just happened?

The process of starting from Open Source then connecting to Resource (execution environment) is the core of Open Resource. We have prepared a few sample open source projects for you to experience this process through the AIN Cloud. In order to run those samples, the execution environment provided by Backend.AI is automatically connected so that they can be executed immediately without preparing any execution environment.

Our sample projects include various “models”, which simulate ‘Digital Intelligence’ created as a result of machine learning certain data. Among these sample projects, the source code that you just selected by default and ran by pushing the Run button was created to immediately execute the task utilizing the SQuAD data set. The SQuAD task is for evaluating machine learning performance using Google’s BERT model mentioned in our previous posting.

SQuAD is a comprehension task, where the AI agent is required to extract text relevant to a given set of questions and paragraphs. There is a detailed description in the Introduction area on the left side of the screen, but here again, I will briefly explain what the results are in the ‘Result’ window and how to use the BERT AI with this code.

In the Result area below the red text, there are five pairs of questions and answers. These answers are BERT’s responses to the questions, which were found by scanning through the sample paragraph on chemistry below. The answer to the second question is helium, but everything except the answer “hydrogen and helium” is correct.

Oxygen is a chemical element with symbol O and atomic number 8. It is a member of the chalcogen group on the periodic table and is a highly reactive nonmetal and oxidizing agent that readily forms compounds (notably oxides) with most elements. By mass, oxygen is the third-most abundant element in the universe, after hydrogen and helium. At standard temperature and pressure, two atoms of the element bind to form dioxygen, a colorless and odorless diatomic gas with the formula O2. Diatomic oxygen gas constitutes 20.8% of the Earth’s atmosphere. However, monitoring of atmospheric oxygen levels show a global downward trend, because of fossil-fuel burning. Oxygen is the most abundant element by mass in the Earth’s crust as part of oxide compounds such as silicon dioxide, making up almost half of the crust’s mass.

Below, there are three predictive answers that are likely to be correct for each of these five pairs of questions and answers. The first of these is the one presented above as the correct answer for each question.

You can also test the BERT AI with other sentences. Select the Code tab on the left side of the screen and scroll to line 1042 to edit the question content and number, or insert a different paragraph in the context field to test the new query response.

What if you didn’t use the AIN Cloud?

If users want to test BERT directly, users must do pre-training before conducting fine-tuning. Fine-tuning is the process of fine-tuning a pre-trained model so that it will be optimized to perform the machine learning performance assessment task.

Google published source code and pre-trained models(link) so you can download and use them to fine-tune without any pre-training. The process is summarized as follows.

  1. Prepare the hardware execution environment
    You need a computer with a GPU with more than 12 GB of available memory. At present, you would need NVIDIA’s Tesla K40 or better GPU that costs about $1,030 USD.
  2. Prepare the software execution environment
    Next, install the NVIDIA GPU driver(link) and the Docker(link).
  3. Download pre-trained models and SQuAD data
    Download the models and data you want from the link below.
    - BERT pre-trained model (link)
    - SQuAD 1.1 (link. Recently 2.0 version has been uploaded)
  4. Download and run BERT code
    After cloning the BERT code from GitHub(link), run run_squad.py and fine-tune the model. If configured correctly, you should be able to use the Docker image (eg tensorflow / tensorflow: 1.12.0-rc2-gpu) with the Tensorflow library installed.
  5. Fine-tuning
    In the process of fine-tuning your model, you will encounter many challenges. According to our developers who have gone through this entire process multiple times, the GPU regularly overheats and crashes the computer. We required additional air circulators to overcome this problem. They also had to tune the training parameters slightly to prevent Memory Exceeded errors.

It took about two days to get through this process. If you are new to tools like Docker, it will take additional time to learn how to use the tools.

With the AIN Cloud, did it take you two minutes from signing up to running the source code? Even without engineering expertise or powerful high-end GPUs, this complicated program can be run end-to-end in just a couple of minutes (only the desktop Chrome browser is still officially supported).

Next: AIN Cloud v1

Since the beginning of the project, we have shared an ambitious vision of Open Resource that was difficult to fully understand at the same time. Now we have finally taken our first step in realizing this vision, with a clear use cases and product. We hope you share our enthusiasm in the realization of this Open Resource dream.

We’re planning to release 1.0 version of our product within the first half of this year. In addition to the sample source code, 1.0 version will allow users to link their source code directly with the Resource and will support a much wider variety of projects in the Open Resource environment.

As you may have noticed, the AIN Cloud is being run through a blockchain and a cryptocurrency called AIN. We are currently using The Etherium network and we are developing our own blockchain to better realize our vision.

--

--