Why can't we train large AI models without GPU?

#News ·2025-01-09

Hello, everyone. I'm flying fish.

When it comes to video cards, most people's first reaction is, isn't this for playing games?

In fact, the GPU of the graphics card can also be used as an AI chip.

Before the GPU fire, the most mentioned is the CPU, so what is the difference between the two?

The number of computing units in a GPU is much higher than in a CPU.

The Nvidia H100 GPU, for example, contains more than 18,000 cores, while the top-of-the-line Intel I9 CPU has only 24 cores, and the GPU has more than 700 times as many cores as the CPU.

As a result, cpus are good at completing individual operations quickly and are suitable for programs that need to be executed one by one.

Gpus are good at processing large numbers of operations in parallel, even if a single operation is slow, but can handle multiple tasks at the same time.

It is equivalent to the difference between asking two experts to write 10,000 primary school homework and asking 10,000 primary school students to write 10,000 homework.

So why do AI training use Gpus instead of cpus?

Because AI training tasks are usually simple, repetitive and computationally heavy, Gpus can run in parallel, which can fully release computational efficiency.

To put it more professionally:

  • CPU is serial computation based on data flow, GPU is matrix computation based on multiple variables, the latter is more suitable for AI computation based on neural network algorithm.

To further speed up training, work with larger AI models (such as ChatGPT).

Developers can bring together many data center Gpus to form supercomputers.

Or create a very large-scale accelerator.

Recently, Nvidia NIVDIA, which sells graphics cards, surpassed Apple and Microsoft to become the world's most valuable company, which is behind the global computing power race for AI.

Microsoft bought 485,000 Gpus, the number one buyer in the world.

Bytedance bought 230,000 Gpus, the second largest buyer in the world.

Tencent, which bought about 230,000 Gpus, is the third largest buyer in the world.

After Nvidia almost monopolized the graphics card in the computer field, it almost reached the global monopoly level in the AI field.

If you have any additional content, please leave a comment in the comment section.

Question of the day

Problem description

Count the number of words in a string, where words are consecutive characters that are not Spaces.

Note that you can assume that the string does not include any unprintable characters.

Example:

Input: "Hello, my name is John"; Output: 5 Explanation: The word here refers to consecutive characters that are not Spaces, so "Hello," counts as one word. 

     
  • 1.
  • 2.
  • 3.

Solution idea

We can handle strings from front to back s Characters that are Spaces are skipped (do not count).

For non-space characters, a count is performed after traversing a complete word (a consecutive paragraph).

Code implementation

JavaCode:

class Solution { public int countSegments(String s) { int n = s.length(); int ans = 0; for (int i = 0; i < n; ) { if (s.charAt(i) ==  && i++ >= 0) { continue; } while (i < n && s.charAt(i) ! = ) { i++; } ans++; } return ans; }} 

     
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.


TAGS:

  • 13004184443

  • Room 607, 6th Floor, Building 9, Hongjing Xinhuiyuan, Qingpu District, Shanghai

  • gcfai@dongfangyuzhe.com

  • wechat

  • WeChat official account

Quantum (Shanghai) Artificial Intelligence Technology Co., Ltd. ICP:沪ICP备2025113240号-1

friend link