Majid Al-RaimiFull guideالشرح الكامل

COE 592Lecture 01المحاضرة 01Full guideالشرح الكامل

Why efficient deep learningلماذا التعلم العميق الكفء

The whole lecture on one page, taught concept by concept. Work through the parts in order, mark each concept once you understand it, and open the slide chips when you want the original slides.المحاضرة كاملة في صفحة واحدة، مشروحة مفهومًا مفهومًا. امشِ على الأجزاء بالترتيب، وعلّم كل مفهوم بعد أن تفهمه، وافتح أزرار الشرائح عندما تريد الرجوع إلى الشرائح الأصلية.

Partsالأجزاء
3
Conceptsالمفاهيم
15
Slidesالشرائح
24
Readingمدة القراءة
90 min90 دقيقة
Understoodما فهمته
0/15 conceptsمفاهيم

Part 01: Accuracy comes at a costالدقة لها ثمن

Deep learning now beats humans on ImageNet, but every accuracy gain was paid for in computation and model size, and efficient design (NAS, MCUNet, on-device training) is what brings it to phones and IoT devices.تتفوق نماذج التعلم العميق اليوم على البشر في ImageNet، لكن كل زيادة في الدقة دُفع ثمنها حسابًا وحجمًا للنموذج، والتصميم الكفء (NAS وMCUNet والتدريب على الجهاز) هو ما يوصلها إلى الهواتف وأجهزة إنترنت الأشياء (IoT).

6 concepts6 مفاهيم, ، slides 1-8الشرائح 1-8

Why this part mattersلماذا يهمّ هذا الجزء

Every later part of this lecture, from segmentation and diffusion models to LiDAR, language models, accelerators and microcontrollers, is a response to one trade-off introduced here: accuracy is bought with computation and memory, and the devices you want to deploy on cannot pay the bill.

This part builds that trade-off from the ground up. You will learn to read the two charts that anchor the whole course (top-5 error over the ImageNet years, then top-1 accuracy against MACs and parameters), to compute the reduction ratios that headline efficient-model papers, and to argue why efficiency matters for privacy, cost and connectivity and not only for speed. The exam asks exactly these things, and your own embedded ML research lives on the frontier the last two concepts describe.

كل جزء لاحق في هذه المحاضرة، من نماذج التقسيم (segmentation) ونماذج الانتشار (diffusion) إلى LiDAR ونماذج اللغة والمسرّعات والمتحكمات الدقيقة، هو استجابة لمقايضة واحدة نقدمها هنا: الدقة تُشترى بالحوسبة والذاكرة، والأجهزة التي تريد النشر عليها لا تستطيع دفع هذه الفاتورة.

يبني هذا الجزء تلك المقايضة من الأساس. ستتعلم قراءة المخططين اللذين يرتكز عليهما المقرر كله (خطأ top-5 عبر سنوات ImageNet، ثم دقة top-1 مقابل MACs وعدد المعاملات)، وحساب نسب التقليل التي تتصدر عناوين أوراق النماذج الكفؤة، والدفاع عن أهمية الكفاءة للخصوصية والتكلفة والاتصال وليس للسرعة فقط. الامتحان يسأل عن هذه الأشياء بالضبط، وبحثك أنت في تعلم الآلة المدمج يقع على الحدّ الذي يصفه المفهومان الأخيران.

By the end you canفي نهاية هذا الجزء ستستطيع

  1. State the course challenge and name the three pillars, with one efficiency lever per pillar.تذكر تحدي المقرر وتسمّي الركائز الثلاث، مع أداة واحدة لتحسين الكفاءة في كل ركيزة.
  2. Define top-5 error and top-1 accuracy precisely and explain why they cannot be compared directly.تعرّف خطأ top-5 ودقة top-1 تعريفًا دقيقًا، وتشرح لماذا لا يمكن مقارنتهما مباشرة.
  3. Read a bubble chart of top-1 accuracy versus MACs and parameters, and quantify diminishing returns.تقرأ مخطط الفقاعات لدقة top-1 مقابل MACs وعدد المعاملات، وتقيس تناقص العائد بالأرقام.
  4. Compute a computation reduction ratio and explain the Pareto frontier shift produced by architecture search.تحسب نسبة تقليل الحوسبة، وتشرح انزياح حدّ باريتو (Pareto frontier) الذي ينتجه البحث عن المعماريات.
  5. Explain why TinyML and on-device training are hard, using the memory tiers and the cost of backpropagation.تشرح لماذا يصعب TinyML والتدريب على الجهاز، مستخدمًا مستويات الذاكرة وتكلفة الانتشار العكسي (backpropagation).

Open the camera on your phone and it finds faces before you press anything. Ask a speaker a question and a language model answers. Paste a screenshot into a chatbot and it reads the text and the picture together. Vision, language and multimodal tasks are all served today by deep networks, and every one of those answers costs billions of arithmetic operations. Classifying a single image with ResNet-50 takes about 3.9 billion multiply-accumulate operations (Sze et al., 2017), and that is a model from 2015 doing the easiest of the three tasks.

افتح كاميرا هاتفك وستجد أنها تكتشف الوجوه قبل أن تضغط أي زر. اسأل مكبّر صوت ذكيًا سؤالًا فيجيبك نموذج لغة. الصق لقطة شاشة في روبوت محادثة فيقرأ النص والصورة معًا. مهام الرؤية واللغة والمهام متعددة الوسائط تخدمها اليوم كلها الشبكات العميقة، وكل إجابة من هذه الإجابات تكلّف مليارات العمليات الحسابية. تصنيف صورة واحدة بـ ResNet-50 يحتاج نحو 3.9 billion عملية ضرب وجمع تراكمي (multiply-accumulate) (Sze et al., 2017)، وهذا نموذج من عام 2015 يؤدي أسهل المهام الثلاث.

That is the whole tension of this course, and slide 2 states it in one line. Machine learning (ML) and deep learning are applied everywhere, they are computationally expensive, and the challenge is to make them lightweight and fast without losing accuracy. Every technique you will learn, from pruning and quantization to architecture search, hardware accelerators and tiny Inference engines, is one answer to that single question. It helps to write the question the way an optimization course would: keep accuracy as high as possible while staying under whatever budget the target device imposes.

هذا هو التوتر الأساسي في المقرر كله، والشريحة 2 تلخصه في سطر واحد. Machine learning (ML) والتعلم العميق يُطبَّقان في كل مكان، وهما مكلفان حسابيًا، والتحدي هو جعلهما خفيفين وسريعين دون خسارة الدقة. كل تقنية ستتعلمها، من التقليم (pruning) والتكميم (quantization) إلى البحث عن المعماريات والمسرّعات العتادية ومحركات Inference الصغيرة، هي إجابة واحدة عن هذا السؤال الوحيد. ومن المفيد أن نكتب السؤال بالطريقة التي يكتبه بها مقرر في التحسين الرياضي (optimization): أبقِ الدقة أعلى ما يمكن مع البقاء تحت أي ميزانية يفرضها الجهاز المستهدف.

max⁡θ, A Acc(θ,A)s.t.MACs≤C,  Memory≤M,  Latency≤T,  Energy≤E\max_{\theta,\ \mathcal{A}}\ \text{Acc}(\theta, \mathcal{A}) \quad \text{s.t.}\quad \text{MACs} \le C,\ \ \text{Memory} \le M,\ \ \text{Latency} \le T,\ \ \text{Energy} \le E
Efficient deep learning as a budgeted problem: weights and architecture are chosen under compute, memory, latency and energy limitsالتعلم العميق الكفء بوصفه مسألة ذات ميزانية: تُختار الأوزان والمعمارية تحت قيود الحوسبة والذاكرة وزمن الاستجابة والطاقة

The budgets are what change from device to device. A cloud GPU has a generous C and M; a phone has a tight Latency T and a battery; a sensor node has a memory M measured in kilobytes. The accuracy you can afford depends on which row of that constraint list binds, and part 03 puts real numbers on each row.

الميزانيات هي ما يتغير من جهاز إلى آخر. وحدة GPU سحابية لديها C وM سخيّان، والهاتف لديه قيد صارم على Latency T وبطارية، وعقدة الاستشعار لديها ذاكرة M تقاس بالكيلوبايت. الدقة التي تستطيع تحمّلها تعتمد على أي سطر من قائمة القيود هذه هو الذي يقيّدك فعلًا، والجزء 03 يضع أرقامًا حقيقية لكل سطر.

Three pillars, one lens for the whole courseثلاث ركائز، عدسة واحدة للمقرر كله

Slide 3 gives you the lens to organize everything that follows: deep learning advances when three things improve together. Its three pillars are the algorithm (the model and how it is trained), the hardware it runs on, and the data it learns from. None of them is enough alone. The 2012 breakthrough on ImageNet, which the next concept quantifies, needed all three at once: a new deep convolutional architecture, two GPUs able to run it for a week, and a dataset of about 1.2 million labeled images (Krizhevsky et al., 2012).

تعطيك الشريحة 3 العدسة التي تنظّم بها كل ما يأتي: يتقدم التعلم العميق عندما تتحسن ثلاثة أشياء معًا. الركائز الثلاث هي الخوارزمية (النموذج وطريقة تدريبه)، والعتاد الذي يعمل عليه، والبيانات التي يتعلم منها. لا تكفي أي منها وحدها. اختراق عام 2012 على ImageNet، الذي يقيسه المفهوم التالي بالأرقام، احتاج الثلاث في آن واحد: معمارية التفافية عميقة جديدة، ووحدتي GPU قادرتين على تشغيلها لمدة أسبوع، ومجموعة بيانات من نحو 1.2 million صورة موسومة (Krizhevsky et al., 2012).

PillarالركيزةContribution to AlexNet in 2012إسهامها في AlexNet عام 2012Efficiency lever in this courseأداة الكفاءة في هذا المقرر
AlgorithmالخوارزميةA deep CNN with ReLU units and dropout, trained with SGD on two GPUsشبكة CNN عميقة بوحدات ReLU وأسلوب dropout، دُرِّبت بـ SGD على وحدتي GPUPruning, quantization, distillation, neural architecture search (pruning starts in lecture 04)التقليم والتكميم والتقطير والبحث عن المعمارية العصبية (يبدأ التقليم في المحاضرة 04)
HardwareالعتادTwo GTX 580 GPUs, 3 GB each, running the convolutions for about six daysوحدتا GTX 580، في كل منهما 3 GB، تشغّلان الالتفافات لمدة ستة أيام تقريبًاAccelerators from cloud GPUs to phone NPUs and microcontrollers (part 03)المسرّعات، من وحدات GPU السحابية إلى وحدات NPU في الهواتف والمتحكمات الدقيقة (الجزء 03)
DataالبياناتImageNet: about 1.2 million labeled training images in 1000 classesImageNet: نحو 1.2 million صورة تدريب موسومة في 1000 صنفData that stays on the device and drives local, private learning (slide 8)بيانات تبقى على الجهاز وتقود تعلمًا محليًا يحفظ الخصوصية (الشريحة 8)
The three pillars, what each contributed to the 2012 break, and what efficient deep learning does with itالركائز الثلاث، وما قدّمته كل منها لاختراق 2012، وما يفعله التعلم العميق الكفؤ بها

The same three words tell you where efficiency work happens. Compressing, quantizing and searching for architectures are algorithm-pillar work: the model changes, the chip does not. Building accelerators, from data-center GPUs down to the Hexagon DSP and the Neural Engine, is hardware-pillar work: the chip changes so that the same model runs faster or cooler. The deck returns to this exact slide as slide 17 to open the hardware section, so treat slide 3 as the introduction of the framework and slide 17 as the pivot to its second pillar. The data pillar makes its own appearance on slide 8, where data that cannot leave a device forces learning to happen on the device.

الكلمات الثلاث نفسها تخبرك أين يحدث عمل الكفاءة. الضغط والتكميم والبحث عن المعماريات عمل في ركيزة الخوارزمية: النموذج يتغير والشريحة لا تتغير. بناء المسرّعات، من وحدات GPU في مراكز البيانات نزولًا إلى Hexagon DSP وNeural Engine، عمل في ركيزة العتاد: الشريحة تتغير كي يعمل النموذج نفسه أسرع أو بحرارة أقل. تعود المحاضرة إلى هذه الشريحة نفسها بوصفها الشريحة 17 لتفتتح قسم العتاد، فاعتبر الشريحة 3 مقدمة الإطار والشريحة 17 نقطة الانتقال إلى ركيزته الثانية. أما ركيزة البيانات فتظهر بنفسها في الشريحة 8، حيث تجبر البيانات التي لا يمكنها مغادرة الجهاز التعلمَ على أن يحدث على الجهاز.

Why efficiency matters beyond speedلماذا تهم الكفاءة لما هو أبعد من السرعة

Speed is the obvious reason to want small models, but the exam will ask for more, and the deck gives you at least four. Privacy: a model that fits on the device can process a face or a voice without uploading it. Cost: training and serving large models is billed in GPU hours and, increasingly, in carbon. The Once-for-All paper notes that training a separate specialized network for every deployment target emits as much CO2 as five cars over their lifetimes (Cai et al., 2020). Connectivity: sensors in fields, mines and rural clinics may have no network at all, and MCUNet argues that on-device processing extends AI to areas without Internet access (Lin et al., 2020). Energy: a battery-powered node has a milliwatt budget, and every unnecessary multiply drains it.

السرعة هي السبب الواضح لطلب نماذج صغيرة، لكن الامتحان سيطلب أكثر، والمحاضرة تعطيك أربعة أسباب على الأقل. الخصوصية: النموذج الذي يتسع في الجهاز يستطيع معالجة وجه أو صوت دون رفعه. التكلفة: تدريب النماذج الكبيرة وتشغيلها يُحاسَب بساعات GPU، وبالكربون بشكل متزايد. تذكر ورقة Once-for-All أن تدريب شبكة متخصصة منفصلة لكل هدف نشر يطلق من CO2 ما تطلقه خمس سيارات طوال عمرها (Cai et al., 2020). الاتصال: أجهزة الاستشعار في الحقول والمناجم والعيادات الريفية قد لا يكون لديها أي شبكة، ويحتج MCUNet بأن المعالجة على الجهاز توصل الذكاء الاصطناعي إلى المناطق التي لا يتوفر فيها الإنترنت (Lin et al., 2020). الطاقة: العقدة التي تعمل بالبطارية لديها ميزانية بالمللي واط، وكل عملية ضرب غير ضرورية تستنزفها.

  • Privacy: raw data stays where it was collected.الخصوصية: البيانات الخام تبقى حيث جُمعت.
  • Cost: fewer GPU hours, smaller cloud bills, less carbon.التكلفة: ساعات GPU أقل، وفواتير سحابية أصغر، وكربون أقل.
  • Connectivity: the model works where the network does not.الاتصال: النموذج يعمل حيث لا تعمل الشبكة.
  • Energy: milliwatt devices need models sized for milliwatts.الطاقة: الأجهزة التي تعمل بالمللي واط تحتاج نماذج على مقاس المللي واط.

Recall

State the three pillars and name one efficiency lever for each.اذكر الركائز الثلاث وسمِّ أداة كفاءة واحدة لكل منها.

Algorithm (pruning, quantization, distillation or neural architecture search), hardware (accelerators such as the Hexagon DSP, the Apple Neural Engine or NVIDIA Jetson), data (locally collected data that enables on-device learning; historically, larger datasets such as ImageNet raised accuracy).
الخوارزمية (التقليم، أو التكميم، أو التقطير distillation، أو البحث عن المعمارية العصبية neural architecture search)، والعتاد (مسرّعات مثل Hexagon DSP أو Apple Neural Engine أو NVIDIA Jetson)، والبيانات (بيانات تُجمع محليًا وتمكّن التعلم على الجهاز، وتاريخيًا رفعت مجموعات البيانات الأكبر مثل ImageNet الدقة).

Look at the left panel of slide 4 before the bar chart. It shows six test images (a crop of the eight in the AlexNet paper) with the five classes AlexNet ranked highest for each. For the mushroom photo the top guess is "agaric" and the true label "mushroom" sits second. For the cherry photo the top guess is "dalmatian", followed by grape, elderberry, a bull terrier and currant; "cherry" is nowhere in the list. Under one scoring rule the mushroom counts as correct and the cherry does not; under another rule both are wrong. Which rule you use decides every number on the right of the slide.

انظر إلى اللوحة اليسرى من الشريحة 4 قبل المخطط العمودي. تعرض ست صور اختبار (مقتطعة من الثماني الموجودة في ورقة AlexNet) ومع كل منها الأصناف الخمسة التي رتّبها AlexNet في الأعلى. في صورة الفطر يكون التخمين الأول "agaric" ويأتي الوسم الصحيح "mushroom" في المرتبة الثانية. في صورة الكرز يكون التخمين الأول "dalmatian"، يليه grape وelderberry وbull terrier وcurrant، ولا يظهر "cherry" في القائمة أبدًا. وفق قاعدة تقييم معينة تُحسب صورة الفطر صحيحة وصورة الكرز خاطئة، ووفق قاعدة أخرى تكون الاثنتان خاطئتين. القاعدة التي تستخدمها هي التي تحدد كل رقم على يمين الشريحة.

The rule the contest used is Top-5 error rate. The ImageNet challenge (ILSVRC) let each algorithm return five labels per image and counted the image as correct if any one of them matched the single ground-truth label; the error is the fraction of test images with no match (Russakovsky et al., 2015, Eq. 1). The organizers allowed five guesses because ImageNet photos often contain several objects but carry only one label, and a system that names a visible second object should not be punished. From 2012 the contest reported only top-5 error, since all their measures ranked entries the same way.

القاعدة التي استخدمتها المسابقة هي Top-5 error rate. سمحت مسابقة ImageNet (ILSVRC) لكل خوارزمية بأن تعيد خمسة وسوم لكل صورة، وعدّت الصورة صحيحة إذا طابق أيٌّ منها الوسم الحقيقي الوحيد، والخطأ هو نسبة صور الاختبار التي لا يوجد لها أي تطابق (Russakovsky et al., 2015, Eq. 1). سمح المنظمون بخمسة تخمينات لأن صور ImageNet تحتوي غالبًا على عدة أجسام لكنها تحمل وسمًا واحدًا فقط، والنظام الذي يسمّي جسمًا ثانيًا ظاهرًا في الصورة لا ينبغي أن يُعاقَب. ومنذ عام 2012 لم تعد المسابقة تعلن إلا خطأ top-5، لأن كل مقاييسها كانت ترتب المشاركات بالترتيب نفسه.

errtop-5=1N∑i=1Nmin⁡j∈{1,…,5}1[cij≠Ci]\text{err}_{\text{top-5}} = \frac{1}{N}\sum_{i=1}^{N} \min_{j \in \{1,\dots,5\}} \mathbb{1}\big[c_{ij} \ne C_i\big]
Top-5 error: image i counts as wrong only if none of its five returned labels c_ij equals the true label C_iخطأ Top-5: تُحسب الصورة i خاطئة فقط إذا لم تساوِ أيٌّ من تسمياتها الخمس المعادة c_ij التسميةَ الصحيحة C_i

The other rule, Top-1 accuracy, keeps only the single highest-scoring class and counts the fraction of images where it matches. It is stricter, so the same model always scores worse on top-1 than on top-5. Slides 5 and 6 use top-1 accuracy; slide 4 uses top-5 error. Keeping the two apart is the single most common slip in reading this part of the deck.

القاعدة الأخرى، Top-1 accuracy، تحتفظ فقط بالصنف صاحب أعلى درجة، وتحسب نسبة الصور التي يطابق فيها الوسم الصحيح. هي أشد صرامة، ولذلك يحصل النموذج نفسه دائمًا على نتيجة أسوأ في top-1 منها في top-5. الشريحتان 5 و6 تستخدمان دقة top-1، والشريحة 4 تستخدم خطأ top-5. الفصل بين الاثنين هو أهم ما يجب الانتباه له، فالخلط بينهما أكثر زلة شيوعًا عند قراءة هذا الجزء من الشرائح.

The same AlexNet predictions under both rulesتنبؤات AlexNet نفسها وفق القاعدتين

Mushroom (top guess agaric, mushroom second)الفطر (التخمين الأول agaric، وmushroom في المرتبة الثانية)
Top-5 hit, top-1 missإصابة في top-5، وإخفاق في top-1
Cherry (top guess dalmatian, cherry absent)الكرز (التخمين الأول dalmatian، وcherry غائب)
Top-5 miss, top-1 missإخفاق في top-5، وإخفاق في top-1
Container ship (top guess container ship)سفينة الحاويات (التخمين الأول container ship)
Top-5 hit, top-1 hitإصابة في top-5، وإصابة في top-1

Eight years of the winning entryثماني سنوات من المشاركة الفائزة

With the metric fixed, the bar chart reads as a history. The winning top-5 error went from 28.2% in 2010 and 25.8% in 2011 to 16.4% in 2012, when SuperVision, the entry now called AlexNet, was the first deep convolutional network to win. The error kept falling as the networks deepened: Clarifai at 11.7% in 2013, GoogLeNet at 6.7% in 2014, ResNet at 3.57% in 2015 with an ensemble of residual networks up to 152 layers deep (He et al., 2016), Trimps-Soushen at 2.99% in 2016 and SENet at 2.25% in 2017 (Hu et al., 2018). The slide rounds those to one decimal.

بعد تثبيت المقياس يُقرأ المخطط العمودي كتاريخ. انتقل خطأ top-5 الفائز من 28.2% في 2010 و25.8% في 2011 إلى 16.4% في 2012، عندما كانت SuperVision، المشاركة التي تسمى الآن AlexNet، أول شبكة التفافية عميقة تفوز. واستمر الخطأ في الانخفاض مع ازدياد عمق الشبكات: Clarifai بنسبة 11.7% في 2013، وGoogLeNet بنسبة 6.7% في 2014، وResNet بنسبة 3.57% في 2015 بمجموعة (ensemble) من الشبكات المتبقية (residual) يصل عمقها إلى 152 طبقة (He et al., 2016)، وTrimps-Soushen بنسبة 2.99% في 2016، وSENet بنسبة 2.25% في 2017 (Hu et al., 2018). الشريحة تقرّب هذه القيم إلى منزلة عشرية واحدة.

Winning top-5 error by year. The 2012 bar marks the deep learning break (9.4 points below 2011), and from 2015 the winners sit under the 5.1% human line.خطأ top-5 الفائز حسب السنة. عمود 2012 يمثل اختراق التعلم العميق (أقل بـ 9.4 نقطة من 2011)، ومنذ 2015 يقع الفائزون تحت خط الأداء البشري عند 5.1%.
YearالسنةWinnerالفائزTop-5 error (%)خطأ top-5 (%)Sourceالمصدر
20102010NECNEC28.228.2Russakovsky et al., Table 5Russakovsky et al.، الجدول 5
20112011XRCEXRCE25.825.8Russakovsky et al., Table 5Russakovsky et al.، الجدول 5
20122012SuperVision (AlexNet)SuperVision (AlexNet)16.416.4Russakovsky et al., Table 5Russakovsky et al.، الجدول 5
20132013ClarifaiClarifai11.711.7Russakovsky et al., Table 6Russakovsky et al.، الجدول 6
20142014GoogLeNetGoogLeNet6.76.7Russakovsky et al., Table 7Russakovsky et al.، الجدول 7
20152015ResNet (ensemble of six models, deepest 152 layers)ResNet (مجموعة من ست نماذج، أعمقها 152 طبقة)3.6 (3.57)3.6 (3.57)He et al., 2016He et al., 2016
20162016Trimps-SoushenTrimps-Soushen3.0 (2.99)3.0 (2.99)ILSVRC 2016 resultsنتائج ILSVRC 2016
20172017SENet (WMW)SENet (WMW)2.3 (2.25)2.3 (2.25)Hu et al., 2018Hu et al., 2018
HumanالإنسانOne trained annotatorمُوسِّم واحد مدرَّب5.15.1Russakovsky et al., Sec. 6.4Russakovsky et al.، القسم 6.4
ILSVRC winning entries, top-5 error on the test setالمشاركات الفائزة في ILSVRC، وخطأ top-5 على مجموعة الاختبار

Worked exampleمثال محلول

Reading the dropقراءة الانخفاض

  1. The deep learning breakاختراق التعلم العميق

    2011 to 2012: 25.8 - 16.4 = 9.4 percentage points, a relative reduction of 9.4 / 25.8 = 36% in one year, after the previous year had removed only 2.4 points.
    من 2011 إلى 2012: 25.8 - 16.4 = 9.4 نقطة مئوية، أي انخفاض نسبي قدره 9.4 / 25.8 = 36% في سنة واحدة، بعد أن أزالت السنة السابقة 2.4 نقطة فقط.
  2. Two more years of depthسنتان أخريان من العمق

    2012 to 2014: 16.4 / 6.7 = 2.45x lower error with GoogLeNet, a 22-layer network (Szegedy et al., 2015).
    من 2012 إلى 2014: خطأ أقل بـ 16.4 / 6.7 = 2.45x مع GoogLeNet، وهي شبكة من 22 طبقة (Szegedy et al., 2015).
  3. Crossing the human lineعبور الخط البشري

    ResNet's 3.57% in 2015 is the first winning entry below the 5.1% human estimate, and by 2017 the gap is 5.1 - 2.25 = 2.85 points in the machine's favor.
    نسبة 3.57% التي حققها ResNet في 2015 هي أول مشاركة فائزة تقل عن التقدير البشري البالغ 5.1%، وبحلول 2017 صارت الفجوة 5.1 - 2.25 = 2.85 نقطة لصالح الآلة.
  4. Resultالنتيجة

    Over eight years the winning error fell from 28.2% to 2.3%, about 12x lower, and nearly all of it came after the switch to deep networks.
    على مدى ثماني سنوات انخفض الخطأ الفائز من 28.2% إلى 2.3%، أي أقل بنحو 12x، وجاء كله تقريبًا بعد التحول إلى الشبكات العميقة.

What "super-human" actually means hereماذا يعني "أفضل من البشر" هنا فعلًا

The human bar is not an average person. It is one expert annotator who trained on 500 images and then labeled 1500 test images at roughly one per minute, reaching 5.1% top-5 error; a second annotator with less training scored 12.0%, and GoogLeNet scored 6.8% on the same sample (Russakovsky et al., 2015, Sec. 6.4). So "DNNs achieve super-human accuracy" means that from 2015 the winning network beats a well-trained, patient human on the top-5 rule for 1000 fine-grained classes, many of them dog breeds. It says nothing about general vision, and it says nothing about top-1.

العمود البشري لا يمثل شخصًا عاديًا. إنه مُوسِّم خبير واحد تدرّب على 500 صورة ثم وسم 1500 صورة اختبار بمعدل صورة في الدقيقة تقريبًا، فوصل إلى خطأ top-5 قدره 5.1%. ومُوسِّم ثانٍ بتدريب أقل حصل على 12.0%، وحصل GoogLeNet على 6.8% على العينة نفسها (Russakovsky et al., 2015, Sec. 6.4). إذن عبارة "DNNs achieve super-human accuracy" تعني أن الشبكة الفائزة منذ 2015 تتفوق على إنسان مدرَّب جيدًا وصبور وفق قاعدة top-5 على 1000 صنف دقيق التفاصيل، كثير منها سلالات كلاب. ولا تقول شيئًا عن الرؤية العامة، ولا تقول شيئًا عن top-1.

Quick checkاختبار سريع

In ILSVRC top-5 evaluation, when does one image count as correctly classified?في تقييم top-5 لمسابقة ILSVRC، متى تُحسب الصورة الواحدة مصنفة تصنيفًا صحيحًا؟

Recall

Define top-5 error precisely. Is the mushroom image, with top guess agaric and mushroom second, a top-5 hit? Is the cherry image?عرّف خطأ top-5 بدقة. هل صورة الفطر، التي تخمينها الأول agaric وmushroom في المرتبة الثانية، إصابة في top-5؟ وماذا عن صورة الكرز؟

Top-5 error is the fraction of test images whose true label does not appear among the five highest-scoring predicted classes. The mushroom is a top-5 hit (and a top-1 miss). The cherry is a miss under both rules, because cherry is not among its five labels.
خطأ top-5 هو نسبة صور الاختبار التي لا يظهر وسمها الحقيقي بين الأصناف الخمسة المتنبأ بها صاحبة أعلى الدرجات. صورة الفطر إصابة في top-5 (وإخفاق في top-1). صورة الكرز إخفاق وفق القاعدتين، لأن cherry ليس بين وسومها الخمسة.

Take two models from the same family. ResNet-50 needs about 3.8 billion multiply-adds per image and ResNet-101 about 7.6 billion, twice as many (He et al., 2016, Table 1). On slide 5 they sit at about 75.3% and 76.4% top-1 accuracy. Doubling the work bought about one percentage point. That one pair is the message of the slide: high accuracy comes at the cost of high computation, and the exchange rate gets worse as you climb.

خذ نموذجين من العائلة نفسها. يحتاج ResNet-50 نحو 3.8 billion عملية ضرب وجمع لكل صورة، وResNet-101 نحو 7.6 billion، أي الضعف (He et al., 2016, Table 1). في الشريحة 5 يقعان عند دقة top-1 تقارب 75.3% و76.4%. مضاعفة العمل اشترت نحو نقطة مئوية واحدة. هذا الزوج وحده هو رسالة الشريحة: الدقة العالية تأتي على حساب حوسبة عالية، وسعر الصرف يسوء كلما صعدت.

To read the chart you need its currency. The horizontal axis counts MACs, multiply-accumulate operations: one multiplication of an input by a weight, immediately added into a running sum. Sze and colleagues call the MAC "the fundamental component" of both convolutional and fully connected layers (Sze et al., 2017). Counting MACs gives a hardware-neutral cost: the number is a property of the model and the input size, not of the chip, unlike latency or energy which change with every device. A convolutional layer's count follows directly from its shape.

لكي تقرأ المخطط تحتاج إلى عملته. المحور الأفقي يعدّ MACs، أي عمليات الضرب والجمع التراكمي: ضرب مدخل واحد في وزن، ثم إضافة الناتج فورًا إلى مجموع جارٍ. يسمي Sze وزملاؤه عملية MAC "المكوّن الأساسي" (the fundamental component) للطبقات الالتفافية والطبقات المتصلة بالكامل معًا (Sze et al., 2017). عدّ MACs يعطي تكلفة مستقلة عن العتاد: الرقم خاصية للنموذج وحجم المدخل، لا للشريحة، بخلاف زمن الاستجابة أو الطاقة اللذين يتغيران مع كل جهاز. وعدد عمليات الطبقة الالتفافية ينتج مباشرة من أبعادها.

MACsconv=Hout⋅Wout⋅Cout⋅Cin⋅kh⋅kw\text{MACs}_{\text{conv}} = H_{\text{out}} \cdot W_{\text{out}} \cdot C_{\text{out}} \cdot C_{\text{in}} \cdot k_h \cdot k_w
Every output value needs one MAC per input channel per kernel positionكل قيمة مخرجة تحتاج MAC واحدة لكل قناة إدخال ولكل موضع في النواة

Worked exampleمثال محلول

One 3 by 3 layerطبقة واحدة بحجم 3 في 3

  1. Shapeالأبعاد

    A 3 x 3 convolution with 64 input and 64 output channels producing a 56 x 56 map.
    طبقة التفاف 3 x 3 بـ 64 قناة دخل و64 قناة خرج تنتج خريطة بحجم 56 x 56.
  2. Multiply outاضرب الأبعاد

    56 x 56 x 64 x 64 x 9 = 115,605,504 MACs.
    56 x 56 x 64 x 64 x 9 = 115,605,504 عملية MAC.
  3. Resultالنتيجة

    About 0.116 GMACs for a single layer. ResNet-50 has dozens of such layers, which is how it reaches 3.9 GMACs per image.
    نحو 0.116 GMACs لطبقة واحدة فقط. ويحتوي ResNet-50 على عشرات الطبقات المشابهة، وهكذا يصل إلى 3.9 GMACs لكل صورة.

How to read a bubble chartكيف تقرأ مخطط الفقاعات

Three quantities share the chart. Horizontal position is cost in billions of MACs, so left is cheaper. Vertical position is Top-1 accuracy on ImageNet, so up is better. Bubble area is Model size, the number of parameters, from 2 M to 64 M according to the legend. Parameters measure storage (how many bytes the weights occupy) and MACs measure work (how many operations each input triggers), and the two are related but not the same. Circles are handcrafted architectures and stars are found by AutoML, which becomes important on the next slide. The goal region is the upper left: high accuracy at low cost.

ثلاث كميات تتشارك المخطط. الموضع الأفقي هو التكلفة بمليارات MACs، فاليسار أرخص. الموضع العمودي هو Top-1 accuracy على ImageNet، فالأعلى أفضل. ومساحة الفقاعة هي Model size، أي عدد المعاملات، من 2 M إلى 64 M وفق مفتاح الرسم. عدد المعاملات يقيس التخزين (كم بايتًا تشغل الأوزان)، وMACs تقيس العمل (كم عملية يطلقها كل مدخل)، والاثنان مرتبطان لكنهما ليسا الشيء نفسه. الدوائر معماريات مصممة يدويًا، والنجوم وجدها AutoML، وهذا يصبح مهمًا في الشريحة التالية. المنطقة المطلوبة هي الزاوية العليا اليسرى: دقة عالية بتكلفة منخفضة.

Slide 5 as geometry: handcrafted bubbles sized by parameters. The staircase is the best accuracy available at each MAC budget; the stars and the second staircase preview slide 6.الشريحة 5 في صورة هندسية: فقاعات النماذج المصممة يدويًا بحجم يتناسب مع عدد المعاملات. الدرج هو أفضل دقة متاحة عند كل ميزانية MACs، والنجوم والدرج الثاني تمهيد للشريحة 6.
ModelالنموذجMACs (B)MACs (B)Top-1 (%)Top-1 (%)ParametersالمعاملاتWhere the number comes fromمصدر الرقم
MobileNetV1MobileNetV10.570.5770.670.64.2 M4.2 Mpaper (Howard et al.)الورقة (Howard et al.)
IGCV3-DIGCV3-D0.30.372.372.3about 3.5 Mنحو 3.5 Mchartالمخطط
InceptionV2InceptionV22.02.074.874.8about 11 Mنحو 11 Mchartالمخطط
DenseNet-121DenseNet-1212.92.975.075.0about 8 Mنحو 8 Mchartالمخطط
DenseNet-169DenseNet-1693.43.476.276.2about 14 Mنحو 14 Mchartالمخطط
ResNet-50ResNet-503.93.975.375.325.5 M25.5 MMACs and params from Sze et al., accuracy from the chartMACs والمعاملات من Sze et al.، والدقة من المخطط
ResNeXt-50ResNeXt-504.24.277.877.8about 25 Mنحو 25 Mchartالمخطط
DenseNet-264DenseNet-2645.75.777.877.8about 33 Mنحو 33 Mchartالمخطط
InceptionV3InceptionV35.75.778.878.8about 24 Mنحو 24 Mchartالمخطط
DPN-92DPN-926.56.579.379.3about 38 Mنحو 38 Mchartالمخطط
ResNet-101ResNet-1017.67.676.476.444.5 M44.5 MMACs from He et al. (Table 1); parameters from torchvisionMACs من He et al. (الجدول 1)، والمعاملات من torchvision
ResNeXt-101ResNeXt-1018.08.078.978.9about 44 Mنحو 44 Mchartالمخطط
XceptionXception8.48.479.079.0about 23 Mنحو 23 Mparams from Cholletالمعاملات من Chollet
The handcrafted models on slide 5 (values marked chart are read from the figure and approximate)النماذج المصممة يدويًا في الشريحة 5 (القيم الموسومة بـ chart مقروءة من الشكل وتقريبية)

Diminishing returnsتناقص العائد

Trace the chart from the cheapest model upward and the exchange rate collapses. For each step, divide the accuracy gained by the extra MACs spent. MobileNetV1 is the cheap starting point at 70.6% for 0.57 B MACs (Howard et al., 2017); every other number below is read from the chart.

تتبّع المخطط من أرخص نموذج صعودًا وستجد أن سعر الصرف ينهار. في كل خطوة، اقسم الدقة المكتسبة على MACs الإضافية المنفقة. MobileNetV1 هو نقطة البداية الرخيصة عند 70.6% مقابل 0.57 B MACs (Howard et al., 2017)، وكل رقم آخر أدناه مقروء من المخطط.

points per billion=Top-1new−Top-1oldMACsnew−MACsold\text{points per billion} = \frac{\text{Top-1}_{\text{new}} - \text{Top-1}_{\text{old}}}{\text{MACs}_{\text{new}} - \text{MACs}_{\text{old}}}
The marginal accuracy bought by each extra billion MACsالدقة الحدّية المكتسبة مقابل كل مليار MAC إضافية
UpgradeالترقيةExtra MACs (B)MACs إضافية (B)Extra top-1 (points)زيادة top-1 (نقاط)Points per billion MACsالنقاط لكل مليار MACs
MobileNetV1 to ResNet-50من MobileNetV1 إلى ResNet-503.9 - 0.57 = 3.333.9 - 0.57 = 3.3375.3 - 70.6 = 4.775.3 - 70.6 = 4.74.7 / 3.33 = 1.414.7 / 3.33 = 1.41
ResNet-50 to Xceptionمن ResNet-50 إلى Xception8.4 - 3.9 = 4.58.4 - 3.9 = 4.579.0 - 75.3 = 3.779.0 - 75.3 = 3.73.7 / 4.5 = 0.823.7 / 4.5 = 0.82
ResNet-50 to ResNet-101من ResNet-50 إلى ResNet-1017.6 - 3.9 = 3.77.6 - 3.9 = 3.776.4 - 75.3 = 1.176.4 - 75.3 = 1.11.1 / 3.7 = 0.301.1 / 3.7 = 0.30
Three upgrades on slide 5, cheapest firstثلاث ترقيات في الشريحة 5، الأرخص أولًا

The marginal value of computation falls almost fivefold across the chart, from 1.41 to 0.30 points per billion, and the worst trade is inside a single family. Notice also that Xception is itself dominated: DPN-92 is more accurate (79.3%) with fewer MACs (6.5 B).

تنخفض القيمة الحدّية للحوسبة نحو خمسة أضعاف عبر المخطط، من 1.41 إلى 0.30 نقطة لكل مليار، وأسوأ صفقة تقع داخل عائلة واحدة. ولاحظ أيضًا أن Xception نفسه مُهيمَن عليه (dominated): DPN-92 أدق منه (79.3%) وبعدد أقل من MACs (6.5 B).

Quick checkاختبار سريع

On slide 5, which quantity does the area of each bubble encode?في الشريحة 5، ما الكمية التي تمثلها مساحة كل فقاعة؟

Now put the stars back on the chart. Once-for-All (OFA) reaches 80.0% top-1 with 595 M MACs (Cai et al., 2020). Xception, the most expensive handcrafted model on the previous slide and within 0.3 points of the most accurate (DPN-92), needed about 8.4 B for 79.0%. Divide and you get 8400 / 595 = 14.1: the same accuracy, or one point more, for one fourteenth of the computation. That is the dashed arrow at the top of slide 6, and it is drawn straight from Figure 2 of the Once-for-All paper.

الآن أعد النجوم إلى المخطط. يصل Once-for-All (OFA) إلى دقة top-1 تبلغ 80.0% بـ 595 M MACs (Cai et al., 2020). أما Xception، أغلى نموذج مصمم يدويًا في الشريحة السابقة والذي يبعد 0.3 نقطة فقط عن الأدق (DPN-92)، فقد احتاج نحو 8.4 B للوصول إلى 79.0%. اقسم فتحصل على 8400 / 595 = 14.1: الدقة نفسها، أو نقطة أكثر، مقابل جزء من أربعة عشر من الحوسبة. هذا هو السهم المتقطع في أعلى الشريحة 6، وهو مرسوم مباشرة من الشكل 2 في ورقة Once-for-All.

Worked exampleمثال محلول

Reduction ratiosنسب التقليل

  1. Convert to one unitحوّل إلى وحدة واحدة

    Xception 8.4 B = 8400 M MACs; ResNet-50 3.9 B = 3900 M; Once-for-All 595 M.
    Xception: 8.4 B = 8400 M MACs، وResNet-50: 3.9 B = 3900 M، وOnce-for-All: 595 M.
  2. Divide reference by newاقسم المرجع على الجديد

    8400 / 595 = 14.1 and 3900 / 595 = 6.6.
    8400 / 595 = 14.1 و3900 / 595 = 6.6.
  3. Resultالنتيجة

    Once-for-All needs 14x less computation than Xception and 6.6x less than ResNet-50 while being more accurate than both.
    يحتاج Once-for-All إلى حوسبة أقل بـ 14x من Xception وأقل بـ 6.6x من ResNet-50، وهو مع ذلك أدق من الاثنين.
ModelالنموذجMACs (B)MACs (B)Top-1 (%)Top-1 (%)Reduction relative to OFAالتقليل نسبةً إلى OFA
MobileNetV1MobileNetV10.5690.56970.670.60.96x (about the same budget)0.96x (الميزانية نفسها تقريبًا)
ResNet-50ResNet-503.93.975.375.36.6x6.6x
XceptionXception8.48.479.079.014.1x14.1x
Once-for-AllOnce-for-All0.5950.59580.080.01x (reference)1x (المرجع)
Once-for-All against three handcrafted references (reduction is reference MACs divided by 595 M)Once-for-All مقارنة بثلاثة نماذج مرجعية مصممة يدويًا (التقليل هو MACs المرجع مقسومة على 595 M)

The MobileNetV1 row makes the point from the other side: at essentially the same budget, the searched model is 9.4 points more accurate. The stars are all products of Neural architecture search (NAS): rather than a person choosing kernel sizes, widths and depths, an algorithm searches over them under an explicit MAC or latency budget. EfficientNet, NASNet-A, MobileNetV3, ProxylessNAS, AmoebaNet, PNASNet and DARTS all sit inside the boxed region below about 2.5 B MACs, next to two efficient handcrafted models, MobileNetV2 and ShuffleNet. Once-for-All adds one more idea: train a single large network once, then cut specialized sub-networks out of it for each device, which is what makes the 80.0% at 595 M affordable to produce as well as to run.

صف MobileNetV1 يوضح الفكرة من الجهة الأخرى: عند الميزانية نفسها تقريبًا، النموذج الناتج عن البحث أدق بـ 9.4 نقطة. النجوم كلها نتاج Neural architecture search (NAS): بدلًا من أن يختار شخصٌ أحجام النوى والعرض والعمق، تبحث خوارزمية فيها تحت ميزانية صريحة من MACs أو زمن الاستجابة. EfficientNet وNASNet-A وMobileNetV3 وProxylessNAS وAmoebaNet وPNASNet وDARTS كلها تقع داخل المنطقة المحاطة بإطار تحت نحو 2.5 B MACs، بجانب نموذجين كفؤين مصممين يدويًا هما MobileNetV2 وShuffleNet. ويضيف Once-for-All فكرة أخرى: درّب شبكة كبيرة واحدة مرة واحدة، ثم اقتطع منها شبكات فرعية متخصصة لكل جهاز، وهذا ما يجعل 80.0% عند 595 M ميسورة التكلفة في إنتاجها وليس في تشغيلها فقط.

The frontier and why it moves leftالحدّ ولماذا يتحرك نحو اليسار

The two arrows on the slide, "the higher the better" and "the lower the better", state the accuracy-efficiency trade-off as a partial order. Model A dominates model B if A is at least as accurate and at most as costly, with one of the two strictly better. The models nobody dominates form the Pareto frontier, the staircase you saw in the last visual. Every point below or to the right of it is a worse deal than something already available. Architecture search did not just add good models; it moved the entire staircase left, so that the best accuracy at 0.6 B MACs today exceeds the best at 8 B a few years earlier.

السهمان في الشريحة، "the higher the better" (الأعلى أفضل) و"the lower the better" (الأقل أفضل)، يعبّران عن مقايضة الدقة والكفاءة بوصفها ترتيبًا جزئيًا. النموذج A يهيمن على النموذج B إذا كان A بالدقة نفسها على الأقل وبالتكلفة نفسها على الأكثر، مع تفوّق صارم في أحد الاثنين. النماذج التي لا يهيمن عليها أحد تشكّل حدّ باريتو، وهو الدرج الذي رأيته في الشكل الأخير. كل نقطة تحته أو إلى يمينه صفقة أسوأ من شيء متاح بالفعل. البحث عن المعماريات لم يكتفِ بإضافة نماذج جيدة، بل نقل الدرج كله نحو اليسار، بحيث صارت أفضل دقة عند 0.6 B MACs اليوم تتجاوز أفضل دقة عند 8 B قبل بضع سنوات.

A≻B  ⟺  AccA≥AccB ∧ MACsA≤MACsB, with at least one strictA \succ B \iff \text{Acc}_A \ge \text{Acc}_B \ \wedge\ \text{MACs}_A \le \text{MACs}_B,\ \text{with at least one strict}
Dominance on the accuracy versus MACs plane; the frontier is the set of undominated modelsالهيمنة على مستوى الدقة مقابل MACs؛ والحد (frontier) هو مجموعة النماذج غير المهيمَن عليها
ExplorerمستكشفAccuracy versus MACsالدقة مقابل MACs
Showاعرض
012345678969717375777981MACs (billion), lower is bettertop-1 (%), higher is betterIGCV3-D
Reduction ratio13xless3.900 ÷ 0.300 B MACs
Accuracy changeتغير الدقة-3.0points72.3 minus 75.372.3 ناقص 75.3
Points per extra B MACsنقاط الدقة لكل مليار MACs إضافية+0.83accuracy change divided by MACs changeتغير الدقة مقسومًا على تغير MACs
Selectedالمختار
IGCV3-D
Baselineخط الأساس
ResNet-50
Parametersالمعاملات
3.5 M
Sourceالمصدر
read from the chartمقروءة من الرسم البياني

The dashed staircase is the Pareto frontier of the visible set: a point stays on it only when no other visible model has both higher accuracy and fewer MACs. Switch from Handcrafted to AutoML and watch the frontier jump left. Values marked as read from the chart are approximate.الدرج المتقطع هو حد باريتو (Pareto frontier) للنماذج الظاهرة: تبقى النقطة عليه فقط إذا لم يوجد نموذج ظاهر آخر يجمع بين دقة أعلى وعدد أقل من MACs. انتقل من Handcrafted إلى AutoML وراقب الحد يقفز إلى اليسار. القيم الموسومة بأنها مقروءة من الرسم البياني تقريبية.

The slide names the payoff in two lines. Efficient deep learning enables daily-life applications on mobile phones, which is why the Once-for-All paper defines a "mobile setting" as anything under 600 M MACs and reports being the first to reach 80% inside it. And it enables private on-device Inference and training, the theme of the last concept in this part. Both follow from the same fact: a model that costs fourteen times less can live on a device that has fourteen times less to spend.

تسمّي الشريحة المكسب في سطرين. التعلم العميق الكفء يمكّن تطبيقات الحياة اليومية على الهواتف المحمولة، ولهذا تعرّف ورقة Once-for-All "البيئة المحمولة" (mobile setting) بأنها أي شيء تحت 600 M MACs، وتذكر أنها أول من وصل إلى 80% داخلها. ويمكّن كذلك Inference والتدريب على الجهاز بخصوصية، وهو موضوع المفهوم الأخير في هذا الجزء. كلاهما ينتج من الحقيقة نفسها: النموذج الذي يكلّف أقل بأربع عشرة مرة يمكنه أن يعيش على جهاز لديه أقل بأربع عشرة مرة لينفقه.

Quick checkاختبار سريع

Xception needs about 8.4B MACs for 79.0% top-1 and Once-for-All 595M MACs for 80.0%. By what factor is computation reduced?يحتاج Xception إلى نحو 8.4B MACs لدقة top-1 تبلغ 79.0%، ويحتاج Once-for-All إلى 595M MACs لدقة 80.0%. بأي معامل تقل الحوسبة؟

Recall

ResNet-50 needs 3.9B MACs, Xception 8.4B, and Once-for-All 595M. Compute both reduction ratios.يحتاج ResNet-50 إلى 3.9B MACs، وXception إلى 8.4B، وOnce-for-All إلى 595M. احسب نسبتي التقليل.

3900 / 595 = 6.6x and 8400 / 595 = 14.1x.
3900 / 595 = 6.6x و8400 / 595 = 14.1x.

Slide 7 shows two photographs of a small camera board on a desk. In one it reports whether the person in front of it wears a face mask; in the other it detects people in an office. There is no phone, no laptop and no network cable in the picture. The board is an OpenMV Cam, whose processor is an ARM Cortex-M7 Microcontroller (MCU), and the software is MCUNet, a framework from the same lab as Once-for-All (Lin et al., 2020).

تعرض الشريحة 7 صورتين للوحة كاميرا صغيرة على مكتب. في إحداهما تخبر اللوحة إن كان الشخص الذي أمامها يرتدي كمامة، وفي الأخرى تكتشف الأشخاص في مكتب. لا يوجد في الصورة هاتف ولا حاسوب محمول ولا كابل شبكة. اللوحة هي OpenMV Cam، ومعالجها Microcontroller (MCU) من نوع ARM Cortex-M7، والبرمجيات هي MCUNet، وهو إطار عمل من المختبر نفسه الذي أنتج Once-for-All (Lin et al., 2020).

This is TinyML: machine learning on devices with kilobytes of memory. MCUNet's reference target, the STM32F746, has 320 kB of SRAM and 1 MB of flash, and its Table 1 lines that up against a phone and a cloud GPU. The OpenMV Cam H7 in the photos is a somewhat larger sibling: STM32H743 at 480 MHz, with 1 MB of RAM in total, of which MCUNet's experiments use the 512 kB main SRAM block, and 2 MB flash (OpenMV). Both are bare-metal devices with no operating system and no DRAM. Slide 23 returns to these exact numbers as the tiny AI column of the hardware tiers. Its cloud and mobile columns are updated to an 80 GB GPU and a 256 GB phone, so expect those two cells to differ from the table below while the microcontroller column stays the same.

هذا هو TinyML: تعلم الآلة على أجهزة ذاكرتها بالكيلوبايت. الهدف المرجعي لـ MCUNet، وهو STM32F746، فيه 320 kB من SRAM و1 MB من flash، والجدول 1 في الورقة يضعه في مقابل الهاتف ووحدة GPU السحابية. لوحة OpenMV Cam H7 في الصور شقيقة أكبر قليلًا: STM32H743 بتردد 480 MHz، مع 1 MB من RAM إجمالًا، تستخدم تجارب MCUNet منها كتلة SRAM الرئيسية البالغة 512 kB، و2 MB من flash (OpenMV). كلا الجهازين يعمل مباشرة على العتاد (bare-metal) بلا نظام تشغيل وبلا DRAM. تعود الشريحة 23 إلى هذه الأرقام نفسها بوصفها عمود الذكاء الاصطناعي الصغير في مستويات العتاد. لكن عموديها للسحابة والهاتف محدّثان إلى GPU بسعة 80 GB وهاتف بسعة 256 GB، فتوقع أن تختلف هاتان الخانتان عن الجدول أدناه بينما يبقى عمود المتحكم الدقيق كما هو.

TierالمستوىMemoryالذاكرةStorageالتخزينGap from the tier aboveالفجوة عن المستوى الأعلى
Cloud AI (NVIDIA V100)ذكاء اصطناعي سحابي (NVIDIA V100)16 GB16 GBTB to PBمن TB إلى PBreferenceالمرجع
Mobile AI (iPhone 11)ذكاء اصطناعي في الهاتف (iPhone 11)4 GB4 GBmore than 64 GBأكثر من 64 GB4x less memory, 1000x less storageذاكرة أقل بـ 4x، وتخزين أقل بـ 1000x
Tiny AI (STM32F746)ذكاء اصطناعي صغير (STM32F746)320 kB320 kB1 MB1 MBtable prints 3100x less memory, 64000x less storageيطبع الجدول ذاكرة أقل بـ 3100x، وتخزينًا أقل بـ 64000x
MCUNet Table 1: memory and storage across three tiers of AI hardwareالجدول 1 في MCUNet: الذاكرة والتخزين عبر ثلاثة مستويات من عتاد الذكاء الاصطناعي
Memory on a log scale: 16 GB, 4 GB and 320 kB. Even an int8 MobileNetV2 at 1.7 MB overshoots the microcontroller's SRAM by 5.3x.الذاكرة على مقياس لوغاريتمي: 16 GB و4 GB و320 kB. حتى MobileNetV2 بتكميم int8 بحجم 1.7 MB يتجاوز SRAM المتحكم الدقيق بـ 5.3x.

Why nothing off the shelf fitsلماذا لا يتسع أي نموذج جاهز

The paper gives three failures. ResNet-50's weight storage is about 102 MB, 100x the flash. MobileNetV2 needs about 6.8 MB of peak activation memory, 22x the SRAM (the paper rounds up). Even the int8-quantized MobileNetV2 peaks at 1.7 MB, still 5.3x over, and that is before the runtime's own buffers. Reaching the board required designing the network and the inference engine together: TinyNAS searches architectures under the exact memory limits and TinyEngine executes them without interpreter overhead, and MCUNet as a whole uses 3.5x less SRAM and 5.7x less flash than int8 MobileNetV2 and ResNet-18 at similar accuracy. The result is 70.7% ImageNet top-1 on an STM32H743 (the OpenMV H7 chip, which MCUNet evaluates under a 512 kB SRAM and 2 MB flash budget, although the board has 1 MB of SRAM in total), the first time that bar was reached on an off-the-shelf microcontroller, and about 62% inside the 320 kB / 1 MB budget of the F746 (Lin et al., 2020, Table 4, 4-bit).

تذكر الورقة ثلاثة إخفاقات. تخزين الأوزان في ResNet-50 نحو 102 MB، أي 100x من سعة flash. ويحتاج MobileNetV2 نحو 6.8 MB من ذاكرة التنشيط القصوى، أي 22x من SRAM (الورقة تقرّب إلى الأعلى). وحتى MobileNetV2 المكمَّم بـ int8 تبلغ ذروته 1.7 MB، أي ما زال أكبر بـ 5.3x، وهذا قبل حساب المخازن المؤقتة الخاصة ببيئة التشغيل نفسها. الوصول إلى اللوحة تطلّب تصميم الشبكة ومحرك الاستدلال معًا: TinyNAS يبحث عن المعماريات تحت حدود الذاكرة الدقيقة، وTinyEngine ينفذها دون عبء المفسِّر، وMCUNet ككل يستخدم SRAM أقل بـ 3.5x وflash أقل بـ 5.7x مقارنة بـ MobileNetV2 وResNet-18 المكمَّمين بـ int8 بدقة مماثلة. والنتيجة دقة top-1 على ImageNet قدرها 70.7% على STM32H743 (شريحة OpenMV H7، التي يقيّمها MCUNet تحت ميزانية 512 kB من SRAM و2 MB من flash، مع أن في اللوحة 1 MB من SRAM إجمالًا)، وهي أول مرة يُبلغ فيها هذا المستوى على متحكم دقيق جاهز من السوق، ونحو 62% داخل ميزانية 320 kB / 1 MB الخاصة بـ F746 (Lin et al., 2020, Table 4, 4-bit).

Worked exampleمثال محلول

Does ResNet-50 fit?هل يتسع ResNet-50؟

  1. Weights in FP32الأوزان بصيغة FP32

    25.5 M parameters times 4 bytes is 102 MB, matching the paper.
    25.5 M معامل مضروبة في 4 بايت تساوي 102 MB، وهذا يطابق الورقة.
  2. Against 1 MB of flashمقابل 1 MB من flash

    102 / 1 = 102x too large.
    102 / 1 = 102x أكبر من اللازم.
  3. Even at 8 bitsحتى بـ 8 بت

    25.5 MB, still 25x too large; quantization alone cannot save it.
    25.5 MB، أي ما زال أكبر من اللازم بـ 25x، فالتكميم وحده لا يستطيع إنقاذه.
  4. Resultالنتيجة

    Fitting a microcontroller needs a different architecture, not a compressed copy of a server model.
    ملاءمة متحكم دقيق تحتاج إلى معمارية مختلفة، لا إلى نسخة مضغوطة من نموذج خوادم.

The reasons to bother are the same four from the first concept, now at their most extreme. MCUNet points out that there are around 250 billion microcontrollers in the world, that processing raw sensor data at the source protects privacy because nothing is transmitted, and that inference on the node works in places without Internet access (Lin et al., 2020). A mask detector on a camera board costs a few dollars, runs on milliwatts and never uploads a face.

أسباب تحمّل هذا العناء هي الأسباب الأربعة نفسها من المفهوم الأول، لكنها الآن في أقصى صورها. يشير MCUNet إلى أن في العالم نحو 250 billion متحكم دقيق، وأن معالجة بيانات الاستشعار الخام عند مصدرها تحمي الخصوصية لأنه لا يُرسَل شيء، وأن الاستدلال على العقدة يعمل في أماكن بلا إنترنت (Lin et al., 2020). كاشف الكمامات على لوحة كاميرا يكلّف بضعة دولارات، ويعمل بالمللي واط، ولا يرفع وجهًا أبدًا.

Quick checkاختبار سريع

What memory gap does MCUNet's Table 1 print between a phone and the microcontroller?ما فجوة الذاكرة التي يطبعها الجدول 1 في MCUNet بين الهاتف والمتحكم الدقيق؟

Recall

What memory and storage does the MCU that MCUNet targets have, and how far is that from a cloud GPU?ما الذاكرة والتخزين في المتحكم الدقيق الذي يستهدفه MCUNet، وكم يبعد ذلك عن GPU سحابية؟

320 kB SRAM and 1 MB flash. A V100 has 16 GB of memory, five orders of magnitude more, and terabytes to petabytes of storage; the paper prints the tiers as 4x then 3100x for memory and 1000x then 64000x for storage.
320 kB من SRAM و1 MB من flash. لدى V100 16 GB من الذاكرة، أي أكثر بخمس رتب عشرية، وتخزين من التيرابايت إلى البيتابايت. وتطبع الورقة المستويات على أنها 4x ثم 3100x للذاكرة، و1000x ثم 64000x للتخزين.

A smart speaker slowly gets better at recognizing the voices in one house. A phone learns its owner's face after the first enrollment. Both need data that arrives after the product shipped, and both kinds of data (a voice, a face) are exactly what users least want uploaded. The figure on slide 8 draws the consequence: new and sensitive data flows from the user to the Edge device, the arrow from the device to the cloud is crossed out for privacy, and a small loop above the device shows the model updating itself where the data is.

مكبّر الصوت الذكي يتحسن تدريجيًا في التعرف على أصوات أهل بيت واحد. والهاتف يتعلم وجه مالكه بعد التسجيل الأول. كلاهما يحتاج بيانات تصل بعد شحن المنتج، وكلا نوعي البيانات (صوت، وجه) هو بالضبط ما لا يريد المستخدمون رفعه. الشكل في الشريحة 8 يرسم النتيجة: بيانات جديدة وحساسة تتدفق من المستخدم إلى Edge device، والسهم من الجهاز إلى السحابة مشطوب لأسباب الخصوصية، وحلقة صغيرة فوق الجهاز تبيّن النموذج وهو يحدّث نفسه حيث توجد البيانات.

Data reaches the device and stops. The update loop closes locally; the arrow to the cloud is drawn and then crossed out.البيانات تصل إلى الجهاز وتتوقف عنده. حلقة التحديث تُغلق محليًا، والسهم إلى السحابة مرسوم ثم مشطوب.

That loop is On-device training (learning). The slide lists four benefits. Better privacy, because nothing leaves the device. Lower cost, because there is no upload and no cloud training bill. Customization, because the model adapts to this user, this room, this camera angle. Life-long learning, because the adaptation never has to stop; AI systems, as the slide puts it, need to continually adapt to new data collected locally. Lin and colleagues summarize the goal as letting users benefit from customized models without transferring their data to the cloud (Lin et al., 2022).

هذه الحلقة هي On-device training (learning). تسرد الشريحة أربع فوائد. خصوصية أفضل، لأن لا شيء يغادر الجهاز. تكلفة أقل، لأنه لا يوجد رفع ولا فاتورة تدريب سحابي. التخصيص، لأن النموذج يتكيف مع هذا المستخدم، وهذه الغرفة، وزاوية الكاميرا هذه. التعلم مدى الحياة، لأن التكيف لا يجب أن يتوقف أبدًا، فأنظمة الذكاء الاصطناعي، كما تقول الشريحة، تحتاج إلى التكيف باستمرار مع البيانات الجديدة المجموعة محليًا. ويلخص Lin وزملاؤه الهدف بأنه تمكين المستخدمين من الاستفادة من نماذج مخصصة دون نقل بياناتهم إلى السحابة (Lin et al., 2022).

Why training is so much more expensive than inferenceلماذا التدريب أغلى بكثير من الاستدلال

The third line of the slide is the catch: training is more expensive than Inference, hard to fit in edge memory, and limited by power. All three follow from how backpropagation works. Inference is one forward pass through the layers, and each layer's activations can be discarded as soon as the next layer has consumed them. Training runs the same forward pass, then a backward pass that costs about twice as much: propagating the gradient through each layer is one multiply by the transposed weights, which Goodfellow, Bengio and Courville note has the same cost as the forward multiply (Goodfellow et al., 2016, Sec. 6.5.7), and computing the weight gradient is a second multiply of the same size. So one training step is roughly three times the arithmetic of one inference pass, the convention behind the 6N versus 2N per-token estimate used in scaling studies (Kaplan et al., 2020). The backward pass also needs the activations that the forward pass produced. Goodfellow and colleagues put it directly: the input to each hidden nonlinearity must be stored from the moment it is computed until the backward pass has returned to the same point, so memory grows with the number of examples in the batch and the width of the layers. On top of that, the optimizer keeps its own state: a momentum buffer, or two moment estimates for Adam, each the size of the model.

السطر الثالث في الشريحة هو العقبة: التدريب أغلى من Inference، ويصعب احتواؤه في ذاكرة الحافة، ومحدود بالطاقة. والثلاثة تنتج من طريقة عمل الانتشار العكسي (backpropagation). الاستدلال تمرير أمامي واحد عبر الطبقات، ويمكن التخلص من تنشيطات كل طبقة بمجرد أن تستهلكها الطبقة التالية. أما التدريب فيجري التمرير الأمامي نفسه، ثم تمريرًا عكسيًا يكلّف نحو الضعف: نشر التدرج عبر كل طبقة هو عملية ضرب واحدة في الأوزان المنقولة (transposed)، ويذكر Goodfellow وBengio وCourville أن تكلفتها تساوي تكلفة الضرب الأمامي (Goodfellow et al., 2016, Sec. 6.5.7)، وحساب تدرج الأوزان عملية ضرب ثانية بالحجم نفسه. إذن خطوة تدريب واحدة تساوي تقريبًا ثلاثة أضعاف الحساب في تمرير استدلال واحد، وهذا هو الاصطلاح وراء تقدير 6N مقابل 2N لكل رمز (token) المستخدم في دراسات التوسع (Kaplan et al., 2020). ويحتاج التمرير العكسي أيضًا إلى التنشيطات التي أنتجها التمرير الأمامي. يقولها Goodfellow وزملاؤه صراحة: مدخل كل لاخطية مخفية يجب تخزينه من لحظة حسابه حتى يعود التمرير العكسي إلى النقطة نفسها، فتنمو الذاكرة مع عدد الأمثلة في الدفعة (batch) ومع عرض الطبقات. وفوق ذلك يحتفظ المُحسِّن (optimizer) بحالته الخاصة: مخزن للزخم (momentum)، أو تقديران للعزوم في حالة Adam، كلٌّ منها بحجم النموذج.

ResourceالموردInferenceالاستدلالTrainingالتدريب
Compute per exampleالحوسبة لكل مثالOne forward passتمرير أمامي واحدForward plus backward, about 3x the multiply-adds (backward is about 2x forward)تمرير أمامي ثم خلفي، أي نحو 3x من عمليات الضرب والجمع (التمرير الخلفي يكلّف نحو 2x الأمامي)
ActivationsالتنشيطاتFreed layer by layer as the input flows throughتُحرَّر طبقةً بعد طبقة مع مرور المدخلEvery layer's activations kept until the backward pass returnsتُحفظ تنشيطات كل طبقة حتى يعود التمرير الخلفي إليها
Extra stateالحالة الإضافيةWeights onlyالأوزان فقطWeights, gradients and optimizer state (momentum, Adam moments)الأوزان والتدرجات وحالة المُحسِّن (الزخم، وعزوم Adam)
Memory scalingنمو الذاكرةLargest single layerأكبر طبقة منفردةGrows with depth and batch sizeتنمو مع العمق وحجم الدفعة
What inference and training each have to payما يجب أن يدفعه كل من الاستدلال والتدريب

Worked exampleمثال محلول

Training MobileNetV1 on a microcontroller, naivelyتدريب MobileNetV1 على متحكم دقيق بطريقة ساذجة

  1. Weightsالأوزان

    4.2 M parameters in FP32 is 16.8 MB.
    4.2 M معامل بصيغة FP32 تساوي 16.8 MB.
  2. Gradients and momentumالتدرجات والزخم

    One gradient per weight and one momentum value per weight: two more copies, another 33.6 MB.
    تدرج واحد لكل وزن وقيمة زخم واحدة لكل وزن: نسختان إضافيتان، أي 33.6 MB أخرى.
  3. Total before activationsالمجموع قبل التنشيطات

    50.4 MB of state, against 320 kB of SRAM.
    50.4 MB من الحالة، مقابل 320 kB من SRAM.
  4. Resultالنتيجة

    About 157x over budget before a single activation is stored. Lin et al. (2022) get training under 256 kB by updating only a sparse subset of weights and by training directly on quantized values, using less than a thousandth of the memory of PyTorch or TensorFlow on the same task.
    تجاوز للميزانية بنحو 157x قبل تخزين تنشيط واحد. ويصل Lin et al. (2022) بالتدريب إلى أقل من 256 kB بتحديث مجموعة جزئية متفرقة (sparse) فقط من الأوزان وبالتدريب مباشرة على القيم المكمَّمة، مستخدمين أقل من جزء من الألف من ذاكرة PyTorch أو TensorFlow في المهمة نفسها.

Power is the last constraint. A training step roughly triples the arithmetic of every example, and a device that runs on a battery or a solar cell cannot run it continuously. So on-device learning is not merely inference plus a little bookkeeping; it is a harder problem than the one MCUNet solved, and the course treats it as its own topic.

الطاقة هي القيد الأخير. خطوة التدريب تضاعف حساب كل مثال ثلاث مرات تقريبًا، والجهاز الذي يعمل ببطارية أو بخلية شمسية لا يستطيع تشغيلها باستمرار. لذا فالتعلم على الجهاز ليس مجرد استدلال مع قليل من العمليات الإضافية، بل مشكلة أصعب من التي حلّها MCUNet، والمقرر يعاملها موضوعًا مستقلًا.

Quick checkاختبار سريع

Why does the slide 8 figure cross out the arrow from the edge device to the cloud?لماذا يشطب شكل الشريحة 8 السهم من جهاز الحافة إلى السحابة؟

Recall

Give three reasons training is more expensive than inference on a device, and the four benefits of doing it anyway.اذكر ثلاثة أسباب تجعل التدريب أغلى من الاستدلال على الجهاز، والفوائد الأربع للقيام به رغم ذلك.

Costs: the backward pass costs about twice the forward pass, so a training step is roughly three times an inference pass; every layer's activations must be stored until the backward pass returns, scaling with batch size and depth; optimizer state adds extra copies of every parameter. Plus limited power. Benefits: better privacy, lower cost, customization, life-long learning.
التكاليف: التمرير العكسي يكلّف نحو ضعف التمرير الأمامي، فتكون خطوة التدريب نحو ثلاثة أضعاف تمرير الاستدلال، وتنشيطات كل طبقة يجب تخزينها حتى يعود التمرير العكسي، وتتزايد مع حجم الدفعة والعمق، وحالة المُحسِّن تضيف نسخًا إضافية من كل معامل. إضافة إلى الطاقة المحدودة. الفوائد: خصوصية أفضل، وتكلفة أقل، والتخصيص، والتعلم مدى الحياة.

Recapالخلاصة

If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا

  • Machine learning and deep learning are everywhere and computationally expensive; the course asks how to make them lightweight and fast without losing accuracy.التعلم الآلي والتعلم العميق موجودان في كل مكان ومكلفان حسابيًا، والمقرر يسأل كيف نجعلهما خفيفين وسريعين دون أن نخسر الدقة.
  • Progress rides on three pillars, algorithm, hardware and data; efficiency work in this course lives mainly in the first two.يقوم التقدم على ثلاث ركائز: الخوارزمية والعتاد والبيانات، وعمل الكفاءة في هذا المقرر يقع أساسًا في الركيزتين الأوليين.
  • ImageNet top-5 error fell from 28.2% (2010) to 2.3% (2017); AlexNet cut 9.4 points in 2012; ResNet (3.57%) was the first winner below the 5.1% human estimate.انخفض خطأ top-5 على ImageNet من 28.2% (عام 2010) إلى 2.3% (عام 2017)، وخفّضه AlexNet بمقدار 9.4 نقطة في 2012، وكان ResNet (3.57%) أول فائز يقل عن التقدير البشري البالغ 5.1%.
  • Top-5 error and top-1 accuracy are different metrics: slide 4 uses the first, slides 5 and 6 the second.خطأ top-5 ودقة top-1 مقياسان مختلفان: الشريحة 4 تستخدم الأول، والشريحتان 5 و6 تستخدمان الثاني.
  • MACs count multiply-accumulates per input, a hardware-neutral cost; parameters count storage. More of both buys accuracy with diminishing returns (ResNet-101 doubles the MACs of ResNet-50 for about 1 point).تعدّ MACs عمليات الضرب والجمع التراكمي لكل مدخل، وهي تكلفة مستقلة عن العتاد، بينما يعدّ عدد المعاملات التخزين. زيادة الاثنين تشتري الدقة بعائد متناقص (ResNet-101 يضاعف MACs مقارنة بـ ResNet-50 مقابل نقطة واحدة تقريبًا).
  • Once-for-All (595M MACs, 80.0% top-1) beats Xception with 14x less computation, shifting the Pareto frontier to the upper left.يتفوق Once-for-All (595M MACs، ودقة top-1 تبلغ 80.0%) على Xception بحوسبة أقل بـ 14 مرة، فينزاح حدّ باريتو نحو الأعلى واليسار.
  • MCUNet runs mask and person detection on a Cortex-M7 camera board; its reference MCU has 320 kB SRAM and 1 MB Flash, three to four orders of magnitude below a phone.يشغّل MCUNet كشف الكمامات وكشف الأشخاص على لوحة كاميرا بمعالج Cortex-M7، ومتحكمه المرجعي فيه 320 kB من SRAM و1 MB من Flash، أي أقل من الهاتف بثلاث إلى أربع رتب عشرية.
  • On-device learning gives privacy, lower cost, customization and life-long learning, but a training step costs roughly three times the compute of an inference pass plus stored activations and optimizer state, on limited memory and power.التعلم على الجهاز يمنح الخصوصية وتكلفة أقل والتخصيص والتعلم مدى الحياة، لكن خطوة التدريب تكلّف نحو ثلاثة أضعاف حوسبة تمرير الاستدلال، إضافة إلى تخزين التنشيطات وحالة المُحسِّن، على ذاكرة وطاقة محدودتين.

Sourcesالمصادر

Part 02: Segmentation, generative models and LLMsالتقطيع (Segmentation) والنماذج التوليدية ونماذج LLM

Promptable segmentation, diffusion models, 3D perception and large language models push computation and memory far beyond classification, and each has an efficient counterpart that recovers speed without losing quality.التقطيع القابل للتوجيه بالأوامر (promptable segmentation) ونماذج الانتشار (diffusion) والإدراك ثلاثي الأبعاد والنماذج اللغوية الكبيرة تدفع الحساب والذاكرة إلى ما يتجاوز التصنيف بكثير، ولكل منها نظير كفء يستعيد السرعة دون فقدان الجودة.

5 concepts5 مفاهيم, ، slides 9-16الشرائح 9-16

Why this part mattersلماذا يهمّ هذا الجزء

Part 01 measured the price of accuracy on ImageNet. This part follows the same question into the models that define the field today: promptable segmentation, image and video diffusion, 3D perception in a moving car, and large language models. In every case the same move rescues the system: find the block that dominates the cost, then attack that block and only that block.

Every research direction in this course (quantisation, pruning, distillation, efficient attention, distributed inference) is motivated by one of the five cases here, and this is also how you scope a PhD project on embedded ML. Exam questions turn the slide numbers into arithmetic: bytes per parameter, speedup versus MAC ratio, frame budgets in milliseconds. Each concept below ends with that arithmetic worked out so you can do it from memory.

قاس الجزء 01 ثمن الدقة على ImageNet. هذا الجزء يتتبع السؤال نفسه في النماذج التي تحدد هذا المجال اليوم: التقسيم القابل للتوجيه بالتلميحات (promptable segmentation)، ونماذج الانتشار (diffusion) للصور والفيديو، والإدراك ثلاثي الأبعاد في سيارة متحركة، ونماذج اللغة الكبيرة. وفي كل حالة تنقذ الخطوة نفسها النظام: اعثر على الكتلة التي تهيمن على التكلفة، ثم هاجم تلك الكتلة وحدها دون غيرها.

كل اتجاه بحثي في هذا المقرر (التكميم quantisation، والتقليم pruning، والتقطير distillation، والـ attention الفعّال، والاستدلال الموزّع distributed inference) مدفوع بإحدى الحالات الخمس هنا، وهكذا أيضًا تحدد نطاق مشروع دكتوراه في تعلم الآلة المدمج (embedded ML). أسئلة الاختبار تحوّل أرقام الشرائح إلى حسابات: البايتات لكل معامل، والتسريع مقابل نسبة الـ MACs، وميزانيات الإطارات بالملّي ثانية. ينتهي كل مفهوم أدناه بهذه الحسابات محلولة حتى تتمكن من إجرائها من الذاكرة.

By the end you canفي نهاية هذا الجزء ستستطيع

  1. Name SAM's three blocks, say which one dominates the cost, and explain what EfficientViT-SAM swaps to reach 48.9x.سمِّ الكتل الثلاث في SAM، وحدد أيها يهيمن على التكلفة، واشرح ما الذي يستبدله EfficientViT-SAM ليصل إلى 48.9x.
  2. Explain why compute follows tokens and denoising steps rather than parameters, and why diffusion cost is super-quadratic in resolution.اشرح لماذا تتبع الحوسبة عدد الـ tokens وخطوات إزالة الضوضاء (denoising steps) لا عدد المعاملات، ولماذا تنمو تكلفة الانتشار (diffusion) أسرع من التربيعي (super-quadratic) مع الدقة (resolution).
  3. Compare naive patch parallelism with DistriFusion on MACs, latency and artifacts, and account for the gap between 4.0x less work and 3.0x speedup.قارن توازي الرقع البسيط (naive patch parallelism) مع DistriFusion من حيث MACs وزمن الاستجابة (latency) والتشوهات، وفسّر الفجوة بين عمل أقل بـ 4.0x وتسريع قدره 3.0x.
  4. Turn frames per second into a frame time and show which of Fast-LiDARNet's two levers crosses the 30 fps line.حوّل عدد الإطارات في الثانية (fps) إلى زمن إطار (frame time)، وبيّن أي رافعتي Fast-LiDARNet هي التي تتجاوز خط 30 fps.
  5. Convert parameters and precision into bytes and GPU counts, and give the three reasons LLMs must also run at the edge.حوّل عدد المعاملات والدقة العددية (precision) إلى بايتات وعدد من وحدات GPU، واذكر الأسباب الثلاثة التي تجعل تشغيل نماذج LLM على الحافة (edge) ضروريًا أيضًا.

Picture a head-mounted camera looking at a door, a small label reading id 27, 52 cm, and a green mask painted over one region. A single click on the door produced that mask. That is what promptable means. The user supplies a hint, a point, a box or a phrase, and the model returns the object the hint refers to. The Segment Anything Model (SAM) from Kirillov et al. was trained on SA-1B, over one billion masks on 11 million images, so it can do this for objects it has never been told about.

تخيّل كاميرا مثبتة على الرأس تنظر إلى باب، وملصقًا صغيرًا مكتوبًا فيه id 27, 52 cm، وقناعًا أخضر مرسومًا فوق منطقة واحدة. نقرة واحدة على الباب أنتجت هذا القناع. هذا هو معنى promptable (قابل للتوجيه بالتلميح). يقدّم المستخدم تلميحًا، نقطة أو صندوقًا أو عبارة، فيعيد النموذج الكائن الذي يشير إليه التلميح. نموذج Segment Anything Model (SAM) من Kirillov et al. دُرِّب على SA-1B، أي أكثر من مليار قناع على 11 million صورة، ولذلك يستطيع فعل ذلك مع كائنات لم يُخبَر عنها قط.

The architecture matters more than the demo. SAM is three blocks. An image encoder, a ViT-H pre-trained with masked autoencoding, reads the image once and produces an image embedding. A prompt encoder turns sparse prompts (points, boxes, text) and dense prompts (masks) into prompt embeddings. A lightweight mask decoder combines the two and outputs a valid mask. The paper is explicit about the asymmetry: the image encoder runs once per image, and given a precomputed embedding, the prompt encoder and mask decoder run in a web browser, on a CPU, in about 50 ms. Encode once, expensively; prompt many times, cheaply.

البنية أهم من العرض التوضيحي. يتكون SAM من ثلاث كتل. مُرمِّز الصور (image encoder)، وهو ViT-H مدرّب مسبقًا بطريقة masked autoencoding، يقرأ الصورة مرة واحدة وينتج تضمينًا للصورة (image embedding). ومُرمِّز التلميحات (prompt encoder) يحوّل التلميحات المتناثرة (sparse: نقاط، صناديق، نص) والتلميحات الكثيفة (dense: أقنعة) إلى تضمينات للتلميحات. ومفكِّك أقنعة خفيف (mask decoder) يدمج الاثنين ويُخرج قناعًا صالحًا. الورقة صريحة بشأن هذا التفاوت: مُرمِّز الصور يعمل مرة واحدة لكل صورة، وبوجود تضمين محسوب مسبقًا يعمل مُرمِّز التلميحات ومفكِّك الأقنعة داخل متصفح ويب، على CPU، في نحو 50 ms. رمِّز مرة واحدة بتكلفة عالية، ووجِّه بالتلميحات مرات كثيرة بتكلفة زهيدة.

The image encoder is the big block. It fills once per image, then the prompt encoder and decoder answer any number of prompts at almost no costمُرمِّز الصور هو الكتلة الكبيرة. يُملأ مرة واحدة لكل صورة، ثم يجيب مُرمِّز التلميحات والمفكِّك عن أي عدد من التلميحات بتكلفة شبه معدومة

SAM's three blocksالكتل الثلاث في SAM

Image encoderمُرمِّز الصور
ViT-H, 641.1 M parameters, 2973 GMACs per image, runs once per imageViT-H، 641.1 M معامل، 2973 GMACs لكل صورة، يعمل مرة واحدة لكل صورة
Prompt encoderمُرمِّز التلميحات
Points, boxes and text (sparse), masks (dense); tinyنقاط وصناديق ونص (sparse)، وأقنعة (dense)؛ صغير جدًا
Mask decoderمفكِّك الأقنعة
Fuses image and prompt embeddings into a valid mask; with the prompt encoder, about 50 ms on a browser CPUيدمج تضمينات الصورة والتلميحات في قناع صالح؛ ومع مُرمِّز التلميحات يستغرق نحو 50 ms على CPU المتصفح

Attack the block that dominatesهاجم الكتلة المهيمنة

Once you see that the encoder holds 2973 GMACs and the rest is a 50 ms CPU job, the efficiency strategy writes itself. EfficientViT-SAM (Zhang, Cai and Han) keeps SAM's prompt encoder and mask decoder unchanged and replaces only the image encoder with EfficientViT, the multi-scale linear attention backbone from Cai et al. (ICCV 2023). Training happens in two stages: first the new encoder is distilled from SAM's ViT-H encoder as the teacher, then the whole model is trained end to end on SA-1B. Nothing else in the pipeline moves.

بمجرد أن ترى أن المُرمِّز يحمل 2973 GMACs وأن الباقي مهمة على CPU مدتها 50 ms، تتضح استراتيجية الكفاءة من تلقاء نفسها. يُبقي EfficientViT-SAM (Zhang, Cai and Han) مُرمِّز التلميحات ومفكِّك الأقنعة في SAM دون تغيير، ويستبدل مُرمِّز الصور وحده بـ EfficientViT، وهو العمود الفقري (backbone) القائم على attention خطي متعدد المقاييس من Cai et al. (ICCV 2023). يجري التدريب على مرحلتين: أولًا يُقطَّر (distilled) المُرمِّز الجديد من مُرمِّز ViT-H الخاص بـ SAM بوصفه المعلّم، ثم يُدرَّب النموذج كله من البداية إلى النهاية على SA-1B. لا شيء آخر في خط المعالجة يتحرك.

SimulatorمحاكيSwap the block that dominatesاستبدل الكتلة المهيمنة
Image encoderمُرمِّز الصورة

Hover, tap or focus a block to see what it costs and whether EfficientViT-SAM touches it.مرّر المؤشر فوق كتلة أو انقر عليها أو ركّز عليها لترى كلفتها وهل يغيّرها EfficientViT-SAM.

A100 TensorRT FP16 throughputالإنتاجية على A100 TensorRT FP1611 img/s
SAM-ViT-H baseline 11 img/sخط الأساس SAM-ViT-H 11 img/sscale to 800 img/sالمقياس حتى 800 img/s
Speedupالتسريع1.0x11 ÷ 11 img/s
Encoder MACs cutتقليل MACs في المشفّر1.0x2973 GMACs divided by the new encoder2973 GMACs مقسومة على كلفة المُرمِّز الجديد
Zero-shot COCO mAPmAP على COCO دون تدريب مسبق عليها (zero-shot)46.5the baselineخط الأساس

Numbers from Table 1 of the EfficientViT-SAM paper. The prompt encoder and mask decoder are identical in every configuration, which is why swapping only the encoder moves the whole bar.الأرقام من Table 1 في ورقة EfficientViT-SAM. مُرمِّز التلقين ومُفكِّك القناع متطابقان في كل الإعدادات، ولهذا يكفي استبدال مُرمِّز الصورة وحده لتحريك الشريط كله.

The fair way to judge the swap is accuracy against speed on the same hardware: zero-shot COCO mAP against A100 throughput with TensorRT in FP16. Zero-shot here has a precise meaning: the models were never trained on COCO, and they are evaluated with boxes from a ViTDet detector as prompts. Two speedups get quoted, and they belong to different models. The 16.5x figure is EfficientViT-SAM-XL1, which is faster and more accurate than SAM (47.8 versus 46.5 mAP). The 48.9x headline belongs to EfficientViT-SAM-L2, which matches SAM at 46.6 mAP while running 538 images per second instead of 11. The full table from the paper makes the families visible.

الطريقة العادلة للحكم على هذا الاستبدال هي الدقة مقابل السرعة على العتاد نفسه: zero-shot COCO mAP مقابل throughput (الإنتاجية) على A100 مع TensorRT بصيغة FP16. لمصطلح zero-shot هنا معنى دقيق: النماذج لم تُدرَّب قط على COCO، وتُقيَّم باستخدام صناديق من كاشف ViTDet بوصفها تلميحات. يُستشهد بتسريعين، وهما يخصان نموذجين مختلفين. رقم 16.5x يخص EfficientViT-SAM-XL1، وهو أسرع من SAM وأدق منه (47.8 مقابل 46.5 mAP). أما الرقم الرئيسي 48.9x فيخص EfficientViT-SAM-L2، الذي يساوي SAM عند 46.6 mAP بينما يعالج 538 صورة في الثانية بدلًا من 11. الجدول الكامل من الورقة يُظهر العائلات بوضوح.

ModelالنموذجEncoder paramsمعاملات المُرمِّزEncoder MACsMACs المُرمِّزThroughput (img/s)الإنتاجية (img/s)mAPmAPSpeedup vs SAM-ViT-Hالتسريع مقارنة بـ SAM-ViT-H
SAM-ViT-HSAM-ViT-H641.1 M641.1 M2973 G2973 G111146.546.51x1x
EfficientViT-SAM-XL1EfficientViT-SAM-XL1203.3 M203.3 M322 G322 G18218247.847.816.5x16.5x
EfficientViT-SAM-XL0EfficientViT-SAM-XL0117.0 M117.0 M185 G185 G27827847.547.525.3x25.3x
EfficientViT-SAM-L2EfficientViT-SAM-L261.3 M61.3 M69 G69 G53853846.646.648.9x48.9x
EfficientViT-SAM-L1EfficientViT-SAM-L147.7 M47.7 M49 G49 G63863846.246.258.0x58.0x
EfficientViT-SAM-L0EfficientViT-SAM-L034.8 M34.8 M35 G35 G76276245.745.769.3x69.3x
EfficientSAMEfficientSAM25.3 M25.3 M247 G247 G18318344.444.416.6x16.6x
EdgeSAMEdgeSAM9.6 M9.6 M20 G20 G44944942.142.140.8x40.8x
MobileSAMMobileSAM9.8 M9.8 M39 G39 G27827838.738.725.3x25.3x
Zero-shot COCO instance segmentation, A100 with TensorRT FP16 (EfficientViT-SAM, Table 1)تقسيم المثيلات في COCO بنمط zero-shot، على A100 مع TensorRT بصيغة FP16 (EfficientViT-SAM، الجدول 1)

Worked exampleمثال محلول

Compute reduction versus measured speedupتقليل الحوسبة مقابل التسريع المقاس

  1. MAC ratioنسبة الـ MACs

    SAM-ViT-H to L2: 2973 / 69 ≈ 43.1x fewer encoder MACs.
    من SAM-ViT-H إلى L2: 2973 / 69 ≈ 43.1x أقل في MACs المُرمِّز.
  2. Throughput ratioنسبة الإنتاجية (throughput)

    538 / 11 ≈ 48.9x more images per second.
    538 / 11 ≈ 48.9x صورًا أكثر في الثانية.
  3. Compareالمقارنة

    The measured speedup is larger than the MAC ratio. MACs are a hardware-neutral proxy; the real number also depends on memory access patterns and how well TensorRT kernels run linear attention.
    التسريع المقاس أكبر من نسبة الـ MACs. الـ MACs مؤشر تقريبي محايد تجاه العتاد؛ أما الرقم الحقيقي فيعتمد أيضًا على أنماط الوصول إلى الذاكرة ومدى كفاءة نوى TensorRT في تشغيل الـ linear attention.
  4. Resultالنتيجة

    43x less arithmetic bought 49x more throughput. MACs predict the direction, not the exact size, of a speedup.
    حسابات أقل بـ 43x اشترت إنتاجية أعلى بـ 49x. تتنبأ الـ MACs باتجاه التسريع، لا بحجمه الدقيق.

The table carries a second lesson. EfficientSAM has 25.3 M encoder parameters, eight times fewer than XL1's 203.3 M, and yet the two run at the same throughput (183 versus 182 img/s), with EfficientSAM losing 3.4 mAP. Model size is about memory; speed is about MACs, memory traffic and kernels. Keep the three apart.

يحمل الجدول درسًا ثانيًا. لدى EfficientSAM عدد 25.3 M من معاملات المُرمِّز، أي أقل بثماني مرات من 203.3 M في XL1، ومع ذلك يعمل الاثنان بالإنتاجية نفسها (183 مقابل 182 img/s)، ويخسر EfficientSAM 3.4 mAP. حجم النموذج (model size) يتعلق بالذاكرة؛ أما السرعة فتتعلق بالـ MACs وحركة البيانات في الذاكرة والنوى. أبقِ الثلاثة منفصلة.

Quick checkاختبار سريع

Which block of SAM does EfficientViT-SAM replace to get its speedup?أي كتلة في SAM يستبدلها EfficientViT-SAM ليحقق تسريعه؟

Quick checkاختبار سريع

What does zero-shot mean for the COCO mAP on slide 10?ما معنى zero-shot بالنسبة لـ COCO mAP في الشريحة 10؟

Recall

Name SAM's three blocks and say which one runs once per image.سمِّ الكتل الثلاث في SAM، وحدد أيها يعمل مرة واحدة لكل صورة.

Image encoder (runs once per image and dominates the cost), prompt encoder, lightweight mask decoder.
مُرمِّز الصور (يعمل مرة واحدة لكل صورة ويهيمن على التكلفة)، ومُرمِّز التلميحات، ومفكِّك الأقنعة الخفيف.

Recall

What does EfficientViT-SAM change, what does it keep, and what are the throughput and mAP of its 48.9x variant against SAM-ViT-H?ما الذي يغيّره EfficientViT-SAM، وما الذي يُبقيه، وما الإنتاجية والـ mAP لنسخته ذات التسريع 48.9x مقارنة بـ SAM-ViT-H؟

It replaces only the image encoder with EfficientViT and keeps the prompt encoder and mask decoder. L2 runs at 538 versus 11 img/s with 46.6 versus 46.5 zero-shot COCO mAP.
يستبدل مُرمِّز الصور وحده بـ EfficientViT ويُبقي مُرمِّز التلميحات ومفكِّك الأقنعة. تعمل L2 بـ 538 مقابل 11 img/s مع 46.6 مقابل 46.5 في zero-shot COCO mAP.

Type "teddy bears working as mad scientists", "a bowl of soup as a planet on a 1960s poster" or "an astronaut riding a horse on Mars" into Midjourney and a finished picture comes back. A diffusion model produced each one from a sentence, by starting from noise and removing a little of it at every step until an image appears. The results look effortless. The bill is not. Emad Mostaque, then CEO of Stability AI, said that training Stable Diffusion used 256 A100 GPUs for about 150,000 GPU-hours at a cost of about $600,000, the figure the lecture uses as Stable Diffusion's training cost.

اكتب "teddy bears working as mad scientists" (دببة محشوة تعمل علماءَ مجانين)، أو "a bowl of soup as a planet on a 1960s poster" (وعاء حساء على هيئة كوكب في ملصق من ستينيات القرن الماضي)، أو "an astronaut riding a horse on Mars" (رائد فضاء يمتطي حصانًا على المريخ) في Midjourney فتعود إليك صورة مكتملة. أنتج نموذج انتشار (diffusion model) كل واحدة منها من جملة، بأن بدأ من ضوضاء وأزال جزءًا صغيرًا منها في كل خطوة حتى تظهر صورة. تبدو النتائج بلا جهد، لكن الفاتورة ليست كذلك. قال Emad Mostaque، الرئيس التنفيذي لـ Stability AI آنذاك، إن تدريب Stable Diffusion استخدم 256 وحدة A100 لنحو 150,000 GPU-hours بتكلفة نحو $600,000، وهو الرقم الذي تستخدمه المحاضرة بوصفه تكلفة تدريب Stable Diffusion.

Worked exampleمثال محلول

What $600,000 of training looks likeكيف يبدو تدريب بقيمة $600,000

  1. Wall-clock timeالزمن الفعلي (wall-clock)

    150,000 GPU-hours / 256 GPUs ≈ 586 hours, which is about 24.4 days with every GPU busy the whole time.
    150,000 GPU-hours / 256 GPUs ≈ 586 hours، أي نحو 24.4 يومًا مع انشغال كل GPU طوال الوقت.
  2. Price per GPU-hourالسعر لكل GPU-hour

    $600,000 / 150,000 GPU-hours = $4.00 per A100-hour.
    $600,000 / 150,000 GPU-hours = $4.00 لكل ساعة A100.
  3. Cross-checkتحقق متقاطع

    256 GPUs × 24 h × 24.4 days ≈ 149,900 GPU-hours, matching the stated total.
    256 GPUs × 24 h × 24.4 days ≈ 149,900 GPU-hours، وهو ما يطابق الإجمالي المعلن.
  4. Resultالنتيجة

    One training run: a rack of 256 accelerators for most of a month. Nobody iterates on that budget casually, which is why efficient training and inference are research topics rather than polish.
    دورة تدريب واحدة: رفّ من 256 مسرّعًا لمعظم شهر. لا أحد يكرر التجارب بهذه الميزانية باستخفاف، ولهذا فإن التدريب والاستدلال الفعّالين موضوعات بحثية لا مجرد تحسينات شكلية.

Stable Diffusion training run, 2022دورة تدريب Stable Diffusion، عام 2022

GPUsوحدات GPU
256 × A100256 × A100
GPU-hours
about 150,000نحو 150,000
Wall clockالزمن الفعلي
about 24 daysنحو 24 يومًا
Costالتكلفة
about $600,000نحو $600,000
Implied priceالسعر الضمني
about $4 per GPU-hourنحو $4 لكل GPU-hour
RunالدورةA100sوحدات A100GPU-hoursGPU-hoursWall clockالزمن الفعليCostالتكلفة
Stable Diffusion, 2022Stable Diffusion، 2022256256about 150,000نحو 150,000about 24 daysنحو 24 يومًاabout $600,000نحو $600,000
MosaicML SD2 base, 2023MosaicML SD2 base، 2023128128about 21,000نحو 21,0006.8 days6.8 أيامunder $42,000أقل من $42,000
The original run next to MosaicML's SD2 base runالدورة الأصلية إلى جانب دورة MosaicML لنموذج SD2 base

Why parameters are not the costلماذا لا تمثل المعاملات التكلفة

Training is paid once. Inference is paid on every request, so compare what one forward pass costs in MACs across four very different models. The natural expectation is that the biggest model costs the most. The numbers say otherwise, and the reason is the most important idea in this concept.

يُدفع ثمن التدريب مرة واحدة. أما الاستدلال فيُدفع ثمنه مع كل طلب، لذا قارن تكلفة تمريرة أمامية واحدة بالـ MACs عبر أربعة نماذج مختلفة جدًا. التوقع الطبيعي أن النموذج الأكبر هو الأعلى تكلفة. لكن الأرقام تقول غير ذلك، والسبب هو أهم فكرة في هذا المفهوم.

ModelالنموذجParametersالمعاملاتWorkloadحمل العملMACsMACsRatioالنسبة
ViT-HViT-H0.6 B0.6 B518 x 518 image, one forward passصورة 518 x 518، تمريرة أمامية واحدة1.02 T1.02 Tbaselineخط الأساس
Llama 3 8BLlama 3 8B8 B8 B1,024-token context, 512 output tokensسياق من 1,024 token، و512 token للمخرجات11.2 T11.2 T11x ViT-H11x ViT-H
FLUX.1FLUX.112 B12 B1K x 1K image, one denoising stepصورة 1K x 1K، خطوة إزالة ضوضاء واحدة37.2 T37.2 T36x ViT-H, 3.3x Llama 336x ViT-H, 3.3x Llama 3
CogVideoXCogVideoX5.6 B5.6 B480 x 720, 49 frames, one denoising step480 x 720، 49 إطارًا، خطوة إزالة ضوضاء واحدة332 T332 T8.9x FLUX.1, 326x ViT-H8.9x FLUX.1, 326x ViT-H
MACs for one pass, from slide 12 (log axis on the slide)MACs لتمريرة واحدة، من الشريحة 12 (محور لوغاريتمي في الشريحة)

FLUX.1 has 12 B parameters and CogVideoX has 5.6 B, yet CogVideoX needs 8.9x the MACs per step. Llama 3 8B has more parameters than ViT-H by a factor of thirteen but costs eleven times more, not thirteen, and FLUX.1 with 1.5x the parameters of Llama 3 costs 3.3x as much. Parameters alone predict none of these ratios. What predicts them is how many tokens each model pushes through those parameters. A dense transformer spends roughly one multiply-accumulate (two FLOPs) per parameter per token in its linear layers, and on top of that attention compares every token with every other token.

لدى FLUX.1 12 B معامل ولدى CogVideoX 5.6 B، ومع ذلك يحتاج CogVideoX إلى 8.9x من الـ MACs لكل خطوة. ولدى Llama 3 8B معاملات أكثر من ViT-H بثلاثة عشر ضعفًا، لكنه يكلّف أكثر بأحد عشر ضعفًا لا ثلاثة عشر، وFLUX.1 الذي يملك 1.5x من معاملات Llama 3 يكلّف 3.3x. المعاملات وحدها لا تتنبأ بأي من هذه النسب. ما يتنبأ بها هو عدد الـ tokens التي يمررها كل نموذج عبر تلك المعاملات. ينفق الـ transformer الكثيف تقريبًا عملية ضرب وتجميع واحدة (أي اثنتين من FLOPs) لكل معامل لكل token في طبقاته الخطية، وفوق ذلك يقارن الـ attention كل token بكل token آخر.

MACs per pass≈Nparams Ntokens+c Ntokens2 d\text{MACs per pass} \approx N_{\text{params}}\,N_{\text{tokens}} + c\,N_{\text{tokens}}^{2}\,d
Why tokens, not parameters, set the bill: a linear term and a quadratic attention termلماذا تحدد الرموز (tokens) الكلفة لا المعاملات: حد خطي وحد تربيعي للانتباه

Now the numbers make sense. ViT-H sees one 518 × 518 image cut into 14-pixel patches, 37 × 37 = 1,369 tokens: 632 M × 1,370 ≈ 0.87 T for the linear layers, and the attention term adds the rest of the 1.02 T. Llama 3 processes about 1,500 tokens. FLUX.1 works on the latent of a 1K × 1K image, about 4,000 tokens. CogVideoX compresses 49 frames of 480 × 720 video into 13 latent frames and denoises them all at once, about 17,500 tokens, roughly four times FLUX.1. Because the attention term grows with the square of that count, the bill grows far more than four times, and the smaller parameter count cannot save it. Read the linear term as the weights each token actually passes through, not the headline parameter count: for FLUX.1 the naive 12 B × 4,096 ≈ 49 T overshoots the 37.2 T bar because image and text tokens use separate weights in its double-stream blocks. One accounting rule explains the ordering of the chart: compute is parameters times tokens, plus attention.

الآن تصبح الأرقام منطقية. يرى ViT-H صورة واحدة بحجم 518 × 518 مقطّعة إلى رقع بحجم 14-pixel، أي 37 × 37 = 1,369 token: 632 M × 1,370 ≈ 0.87 T للطبقات الخطية، ويضيف حد الـ attention بقية الـ 1.02 T. يعالج Llama 3 نحو 1,500 token. ويعمل FLUX.1 على الفضاء الكامن (latent) لصورة 1K × 1K، أي نحو 4,000 token. ويضغط CogVideoX 49 إطارًا من فيديو 480 × 720 إلى 13 إطارًا كامنًا ويزيل الضوضاء منها كلها دفعة واحدة، أي نحو 17,500 token، قرابة أربعة أضعاف FLUX.1. ولأن حد الـ attention ينمو مع مربع هذا العدد، تنمو الفاتورة أكثر بكثير من أربعة أضعاف، ولا يستطيع العدد الأصغر من المعاملات إنقاذها. اقرأ الحد الخطي على أنه الأوزان التي يمر بها كل token فعلًا، لا عدد المعاملات المعلن: في FLUX.1 يتجاوز التقدير الساذج 12 B × 4,096 ≈ 49 T عمود 37.2 T لأن tokens الصورة والنص تستخدم أوزانًا منفصلة في كتل التدفق المزدوج (double-stream blocks). قاعدة محاسبية واحدة تفسر ترتيب المخطط: الحوسبة هي المعاملات مضروبة في الـ tokens، زائد الـ attention.

One more multiplier hides in the words "single step" under the FLUX.1 and CogVideoX bars. A diffusion model repeats its forward pass once per denoising step. With a 50-step sampler, one 1K FLUX.1 image costs 37.2 T × 50 = 1,860 T MACs, and a CogVideoX clip costs 332 T × 50 = 16,600 T. A classifier pays its bar once; a generator pays it fifty times.

يختبئ مضاعِف آخر في عبارة "single step" (خطوة واحدة) تحت عمودي FLUX.1 وCogVideoX. يكرر نموذج الانتشار تمريرته الأمامية مرة لكل خطوة إزالة ضوضاء (denoising step). مع مُعايِن (sampler) من 50 خطوة، تكلّف صورة FLUX.1 واحدة بدقة 1K مقدار 37.2 T × 50 = 1,860 T MACs، ويكلّف مقطع CogVideoX مقدار 332 T × 50 = 16,600 T. المصنِّف يدفع ثمن عموده مرة واحدة؛ أما النموذج التوليدي فيدفعه خمسين مرة.

Resolution is worse than quadraticالدقة (resolution) أسوأ من التربيعي

Now hold the model fixed and vary only the image side length for FLUX.1, from 1024 to 4096. Going four times wider makes the image sixteen times larger in pixels, so a quadratic law would predict sixteen times the MACs. From the slide's left chart, one step at 1K x 1K costs 37.2 T, and the curve on the right ends near 1,950 T at 4096: a factor of about 52, far above the 16x a quadratic law predicts. This is what the lecture calls super-quadratic scaling, and the formula above explains it. Tokens grow with pixels (16x), the linear term grows with tokens (16x), and the attention term grows with tokens squared (256x). The blend lands at about 52x.

ثبّت النموذج الآن وغيّر فقط طول ضلع الصورة في FLUX.1، من 1024 إلى 4096. جعل الصورة أعرض بأربع مرات يجعلها أكبر بست عشرة مرة في البكسلات، لذا يتنبأ قانون تربيعي بستة عشر ضعفًا من الـ MACs. من المخطط الأيسر في الشريحة، تكلّف خطوة واحدة عند 1K x 1K مقدار 37.2 T، وينتهي المنحنى على اليمين قرب 1,950 T عند 4096: أي عامل يقارب 52، أعلى بكثير من 16x التي يتنبأ بها القانون التربيعي. هذا ما تسميه المحاضرة super-quadratic scaling (تدرّج أسرع من التربيعي)، والصيغة أعلاه تفسّره. تنمو الـ tokens مع البكسلات (16x)، وينمو الحد الخطي مع الـ tokens (16x)، وينمو حد الـ attention مع مربع الـ tokens (256x). والمزيج يستقر عند نحو 52x.

SimulatorمحاكيFLUX.1 cost versus resolutionكلفة FLUX.1 مقابل الدقة (resolution)
1024 × 1024
05001000150020001024153620482560307235844096MACs (T), one denoising stepdashed: quadratic in side lengthsolid: fit to the slide, dots: slide readings
Pixelsعدد البكسلات1,048,5761024 squared, 1.0x the 1024 imageمربع 1024، أي 1.0x من صورة 1024
Latent tokenstokens الكامنة4,096(side ÷ 16) squared, typical latent patching(side ÷ 16) تربيع، وهو تقسيم الـ latent إلى رقع المعتاد
MACs per stepMACs لكل خطوة37.2T1.0x the 1024 cost1.0x من كلفة 1024
Quadratic referenceالمرجع التربيعي37.2Tif cost only followed pixel countلو كانت الكلفة تتبع عدد البكسلات فقط
Token-linear shareالحصة الخطية في عدد tokens31.6Tlinear layers, grows with tokensالطبقات الخطية، تنمو مع عدد tokens
Attention shareحصة attention5.6Tgrows with tokens squaredتنمو مع مربع عدد tokens
50-step image1,860Tper-step MACs times sampler stepsMACs الخطوة الواحدة مضروبة في عدد خطوات الـ sampler

The solid curve is 31.6 (s/1024)^2 + 5.6 (s/1024)^4 trillion MACs, fitted to the two end points of the slide chart. It is a teaching model of the slide curve, not a profile of FLUX.1 itself.المنحنى المتصل هو 31.6 (s/1024)^2 + 5.6 (s/1024)^4 تريليون MACs، وقد طُوِّع ليمر بنقطتي الطرفين في رسم الشريحة. إنه نموذج تعليمي لمنحنى الشريحة، وليس قياسًا فعليًا لـ FLUX.1 نفسه.

FLUX.1 MACs per step read off the slide chart, by image sideMACs لكل خطوة في FLUX.1 مقروءة من مخطط الشريحة، حسب طول ضلع الصورة

1024
about 37 Tنحو 37 T
1536
about 94 Tنحو 94 T
2048
about 207 Tنحو 207 T
2560
about 406 Tنحو 406 T
3072
about 728 Tنحو 728 T
3584
about 1,226 Tنحو 1,226 T
4096
about 1,950 Tنحو 1,950 T

Worked exampleمثال محلول

Fitting the slide curveملاءمة منحنى الشريحة

  1. Modelالنموذج

    Let r = side / 1024 and write MACs(r) = A r² + B r⁴: a token-linear part and an attention part.
    لنفرض r = side / 1024 ونكتب MACs(r) = A r² + B r⁴: جزء خطي في الـ tokens وجزء للـ attention.
  2. Fit the end pointsملاءمة النقطتين الطرفيتين

    A + B = 37.2 at r = 1 and 16A + 256B = 1950 at r = 4, so B ≈ 5.6 T and A ≈ 31.6 T.
    A + B = 37.2 عند r = 1 و16A + 256B = 1950 عند r = 4، إذن B ≈ 5.6 T وA ≈ 31.6 T.
  3. Check the middleتحقق من الوسط

    At 2048: 4 × 31.6 + 16 × 5.6 ≈ 216 T (chart about 207 T). At 3072: 9 × 31.6 + 81 × 5.6 ≈ 741 T (chart about 728 T).
    عند 2048: 4 × 31.6 + 16 × 5.6 ≈ 216 T (المخطط نحو 207 T). وعند 3072: 9 × 31.6 + 81 × 5.6 ≈ 741 T (المخطط نحو 728 T).
  4. Resultالنتيجة

    At 1024 attention is about 15% of the cost. At 4096 it is about three quarters. This is why efficient attention (the EfficientViT backbone from the previous concept, FlashAttention, linear attention) is a research area of its own.
    عند 1024 يشكّل الـ attention نحو 15% من التكلفة. وعند 4096 يشكّل نحو ثلاثة أرباعها. ولهذا فإن الـ attention الفعّال (العمود الفقري EfficientViT من المفهوم السابق، وFlashAttention، والـ linear attention) مجال بحثي قائم بذاته.

Quick checkاختبار سريع

Why does one CogVideoX step cost more MACs than one FLUX.1 step?لماذا تكلّف خطوة واحدة من CogVideoX عددًا من MACs أكبر من خطوة واحدة من FLUX.1؟

Quick checkاختبار سريع

FLUX.1 MACs rise from about 37 T at 1024 to about 1,950 T at 4096, roughly 52x, while pixels grow 16x. What best explains that?ترتفع MACs في FLUX.1 من نحو 37 T عند 1024 إلى نحو 1,950 T عند 4096، أي قرابة 52x، بينما تنمو البكسلات 16x. ما أفضل تفسير لذلك؟

Recall

256 A100s for 150,000 GPU-hours: how many days is that, and what price per GPU-hour does $600,000 imply?256 وحدة A100 لمدة 150,000 GPU-hours: كم يومًا يعادل ذلك، وما السعر لكل GPU-hour الذي يعنيه مبلغ $600,000؟

150,000 / 256 ≈ 586 hours, about 24 days. $600,000 / 150,000 = $4 per GPU-hour.
150,000 / 256 ≈ 586 hours، أي نحو 24 يومًا. $600,000 / 150,000 = $4 لكل GPU-hour.

Recall

Why does CogVideoX with 5.6 B parameters need 8.9x the MACs of FLUX.1 with 12 B parameters?لماذا يحتاج CogVideoX بمعاملاته البالغة 5.6 B إلى 8.9x من MACs نموذج FLUX.1 ذي 12 B معامل؟

It denoises a stack of latent frames per step, about four times FLUX.1's token count. Compute follows tokens (and tokens squared for attention), not parameter count.
لأنه يزيل الضوضاء من كومة من الإطارات الكامنة في كل خطوة، أي نحو أربعة أضعاف عدد tokens في FLUX.1. الحوسبة تتبع الـ tokens (ومربعها في حالة الـ attention)، لا عدد المعاملات.

Recall

From 1024 to 4096, how much do pixels grow and how much do FLUX.1 MACs grow, and why the difference?من 1024 إلى 4096، بكم تنمو البكسلات وبكم تنمو MACs في FLUX.1، ولماذا الفرق؟

Pixels grow 16x, MACs about 52x. The linear layers scale with tokens, but attention scales with tokens squared, so the total is super-quadratic in side length.
تنمو البكسلات 16x، وتنمو الـ MACs نحو 52x. الطبقات الخطية تتدرج مع الـ tokens، لكن الـ attention يتدرج مع مربعها، لذا فإن الإجمالي أسرع من التربيعي بالنسبة لطول الضلع.

Ask SDXL for a "Romantic painting of a ship sailing in a stormy sea" at high resolution. One GPU paints one ship in 12.3 s. The obvious way to go faster is to cut the canvas into four vertical strips, hand each strip to its own GPU, and let them work without talking. The result is 3.9x faster and wrong: four strips, four ships, four different skies. Each patch generated its own picture because no patch could see the others.

اطلب من SDXL "Romantic painting of a ship sailing in a stormy sea" (لوحة رومانسية لسفينة تبحر في بحر عاصف) بدقة عالية. يرسم GPU واحد سفينة واحدة في 12.3 s. الطريقة البديهية للإسراع هي تقطيع اللوحة إلى أربعة شرائط عمودية، وتسليم كل شريط إلى GPU خاص به، وتركها تعمل دون أن تتواصل. النتيجة أسرع بـ 3.9x لكنها خاطئة: أربعة شرائط، وأربع سفن، وأربع سماوات مختلفة. ولّدت كل رقعة صورتها الخاصة لأنه لم تكن هناك رقعة تستطيع رؤية الأخريات.

Four isolated patches each paint their own ship. Let each patch read its neighbours' activations from the previous step and one ship spans the frameأربع رقع معزولة ترسم كل منها سفينتها الخاصة. دع كل رقعة تقرأ تنشيطات (activations) جاراتها من الخطوة السابقة فتمتد سفينة واحدة عبر الإطار

DistriFusion (Li et al., CVPR 2024) keeps the split and restores the context. The trick rests on a property of diffusion: consecutive denoising steps produce similar activations, because each step removes only a little noise. So a patch can attend to its neighbours' activations from the previous step instead of waiting for the current one. The paper calls this displaced patch parallelism. The first few denoising steps (the warm-up: the first step plus four more in the paper) run synchronous patch parallelism so everyone starts from the same picture; after that, communication runs asynchronously and hides behind computation. No retraining is needed. The latency drops to 4.16 s, 3.0x faster than one GPU, and the ship is one ship.

يُبقي DistriFusion (Li et al., CVPR 2024) على التقسيم ويستعيد السياق. تعتمد الحيلة على خاصية في الـ diffusion: خطوات إزالة الضوضاء المتتالية (denoising steps) تنتج تنشيطات متشابهة، لأن كل خطوة تزيل قدرًا ضئيلًا من الضوضاء فقط. لذلك تستطيع الرقعة أن تنتبه (attend) إلى تنشيطات جاراتها من الخطوة السابقة بدلًا من انتظار الخطوة الحالية. تسمي الورقة ذلك displaced patch parallelism (توازي الرقع المُزاح). أول بضع خطوات لإزالة الضوضاء (الإحماء warm-up: الخطوة الأولى وأربع خطوات أخرى في الورقة) تعمل بتوازي رقع متزامن حتى يبدأ الجميع من الصورة نفسها؛ وبعد ذلك يجري التواصل بشكل غير متزامن ويختبئ خلف الحوسبة. لا حاجة لإعادة التدريب. ينخفض زمن الاستجابة (latency) إلى 4.16 s، أي أسرع بـ 3.0x من GPU واحد، والسفينة سفينة واحدة.

SetupالإعدادMACs per deviceMACs لكل جهازWork per deviceالعمل لكل جهازLatencyزمن الاستجابةSpeedupالتسريعQualityالجودة
Original, 1 GPUالأصلي، GPU واحدة907 T907 T1x1x12.3 s12.3 s1x1xreference imageالصورة المرجعية
Naive patches, 4 GPUsرقع بسيطة، 4 وحدات GPU190 T190 T4.8x lessأقل بـ 4.8x3.14 s3.14 s3.9x3.9xduplicated subjectsتكرار العناصر
DistriFusion, 4 GPUsDistriFusion، 4 وحدات GPU227 T227 T4.0x lessأقل بـ 4.0x4.16 s4.16 s3.0x3.0xno artifactsبلا تشوهات
DistriFusion, 8 GPUs (paper, not on the slide)DistriFusion، 8 وحدات GPU (من الورقة، ليست في الشريحة)113 T113 T8.0x lessأقل بـ 8.0x2.74 s2.74 s4.5x4.5xno artifactsبلا تشوهات
SDXL at 1280 x 1920, 50-step Euler sampler, A100 GPUs (DistriFusion teaser; slide 13 shows the first three rows)SDXL بدقة 1280 x 1920، مُعايِن Euler من 50 خطوة، وحدات A100 (الشكل التشويقي لـ DistriFusion؛ تعرض الشريحة 13 الصفوف الثلاثة الأولى)

Worked exampleمثال محلول

Where the work wentأين ذهب العمل

  1. Naive totalالإجمالي في الطريقة البسيطة

    190 T × 4 = 760 T, less than the original 907 T. Naive patches skip all cross-patch attention, so the total work drops. The missing 147 T is exactly the missing context.
    190 T × 4 = 760 T، أقل من 907 T الأصلية. الرقع البسيطة تتخطى كل attention بين الرقع، لذا ينخفض إجمالي العمل. والـ 147 T المفقودة هي بالضبط السياق المفقود.
  2. DistriFusion totalإجمالي DistriFusion

    227 T × 4 = 908 T ≈ 907 T. The full computation is preserved and simply divided by four.
    227 T × 4 = 908 T ≈ 907 T. الحوسبة الكاملة محفوظة ومقسومة ببساطة على أربعة.
  3. Ideal latencyزمن الاستجابة المثالي

    12.3 s / 4 ≈ 3.08 s if four GPUs were perfectly parallel. Naive lands at 3.14 s, DistriFusion at 4.16 s.
    12.3 s / 4 ≈ 3.08 s لو كانت وحدات GPU الأربع متوازية تمامًا. الطريقة البسيطة تصل إلى 3.14 s، وDistriFusion إلى 4.16 s.
  4. Resultالنتيجة

    DistriFusion does 4.0x less work per GPU but runs only 3.0x faster. The difference is the cost of exchanging activations between GPUs and of the synchronous warm-up steps.
    يؤدي DistriFusion عملًا أقل بـ 4.0x لكل GPU لكنه أسرع بـ 3.0x فقط. الفرق هو تكلفة تبادل التنشيطات بين وحدات GPU وتكلفة خطوات الإحماء المتزامنة.
parallel efficiency=speedupdevices=3.04=75%\text{parallel efficiency} = \frac{\text{speedup}}{\text{devices}} = \frac{3.0}{4} = 75\%
Naive patches reach 3.9 / 4 = 98% by skipping work; DistriFusion pays 25% for keeping the picture wholeالرقع الساذجة تبلغ 3.9 / 4 = 98% بتخطي العمل؛ أما DistriFusion فتدفع 25% للحفاظ على الصورة كاملة

The pattern is general in distributed systems: splitting work across machines helps only when the compute you save exceeds the communication you add. Here the saving is large because a high-resolution diffusion step is enormous (MACs in the hundreds of trillions), and the communication is hidden behind it. The paper also runs a scaling study on a larger image, 3840 × 3840, shown in the table below. Read down the efficiency column: every added GPU still helps, but each device contributes less than the last, because the communication grows while the per-device work shrinks.

هذا النمط عام في الأنظمة الموزعة: توزيع العمل على عدة أجهزة لا يفيد إلا عندما تتجاوز الحوسبةُ التي توفرها التواصلَ الذي تضيفه. هنا التوفير كبير لأن خطوة الانتشار عالية الدقة ضخمة (MACs بمئات التريليونات)، والتواصل مختبئ خلفها. تجري الورقة أيضًا دراسة تدرّج على صورة أكبر، 3840 × 3840، مبيّنة في الجدول أدناه. اقرأ عمود الكفاءة (efficiency) من الأعلى إلى الأسفل: كل GPU مضافة ما زالت تفيد، لكن كل جهاز يساهم بأقل من سابقه، لأن التواصل ينمو بينما يتقلص العمل لكل جهاز.

A100sوحدات A100Speedup over one GPUالتسريع مقارنة بـ GPU واحدةMarginal speedupالتسريع الحدّيParallel efficiencyكفاءة التوازي
111x1xreferenceالمرجع100%100%
221.8x1.8x1.8x1.8x90%90%
443.4x3.4x1.9x1.9x85%85%
886.1x6.1x1.8x1.8x76%76%
DistriFusion on SDXL at 3840 x 3840, A100s (paper; same 50-step Euler sampler as the table above, a larger image). Marginal column divides each speedup by the one above itDistriFusion على SDXL بدقة 3840 x 3840، وحدات A100 (من الورقة؛ مُعايِن Euler نفسه من 50 خطوة كما في الجدول أعلاه، مع صورة أكبر). عمود التسريع الحدّي يقسم كل تسريع على الذي فوقه

Quick checkاختبار سريع

DistriFusion cuts MACs per GPU 4.0x but latency only 3.0x. What explains the gap?يخفض DistriFusion عدد MACs لكل GPU بمقدار 4.0x لكنه يخفض زمن الاستجابة بمقدار 3.0x فقط. ما الذي يفسر الفجوة؟

Quick checkاختبار سريع

Where does a DistriFusion patch get context about its neighbours?من أين تحصل رقعة DistriFusion على السياق المتعلق بجاراتها؟

Recall

What artifact does naive patch parallelism produce, and why?ما التشوه الذي ينتجه توازي الرقع البسيط، ولماذا؟

Duplicated subjects (four ships for one prompt), because the patches never see each other and each generates its own composition.
تكرار العناصر (أربع سفن لتلميح واحد)، لأن الرقع لا ترى بعضها أبدًا فتولّد كل منها تكوينها الخاص.

Recall

Why is 190 T times 4 less than the original 907 T?لماذا يكون 190 T مضروبًا في 4 أقل من 907 T الأصلية؟

Naive patches skip the cross-patch attention, so they do less total work. DistriFusion's 227 T × 4 = 908 T preserves the whole computation.
لأن الرقع البسيطة تتخطى الـ attention بين الرقع، فتؤدي عملًا إجماليًا أقل. أما 227 T × 4 = 908 T في DistriFusion فتحفظ الحوسبة كاملة.

A 2015 Toyota Prius V with a roof-mounted Velodyne LiDAR drives a wooded test track. A network reads raw 3D point clouds and produces steering. A car does not care how elegant the network is; it cares whether the answer arrives before the deadline the system sets. Three measurements tell the story: MinkowskiNet at 5 fps is "too slow to drive", the same network with optimised kernels reaches 18 fps, and Fast-LiDARNet reaches 47 fps, above the 30 fps line the slide marks as real time.

سيارة Toyota Prius V موديل 2015 مزودة بجهاز Velodyne LiDAR مثبت على السقف تسير في مضمار اختبار مُشجَّر. تقرأ شبكةٌ سحبَ النقاط ثلاثية الأبعاد الخام (point clouds) وتنتج أوامر التوجيه. لا تهتم السيارة بمدى أناقة الشبكة؛ ما يهمها هو أن تصل الإجابة قبل الموعد النهائي الذي يحدده النظام. ثلاثة قياسات تحكي القصة: MinkowskiNet عند 5 fps "أبطأ من أن يقود" (too slow to drive)، والشبكة نفسها مع نوى محسّنة تصل إلى 18 fps، وFast-LiDARNet تصل إلى 47 fps، فوق خط 30 fps الذي تحدده الشريحة بوصفه الزمن الحقيقي (real time).

Kernel optimisation lifts 5 fps to 18 fps and still misses the 30 fps line. Only the redesigned model crosses itتحسين النوى يرفع 5 fps إلى 18 fps ومع ذلك لا يبلغ خط 30 fps. النموذج المعاد تصميمه وحده يتجاوزه

The most useful way to read fps is to invert it into a frame time. A stream at 30 fps gives you 33.3 ms per frame, and everything the model does must fit inside that budget.

أنفع طريقة لقراءة الـ fps هي قلبها إلى زمن إطار (frame time). تدفق بمعدل 30 fps يمنحك 33.3 ms لكل إطار، وكل ما يفعله النموذج يجب أن يتسع داخل تلك الميزانية.

tframe=1000 msfpst_{\text{frame}} = \frac{1000\ \text{ms}}{\text{fps}}
Frame time from frame rateزمن الإطار من معدل الإطارات

Frame times behind the barsأزمنة الإطارات وراء الأعمدة

Budget at 30 fpsالميزانية عند 30 fps
33.3 ms33.3 ms
MinkowskiNet, 5 fps
200 ms, 167 ms over budget200 ms، تتجاوز الميزانية بـ 167 ms
Optimised kernels, 18 fpsنوى محسّنة، 18 fps
55.6 ms, 22 ms over budget55.6 ms، تتجاوز الميزانية بـ 22 ms
Fast-LiDARNet, 47 fps
21.3 ms, 12 ms to spare21.3 ms، مع فائض 12 ms

The paper (Liu, Amini, Zhu, Karaman, Han and Rus, ICRA 2021) is explicit about the two levers. Their optimised sparse convolution kernel gives a 3.6x acceleration, and their hardware-aware model design reduces latency by another 2.6x. The two multiply: 3.6 × 2.6 ≈ 9.4, which is 47 / 5. The first lever is pure systems work: the same network, the same accuracy, better code for the sparse operations point clouds need. The second is algorithmic: a smaller architecture chosen with the hardware in mind. This pairing is what the lecture means by algorithm and system co-design. Neither lever alone reaches the line. Kernels take the network from 200 ms to 55.6 ms and still miss by 22 ms; the redesign brings it to 21.3 ms.

الورقة (Liu, Amini, Zhu, Karaman, Han and Rus, ICRA 2021) صريحة بشأن الرافعتين. نواة الالتفاف المتناثر (sparse convolution kernel) المحسّنة لديهم تعطي تسريعًا قدره 3.6x، وتصميم النموذج المراعي للعتاد (hardware-aware) يخفض زمن الاستجابة بمقدار 2.6x أخرى. الرافعتان تتضاعفان: 3.6 × 2.6 ≈ 9.4، وهو 47 / 5. الرافعة الأولى عمل أنظمة بحت: الشبكة نفسها، والدقة نفسها، وشيفرة أفضل للعمليات المتناثرة التي تحتاجها سحب النقاط. والثانية خوارزمية: بنية أصغر مختارة مع مراعاة العتاد. هذا الاقتران هو ما تعنيه المحاضرة بـ algorithm and system co-design (التصميم المشترك للخوارزمية والنظام). ولا تصل أي رافعة وحدها إلى الخط. النوى تنقل الشبكة من 200 ms إلى 55.6 ms وتظل متأخرة بـ 22 ms؛ وإعادة التصميم توصلها إلى 21.3 ms.

ConfigurationالإعدادRateالمعدلFrame timeزمن الإطارLeverالرافعةInside 33.3 ms?داخل 33.3 ms؟
MinkowskiNetMinkowskiNet5 fps5 fps200 ms200 msnoneلا شيءno, 167 ms overلا، يتجاوزها بـ 167 ms
MinkowskiNet, optimised sparse kernelsMinkowskiNet مع نوى متناثرة محسّنة18 fps18 fps55.6 ms55.6 mssystem: 3.6xالنظام: 3.6xno, 22 ms overلا، يتجاوزها بـ 22 ms
Fast-LiDARNetFast-LiDARNet47 fps47 fps21.3 ms21.3 msalgorithm: 2.6x more, 9.4x totalالخوارزمية: 2.6x إضافية، 9.4x إجمالًاyes, 12 ms to spareنعم، مع فائض 12 ms
Three configurations from slide 14ثلاثة إعدادات من الشريحة 14

Quick checkاختبار سريع

Kernel optimisation lifts MinkowskiNet to 18 fps. Why is that still not enough?يرفع تحسين النوى MinkowskiNet إلى 18 fps. لماذا لا يكفي ذلك؟

Recall

Name Fast-LiDARNet's two levers with their multipliers and the resulting frame rates.سمِّ رافعتي Fast-LiDARNet مع مضاعِف كل منهما ومعدلات الإطارات الناتجة.

Sparse-convolution kernel optimisation, 3.6x (5 to 18 fps), and hardware-aware model design, 2.6x (18 to 47 fps), 9.4x in total.
تحسين نوى الالتفاف المتناثر، 3.6x (من 5 إلى 18 fps)، وتصميم النموذج المراعي للعتاد، 2.6x (من 18 إلى 47 fps)، أي 9.4x إجمالًا.

Recall

What is the frame budget at 30 fps, and what is MinkowskiNet's frame time at 5 fps?ما ميزانية الإطار عند 30 fps، وما زمن إطار MinkowskiNet عند 5 fps؟

1000 / 30 ≈ 33.3 ms budget; 1000 / 5 = 200 ms per frame.
الميزانية 1000 / 30 ≈ 33.3 ms؛ و1000 / 5 = 200 ms لكل إطار.

MT-NLG, the largest model on the lecture's chart, has 530 billion parameters. Store each one in FP16, two bytes, and the weights alone occupy 530 × 10⁹ × 2 = 1,060 GB. The largest GPU of that period, an A100 with 80 GB, holds 40 billion FP16 parameters. The gap between the two is 1,060 / 80 = 13.25, so 14 GPUs of weights before a single activation is computed.

لدى MT-NLG، أكبر نموذج على مخطط المحاضرة، 530 مليار معامل. خزّن كل واحد منها بصيغة FP16، أي بايتين، فتشغل الأوزان وحدها 530 × 10⁹ × 2 = 1,060 GB. أكبر GPU في تلك الفترة، وهي A100 بذاكرة 80 GB، تسع 40 مليار معامل بصيغة FP16. الفجوة بين الاثنين 1,060 / 80 = 13.25، أي 14 وحدة GPU من الأوزان قبل حساب تنشيط واحد.

To compare a model with a chip, put both on one log axis of model size by converting GPU bytes into a parameter count at FP16, which is what the lecture's assumption "data are FP16" means. 16 GB becomes 8 B parameters, 32 GB becomes 16 B, 80 GB becomes 40 B. On that shared axis the two curves tell the story of the large language model era: model size climbs from 0.05 B to 530 B, about 10,000x in roughly four years, while GPU memory climbs from 16 GB to 80 GB, 5x. Models have outgrown the chips they run on, and the distance keeps widening.

لمقارنة نموذج برقاقة، ضع الاثنين على محور لوغاريتمي واحد لحجم النموذج (model size) بتحويل بايتات الـ GPU إلى عدد معاملات بصيغة FP16، وهذا ما يعنيه افتراض المحاضرة "data are FP16". تصبح 16 GB مساوية لـ 8 B معامل، و32 GB مساوية لـ 16 B، و80 GB مساوية لـ 40 B. على هذا المحور المشترك يروي المنحنيان قصة عصر نماذج اللغة الكبيرة (large language model): يصعد حجم النموذج من 0.05 B إلى 530 B، أي نحو 10,000x في قرابة أربع سنوات، بينما تصعد ذاكرة الـ GPU من 16 GB إلى 80 GB، أي 5x. لقد تجاوزت النماذج الرقائق التي تعمل عليها، والمسافة تواصل الاتساع.

Model parameters climb about 10,000x while GPU memory climbs about 5x on the same FP16 axis. The gap at 2022 is 13xتصعد معاملات النماذج نحو 10,000x بينما تصعد ذاكرة GPU نحو 5x على محور FP16 نفسه. الفجوة في 2022 تبلغ 13x
ModelالنموذجYearالسنةParametersالمعاملاتFP16 weightsأوزان FP16A100 80 GB GPUsوحدات A100 80 GB
TransformerTransformer201720170.05 B0.05 B0.1 GB0.1 GB11
GPTGPT201820180.11 B0.11 B0.22 GB0.22 GB11
BERT-LargeBERT-Large201820180.34 B0.34 B0.68 GB0.68 GB11
GPT-2GPT-2201920191.5 B1.5 B3 GB3 GB11
Megatron-LMMegatron-LM201920198.3 B8.3 B16.6 GB16.6 GB11
T-NLGT-NLG2020202017 B17 B34 GB34 GB11
GPT-3GPT-320202020175 B175 B350 GB350 GB55
MT-NLGMT-NLG2021 (paper 2022)2021 (الورقة 2022)530 B530 B1,060 GB1,060 GB1414
Models on the chart, FP16 weight memory and A100 80 GB count for weights aloneالنماذج على المخطط، وذاكرة الأوزان بصيغة FP16، وعدد وحدات A100 80 GB للأوزان وحدها
AcceleratorالمسرّعMemoryالذاكرةFP16 parameters it holdsمعاملات FP16 التي يسعها
TPU v2TPU v216 GB16 GB8 B8 B
V100V10032 GB32 GB16 B16 B
TPU v3TPU v332 GB32 GB16 B16 B
A100A10040 GB40 GB20 B20 B
A100A10080 GB80 GB40 B40 B
Accelerators on the chartالمسرّعات على المخطط

Parameters to bytes to GPUsمن المعاملات إلى البايتات إلى وحدات GPU

Every memory question in this course starts with one multiplication. Parameters times bytes per parameter gives the weight memory; divide by the memory of one device and round up to get the device count. The bytes per parameter depend on the numeric format: 4 for FP32, 2 for FP16 or BF16, 1 for INT8, 0.5 for INT4. Quantisation, which later lectures cover in depth, is simply the art of moving down that list without losing accuracy.

كل سؤال عن الذاكرة في هذا المقرر يبدأ بعملية ضرب واحدة. المعاملات مضروبة في البايتات لكل معامل تعطي ذاكرة الأوزان؛ اقسمها على ذاكرة جهاز واحد وقرّب إلى الأعلى لتحصل على عدد الأجهزة. تعتمد البايتات لكل معامل على الصيغة العددية (numeric format): 4 لـ FP32، و2 لـ FP16 أو BF16، و1 لـ INT8، و0.5 لـ INT4. التكميم (quantisation)، الذي تغطيه المحاضرات اللاحقة بعمق، هو ببساطة فن النزول في هذه القائمة دون خسارة الدقة.

weight bytes=Nparams×bytes per param,GPUs=⌈weight bytesGPU bytes⌉\text{weight bytes} = N_{\text{params}} \times \text{bytes per param}, \qquad \text{GPUs} = \left\lceil \frac{\text{weight bytes}}{\text{GPU bytes}} \right\rceil
Weights only; activations and the KV cache come on topالأوزان فقط؛ وتُضاف فوقها التنشيطات وذاكرة KV cache

Worked exampleمثال محلول

MT-NLG on A100 80 GB GPUsMT-NLG على وحدات A100 80 GB

  1. FP16FP16

    530 B × 2 bytes = 1,060 GB; 1,060 / 80 = 13.25, so 14 GPUs for the weights alone.
    530 B × 2 bytes = 1,060 GB؛ 1,060 / 80 = 13.25، إذن 14 وحدة GPU للأوزان وحدها.
  2. INT8INT8

    530 B × 1 byte = 530 GB; 530 / 80 = 6.6, so 7 GPUs.
    530 B × 1 byte = 530 GB؛ 530 / 80 = 6.6، إذن 7 وحدات GPU.
  3. INT4INT4

    530 B × 0.5 byte = 265 GB; 265 / 80 = 3.3, so 4 GPUs.
    530 B × 0.5 byte = 265 GB؛ 265 / 80 = 3.3، إذن 4 وحدات GPU.
  4. Resultالنتيجة

    Every halving of precision halves the shelf. The same rule says an 80 GB card holds at most 40 B FP16 parameters, and that leaves zero room for anything else.
    كل تنصيف للدقة العددية ينصّف الرف. والقاعدة نفسها تقول إن بطاقة 80 GB تسع على الأكثر 40 B معامل بصيغة FP16، وهذا لا يترك أي مساحة لأي شيء آخر.
SimulatorمحاكيParameters to bytes to GPUsمن المعاملات إلى البايتات إلى وحدات GPU
Precisionالدقة العددية
Weight memoryذاكرة الأوزان1,060 GB530 B × 2 bytes per parameter530 B × 2 بايت لكل معامل
A100 80 GB GPUsعدد وحدات A100 80 GB14ceil of GB ÷ 80, weights onlyالتقريب لأعلى لـ GB ÷ 80، للأوزان فقط
A100 40 GB GPUsعدد وحدات A100 40 GB27ceil of GB ÷ 40, weights onlyالتقريب لأعلى لـ GB ÷ 40، للأوزان فقط
One A100 80 GBوحدة A100 80 GB واحدةDoes not fitلا يتسع
needs 1,060 GBيحتاج 1,060 GBof 80 GBمن 80 GB
Phone, 4 GB RAM: 265 phonesهاتف بذاكرة 4 GB RAM: عدد الهواتف 265Does not fitلا يتسع
Microcontroller, 1 MB weight storageمتحكم دقيق بسعة 1 MB لتخزين الأوزانDoes not fitلا يتسع

Weights only. Activations and the KV cache add memory that grows with batch size and context length, so a model that just fits here does not run. GB means 10^9 bytes. The 4 GB is the RAM slide 23 gives mobile AI (its activation-memory row), which holds weights and activations together; the 1 MB is the flash weight storage it gives a microcontroller.الأوزان فقط. التنشيطات (activations) وKV cache تضيف ذاكرة تنمو مع حجم الدفعة (batch size) وطول السياق، لذا فالنموذج الذي يتسع هنا بالكاد لن يعمل فعليًا. تعني GB هنا 10^9 بايت. قيمة 4 GB هي ذاكرة RAM التي تنسبها الشريحة 23 إلى mobile AI (في صف ذاكرة التنشيطات)، وهي تحمل الأوزان والتنشيطات معًا؛ أما 1 MB فهي سعة ذاكرة flash لتخزين الأوزان التي تنسبها إلى المتحكم الدقيق.

Try Llama 3 8B in the calculator. In FP16 it needs 16 GB, four times the 4 GB of RAM slide 23 gives a phone. Slide 23 lists that 4 GB as activation memory and 256 GB as weight storage; in practice LLM inference loads the weights into that same RAM, so the 4 GB is the binding limit. In INT4 the model needs 4 GB, exactly at the line, with nothing left for activations. Now try the 2017 Transformer at 0.05 B against a microcontroller's 1 MB of weight storage: 100 MB in FP16, a hundred times over. The gap between what models need and what edge hardware has is the subject of part 03.

جرّب Llama 3 8B في الحاسبة. بصيغة FP16 يحتاج إلى 16 GB، أي أربعة أضعاف ذاكرة RAM البالغة 4 GB التي تعطيها الشريحة 23 للهاتف. تذكر الشريحة 23 هذه الـ 4 GB بوصفها ذاكرة تنشيطات و256 GB بوصفها تخزينًا للأوزان؛ لكن في الممارسة يحمّل استدلال نماذج LLM الأوزان في ذاكرة RAM نفسها، لذا فإن الـ 4 GB هي القيد الحاكم. وبصيغة INT4 يحتاج النموذج إلى 4 GB، عند الخط تمامًا، دون أن يبقى شيء للتنشيطات. جرّب الآن Transformer عام 2017 بحجم 0.05 B مقابل 1 MB من تخزين الأوزان (weight storage) في متحكم دقيق: 100 MB بصيغة FP16، أي أكثر من المتاح بمئة مرة. الفجوة بين ما تحتاجه النماذج وما يملكه عتاد الحافة هي موضوع الجزء 03.

Why run them at the edge anywayلماذا نشغّلها على الحافة رغم ذلك

If LLMs barely fit in a rack of cloud GPUs, why does the lecture insist on running them on laptops, cars and robots? Three reasons, each one a research direction in this course.

إذا كانت نماذج LLM بالكاد تتسع في رف من وحدات cloud GPUs (وحدات GPU سحابية)، فلماذا تصر المحاضرة على تشغيلها على الحواسيب المحمولة والسيارات والروبوتات؟ ثلاثة أسباب، كل منها اتجاه بحثي في هذا المقرر.

  1. Copilot services, such as code completion, office assistants and in-game chat, running locally on the machine that uses them. Latency drops, and the service works in a car or a robot far from any data center.خدمات المساعدة (copilot)، مثل إكمال الشيفرة ومساعدات المكتب والدردشة داخل الألعاب، تعمل محليًا على الجهاز الذي يستخدمها. ينخفض زمن الاستجابة، وتعمل الخدمة في سيارة أو روبوت بعيدًا عن أي مركز بيانات.
  2. Resource-constrained, low-power devices that are not always connected. An edge LLM must work when the link is slow or absent.أجهزة محدودة الموارد ومنخفضة الطاقة ليست متصلة دائمًا. يجب أن يعمل edge LLM عندما يكون الاتصال بطيئًا أو غائبًا.
  3. Privacy of user data. Prompts contain code, documents and conversations, and a local model never uploads them.خصوصية بيانات المستخدم. تحتوي التلميحات (prompts) على شيفرة ومستندات ومحادثات، والنموذج المحلي لا يرفعها أبدًا.

This is the design space for an on-device assistant, and it is why the rest of the course is about shrinking the memory (quantisation, pruning), the compute (efficient attention, distillation) and the deployment (compilers, kernels) of exactly the models on this chart. For a PhD project on embedded ML, the two-slope chart is the problem statement.

هذا هو فضاء التصميم لمساعد يعمل على الجهاز، ولهذا يدور بقية المقرر حول تقليص الذاكرة (التكميم، التقليم)، والحوسبة (الـ attention الفعّال، التقطير)، والنشر (المترجمات compilers، النوى) لهذه النماذج بالذات الموجودة على هذا المخطط. ولمشروع دكتوراه في تعلم الآلة المدمج، فإن مخطط المنحدرين هو بيان المشكلة.

Quick checkاختبار سريع

A 175 B parameter model is stored in INT8. What is its weight memory?نموذج من 175 B معامل مخزّن بصيغة INT8. ما ذاكرة أوزانه؟

Quick checkاختبار سريع

Why can 16 GB of GPU memory be drawn as 8 B parameters?لماذا يمكن رسم 16 GB من ذاكرة GPU على أنها 8 B معامل؟

Recall

What is the FP16 weight memory of MT-NLG, and how many A100 80 GB GPUs does it need for weights alone?ما ذاكرة أوزان MT-NLG بصيغة FP16، وكم وحدة A100 80 GB يحتاج للأوزان وحدها؟

530 B × 2 bytes = 1,060 GB; 1,060 / 80 = 13.25, so 14 GPUs before activations or the KV cache.
530 B × 2 bytes = 1,060 GB؛ 1,060 / 80 = 13.25، إذن 14 وحدة GPU قبل التنشيطات أو الـ KV cache.

Recall

How many FP16 parameters fit in 16 GB, and how much did model size and GPU memory grow over the chart?كم معاملًا بصيغة FP16 يتسع في 16 GB، وبكم نما حجم النماذج وذاكرة GPU عبر المخطط؟

8 B parameters. Model size grew about 10,000x and GPU memory about 5x.
8 B معامل. نما حجم النماذج نحو 10,000x وذاكرة الـ GPU نحو 5x.

Recall

Give the three reasons on slide 16 for running LLMs at the edge.اذكر الأسباب الثلاثة في الشريحة 16 لتشغيل نماذج LLM على الحافة.

Local copilot services on laptops, cars and robots; resource-constrained low-power devices that are not always connected; privacy of personal data that should not be uploaded.
خدمات مساعدة محلية على الحواسيب المحمولة والسيارات والروبوتات؛ وأجهزة محدودة الموارد منخفضة الطاقة ليست متصلة دائمًا؛ وخصوصية البيانات الشخصية التي لا ينبغي رفعها.

Recapالخلاصة

If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا

  • SAM is an image encoder that runs once per image and dominates the cost, plus a prompt encoder and a lightweight mask decoder that together run in about 50 ms on a CPU.يتكون SAM من مُرمِّز صور (image encoder) يعمل مرة واحدة لكل صورة ويهيمن على التكلفة، إضافة إلى مُرمِّز للتلميحات (prompt encoder) ومفكِّك أقنعة خفيف (mask decoder) يعملان معًا في نحو 50 ms على CPU.
  • EfficientViT-SAM replaces only the image encoder: 538 versus 11 img/s (48.9x) at 46.6 versus 46.5 zero-shot COCO mAP.يستبدل EfficientViT-SAM مُرمِّز الصور وحده: 538 مقابل 11 img/s (48.9x) عند 46.6 مقابل 46.5 في zero-shot COCO mAP.
  • Training Stable Diffusion took 256 A100s for 150k GPU-hours, about 24 days and about $600,000, so about $4 per GPU-hour.استغرق تدريب Stable Diffusion عدد 256 وحدة A100 لمدة 150k GPU-hours، أي نحو 24 يومًا وبتكلفة نحو $600,000، أي قرابة $4 لكل GPU-hour.
  • Compute follows tokens times steps: CogVideoX with 5.6 B parameters needs 332 T MACs per step, 8.9x FLUX.1's 37.2 T with 12 B parameters.الحوسبة تتبع عدد الـ tokens مضروبًا في عدد الخطوات: يحتاج CogVideoX بمعاملاته البالغة 5.6 B إلى 332 T MACs لكل خطوة، أي 8.9x من 37.2 T التي يحتاجها FLUX.1 بمعاملاته البالغة 12 B.
  • FLUX.1 MACs grow about 52x from 1024 to 4096 while pixels grow 16x, because attention is quadratic in token count.تنمو MACs في FLUX.1 بنحو 52x من 1024 إلى 4096 بينما تنمو البكسلات 16x، لأن الـ attention تربيعي في عدد الـ tokens.
  • DistriFusion on 4 GPUs: 227 T MACs per device (4.0x less), 4.16 s (3.0x faster), no duplicated subjects. Naive patches are 3.9x faster but fragment the image.DistriFusion على 4 وحدات GPU: 227 T MACs لكل جهاز (أقل بـ 4.0x)، و4.16 s (أسرع بـ 3.0x)، ودون تكرار للعناصر. الرقع البسيطة أسرع بـ 3.9x لكنها تفتت الصورة.
  • Fast-LiDARNet: kernel optimisation 3.6x, model redesign 2.6x, 5 to 47 fps against a 30 fps (33.3 ms) budget.Fast-LiDARNet: تحسين النوى (kernels) يعطي 3.6x، وإعادة تصميم النموذج 2.6x، من 5 إلى 47 fps مقابل ميزانية 30 fps (33.3 ms).
  • Model size grew about 10,000x in four years while GPU memory grew about 5x; 530 B FP16 parameters are 1,060 GB, or 14 A100 80 GB GPUs for weights alone.نما حجم النماذج نحو 10,000x في أربع سنوات بينما نمت ذاكرة GPU نحو 5x؛ و530 B معامل بصيغة FP16 تساوي 1,060 GB، أي 14 وحدة A100 80 GB للأوزان وحدها.
  • Edge LLMs exist for local copilots on laptops, cars and robots, for low-power devices that are not always connected, and for privacy.توجد نماذج LLM على الحافة من أجل مساعدات (copilots) محلية على الحواسيب المحمولة والسيارات والروبوتات، ومن أجل أجهزة منخفضة الطاقة ليست متصلة دائمًا، ومن أجل الخصوصية.

Sourcesالمصادر

Part 03: Cloud and edge AI hardware, and the gap between themعتاد الذكاء الاصطناعي في السحابة وعلى الحافة، والفجوة بينهما

How NVIDIA data center GPUs, mobile NPUs, Jetson modules and microcontrollers compare in performance, power and memory, and why the orders-of-magnitude gap from cloud to tiny devices demands efficient models.كيف تُقارَن وحدات NVIDIA GPU في مراكز البيانات ووحدات NPU في الهواتف ووحدات Jetson والمتحكمات الدقيقة من حيث الأداء والطاقة والذاكرة، ولماذا تتطلب الفجوة التي تبلغ عدة رتب عشرية بين السحابة والأجهزة الصغيرة جدًا نماذج كفؤة.

4 concepts4 مفاهيم, ، slides 17-24الشرائح 17-24

Why this part mattersلماذا يهمّ هذا الجزء

Part 02 measured demand: models grew from 0.05B to 530B parameters and diffusion cost rises faster than the square of resolution. This part measures supply. What can a cloud GPU, a phone, a robot module and a microcontroller actually hold and compute, and how far apart are they?

The answer is a set of numbers you will use twice. In the exam, they appear as short computations: TOPS per watt for a given GPU, or the ratio between two memory tiers. In your research project, they are the sizing step that comes before any model is designed: the target tier fixes the memory and power budget, and the budget decides which of the techniques in the rest of this course you will need. By the end of the part the phrase "six orders of magnitude" should feel concrete rather than rhetorical.

قاس الجزء 02 الطلب: نمت النماذج من 0.05B إلى 530B معامل، وتكلفة نماذج الانتشار (diffusion) ترتفع أسرع من مربع الدقة (resolution). أما هذا الجزء فيقيس العرض. ما الذي تستطيع وحدة GPU سحابية، وهاتف، ووحدة روبوت، ومتحكم دقيق أن تحمله وتحسبه فعلا، وما حجم المسافة بينها؟

الجواب مجموعة من الأرقام ستستخدمها مرتين. في الامتحان تظهر كحسابات قصيرة: TOPS لكل واط لوحدة GPU معيّنة، أو النسبة بين مستويين من الذاكرة. وفي مشروعك البحثي هي خطوة التحجيم التي تسبق تصميم أي نموذج: المستوى المستهدف يحدد ميزانية الذاكرة والقدرة، والميزانية تقرر أي التقنيات في بقية هذا المقرر ستحتاج إليها. وفي نهاية هذا الجزء يجب أن تبدو لك عبارة «ست مراتب عشرية» (six orders of magnitude) شيئا ملموسا لا مجرد بلاغة.

By the end you canفي نهاية هذا الجزء ستستطيع

  1. Read a GPU spec sheet: define TOPS (dense versus sparse), memory bandwidth and TDP, and compute TOPS per watt for any of the five NVIDIA generations.اقرأ ورقة مواصفات GPU: عرّف TOPS (الكثيفة مقابل المتفرقة)، وعرض نطاق الذاكرة، وTDP، واحسب TOPS لكل واط لأي جيل من أجيال NVIDIA الخمسة.
  2. Explain the memory wall: why 94x more compute on 2.8x more power and 12x more memory makes data movement, not arithmetic, the bottleneck.اشرح جدار الذاكرة: لماذا يجعل نمو الحوسبة 94 ضعفا مقابل 2.8 ضعف فقط في القدرة و12 ضعفا في الذاكرة نقلَ البيانات، لا العمليات الحسابية، هو عنق الزجاجة.
  3. Contrast edge accelerator families: a fixed power envelope (Snapdragon, Apple) versus a power ladder (Jetson), and say why TOPS across vendors are not comparable.قارن بين عائلات المسرّعات الطرفية: غلاف قدرة ثابت (Snapdragon وApple) مقابل سلّم من مستويات القدرة (Jetson)، ووضّح لماذا لا يمكن مقارنة أرقام TOPS بين الشركات المختلفة.
  4. Describe a microcontroller, read DMIPS correctly, and state the 320 kB and 1 MB budgets of the STM32F746.صِف المتحكم الدقيق، واقرأ DMIPS قراءة صحيحة، واذكر ميزانيتي 320 kB و1 MB في STM32F746.
  5. Compute the cloud, mobile and tiny AI ratios, separate activation memory from weight storage, and decide whether a given model fits each tier.احسب النسب بين مستويات cloud AI وmobile AI وtiny AI، وافصل ذاكرة التنشيطات عن تخزين الأوزان، وقرّر هل يتسع نموذج معيّن في كل مستوى.

A single NVIDIA A100 from 2020 performs 312 trillion dense FP16 operations per second and draws 400 W. Four years earlier the P100 managed 18.7 trillion at 250 W. That is a 17x jump in throughput. How much of it came from simply burning more power? Only 1.6x (400 / 250). The other 10x came from architecture: Tensor Cores, faster HBM2e and a 7 nm process node. That single observation is the whole story of the cloud tier, and the rest of this concept just extends it across five generations.

تنفذ وحدة NVIDIA A100 واحدة من عام 2020 عدد 312 تريليون عملية FP16 كثيفة في الثانية، وتستهلك 400 W. وقبل ذلك بأربع سنوات كانت P100 تنجز 18.7 تريليون عند 250 W. هذه قفزة بمقدار 17x في معدل الإنجاز. فكم منها جاء من مجرد حرق قدرة أكبر؟ 1.6x فقط (400 / 250). أما الـ 10x الباقية فجاءت من المعمارية: نوى Tensor Cores، وذاكرة HBM2e أسرع، وعقدة تصنيع 7 nm. هذه الملاحظة الواحدة هي القصة الكاملة للمستوى السحابي، وبقية هذا المفهوم تمدّها فقط عبر خمسة أجيال.

Slide 17 repeats the three pillars from part 01 to mark the pivot: algorithm and data were the first two, and now we ask whether the third, hardware, can absorb the demand growth by itself. Slide 18 answers with four charts for the NVIDIA data center GPU line: P100, V100, A100, H100 and B100: the P100 as a PCIe card (as the errata below explains) and V100 to B100 in the SXM mezzanine form factor used in HGX and DGX servers, which allows a higher power budget than a PCIe card. The four series are performance, memory bandwidth, power and memory capacity, and the lesson lives in how differently they grow.

تعيد الشريحة 17 عرض الركائز الثلاث (three pillars) من الجزء 01 لتعلن نقطة التحول: الخوارزمية والبيانات كانتا الركيزتين الأوليين، والآن نسأل هل تستطيع الثالثة، أي العتاد، أن تستوعب نمو الطلب وحدها. وتجيب الشريحة 18 بأربعة مخططات لخط وحدات data center GPU من NVIDIA: P100 وV100 وA100 وH100 وB100. تظهر P100 كبطاقة PCIe (كما توضح التصويبات أدناه)، ومن V100 إلى B100 بعامل الشكل SXM (بطاقة mezzanine) المستخدم في خوادم HGX وDGX، وهو يسمح بميزانية قدرة (power budget) أعلى من بطاقة PCIe. السلاسل الأربع هي الأداء، وعرض نطاق الذاكرة، والقدرة، وسعة الذاكرة، والدرس يكمن في مدى اختلاف نموها.

Reading the vertical axis: what a TOPS isقراءة المحور الرأسي: ما هي TOPS

TOPS stands for trillions of operations per second. The unit hides two conventions you must know. First, one multiply-accumulate counts as two operations (one multiply, one add), so the MAC counts from part 01 convert with a factor of two. Second, NVIDIA quotes Tensor Core throughput at a specific precision, here FP16, and its spec sheets list two numbers: a dense figure and a figure "with sparsity" that is exactly double. The doubled number applies only when the weights have been pruned to a 2:4 structured pattern (two of every four values zero). The slide uses the dense figures, and so should you when comparing chips. The A100 page reads 312 TFLOPS dense and 624 TFLOPS with sparsity; the H100 SXM lists 1,979 sparse, which is 989 dense, rounded to 990 on the slide (NVIDIA A100 and H100 pages).

TOPS اختصار لتريليونات العمليات في الثانية. وهذه الوحدة تخفي اصطلاحين يجب أن تعرفهما. الأول: عملية ضرب وتجميع واحدة (multiply-accumulate) تُحسب عمليتين (ضرب وجمع)، لذلك تتحول أعداد MAC من الجزء 01 بمعامل اثنين. الثاني: تذكر NVIDIA معدل إنجاز Tensor Core عند دقة عددية (precision) محددة، وهي هنا FP16، وتضع أوراق مواصفاتها رقمين: رقما كثيفا (dense) ورقما «مع التفرق» (with sparsity) يساوي ضعفه تماما. الرقم المضاعف لا ينطبق إلا عندما تُقلَّم الأوزان إلى نمط منظم 2:4 (اثنتان من كل أربع قيم تساوي صفرا). تستخدم الشريحة الأرقام الكثيفة، وكذلك يجب أن تفعل عند مقارنة الشرائح. صفحة A100 تذكر 312 TFLOPS كثيفة و624 TFLOPS مع التفرق، وصفحة H100 SXM تذكر 1,979 مع التفرق، أي 989 كثيفة، مقربة إلى 990 في الشريحة (صفحتا NVIDIA لـ A100 وH100).

TOPS=2×MACs per second1012\text{TOPS} = \frac{2 \times \text{MACs per second}}{10^{12}}
One MAC is a multiply plus an add, so two operationsعملية MAC واحدة هي ضرب وجمع، أي عمليتان
TOPS/W=peak TOPSboard power (W)\text{TOPS/W} = \frac{\text{peak TOPS}}{\text{board power (W)}}
Efficiency, not speedالكفاءة، لا السرعة

Five generations, four very different slopesخمسة أجيال، وأربعة منحدرات مختلفة جدا

PartالوحدةDense FP16 TOPSTOPS بدقة FP16 الكثيفةBandwidth GB/sعرض النطاق GB/sPower Wالقدرة WMemory GBالذاكرة GBTOPS/WTOPS/W
P100 (2016), PCIeP100 (2016), PCIe18.718.773273225025016160.0750.075
V100 SXM (2017)V100 SXM (2017)12512590090030030032320.420.42
A100 SXM (2020)A100 SXM (2020)3123122,0392,03940040080800.780.78
H100 SXM (2022)H100 SXM (2022)9909903,4303,43070070096961.411.41
B100 SXM (2024)B100 SXM (2024)1,7501,7508,1928,1927007001921922.52.5
Five NVIDIA data center GPUs (slide 18 values, TOPS per watt computed)خمس وحدات GPU لمراكز البيانات من NVIDIA (قيم الشريحة 18، وTOPS لكل واط محسوبة)
TOPS bars climb a log scale by 94x while the watt bars beside them rise only 2.8x on a linear scaleأعمدة TOPS تصعد على مقياس لوغاريتمي بمقدار 94 ضعفا، بينما ترتفع أعمدة الواط بجوارها 2.8 ضعف فقط على مقياس خطي

Growth from P100 (2016) to B100 (2024)النمو من P100 (2016) إلى B100 (2024)

Performance, dense FP16الأداء، FP16 الكثيف
18.7 to 1,750 TOPS, about 94xمن 18.7 إلى 1,750 TOPS، نحو 94x
Board powerقدرة البطاقة
250 to 700 W, 2.8xمن 250 إلى 700 W، 2.8x
Memory capacityسعة الذاكرة
16 to 192 GB, 12xمن 16 إلى 192 GB، 12x
Memory bandwidthعرض نطاق الذاكرة
732 to 8,192 GB/s, about 11xمن 732 إلى 8,192 GB/s، نحو 11x
TOPS per wattTOPS لكل واط
0.075 to 2.5, about 33xمن 0.075 إلى 2.5، نحو 33x

Read the table as a race between four quantities. Compute ran 94x. Efficiency ran 33x, which is why compute could run so far on so little extra power. Capacity and bandwidth ran only about 12x. So every generation, the arithmetic units can chew through data faster than the memory can deliver it, by a margin that widens each time.

اقرأ الجدول كسباق بين أربع كميات. الحوسبة قطعت 94x. والكفاءة قطعت 33x، ولهذا استطاعت الحوسبة أن تذهب بعيدا بهذه الزيادة الضئيلة في القدرة. أما السعة وعرض النطاق فلم يقطعا إلا نحو 12x. لذلك في كل جيل تستطيع وحدات الحساب أن تلتهم البيانات أسرع مما تستطيع الذاكرة إيصالها، وبهامش يتسع في كل مرة.

Two-decade growth rates of the three resources (Gholami et al., 2024)معدلات نمو الموارد الثلاثة على مدى عقدين (Gholami et al., 2024)

Peak server FLOPSذروة FLOPS للخوادم
3.0x every two years3.0x كل سنتين
DRAM bandwidthعرض نطاق DRAM
1.6x every two years1.6x كل سنتين
Interconnect bandwidthعرض نطاق الربط البيني
1.4x every two years1.4x كل سنتين

Gholami and colleagues measured those three rates over two decades of FLOPS, DRAM bandwidth and interconnect bandwidth, and they conclude that memory, not compute, is now the primary bottleneck for AI serving (Gholami et al., 2024). They call it the memory wall.

قاس Gholami وزملاؤه هذه المعدلات الثلاثة على مدى عقدين لكل من FLOPS وعرض نطاق DRAM وعرض نطاق الربط البيني (interconnect)، واستنتجوا أن الذاكرة، لا الحوسبة، أصبحت الآن عنق الزجاجة الأساسي في خدمة نماذج الذكاء الاصطناعي (Gholami et al., 2024). ويسمّون ذلك جدار الذاكرة (memory wall).

Why bandwidth matters: the memory wallلماذا يهم عرض النطاق: جدار الذاكرة

Every inference streams weights and activations from the GPU's high-bandwidth memory (HBM) into the compute units. Memory bandwidth is the rate of that stream. If the chip can do 990 trillion operations per second but fetch only 3.35 trillion bytes per second, then it must perform about 295 operations on every byte it fetches to stay busy. A layer that does less arithmetic per byte than that sits idle, waiting for memory. The threshold is called the arithmetic intensity a workload needs to be compute bound.

كل عملية استدلال (inference) تنقل الأوزان والتنشيطات كتيار من الذاكرة عالية عرض النطاق (high-bandwidth memory، أي HBM) في الـ GPU إلى وحدات الحساب. وعرض نطاق الذاكرة (memory bandwidth) هو معدل هذا التيار. إذا كانت الشريحة قادرة على 990 تريليون عملية في الثانية لكنها لا تجلب إلا 3.35 تريليون بايت في الثانية، فعليها أن تنفذ نحو 295 عملية على كل بايت تجلبه حتى تبقى مشغولة. والطبقة التي تنفذ حسابا أقل من ذلك لكل بايت تبقى خاملة تنتظر الذاكرة. هذه العتبة تسمى الكثافة الحسابية (arithmetic intensity) التي يحتاجها عبء العمل ليكون محدودا بالحوسبة (compute bound).

Worked exampleمثال محلول

Compute versus bandwidth on an H100الحوسبة مقابل عرض النطاق على H100

  1. Operations available per secondالعمليات المتاحة في الثانية

    990 × 10^12 dense FP16 operations per second (NVIDIA H100 page, dense half of 1,979).
    990 × 10^12 عملية FP16 كثيفة في الثانية (صفحة NVIDIA H100، النصف الكثيف من 1,979).
  2. Bytes available per secondالبايتات المتاحة في الثانية

    3.35 × 10^12 bytes per second from HBM3 (NVIDIA's figure for the 80 GB part; the slide plots 3,430).
    3.35 × 10^12 بايت في الثانية من HBM3 (رقم NVIDIA لنسخة 80 GB، بينما ترسم الشريحة 3,430).
  3. Break-even intensityكثافة التعادل

    990 / 3.35 ≈ 295 operations per byte. Below this, memory bounds the chip; above it, compute does.
    990 / 3.35 ≈ 295 عملية لكل بايت. تحت هذه القيمة تحدّ الذاكرة أداء الشريحة، وفوقها تحدّه الحوسبة.
  4. Compare with LLM decodingقارن مع فك ترميز LLM

    Generating one token of an LLM touches every weight once. Each FP16 weight is 2 bytes and does one MAC, so about 2 operations per 2 bytes, roughly 1 operation per byte at batch size one.
    توليد رمز (token) واحد من LLM يلمس كل وزن مرة واحدة. كل وزن FP16 يشغل 2 بايت وينفذ عملية MAC واحدة، أي نحو 2 عملية لكل 2 بايت، أي تقريبا 1 عملية لكل بايت عند حجم دفعة (batch size) يساوي واحدا.
  5. Resultالنتيجة

    About 1 operation per byte against a 295 threshold. Single-stream decoding uses well under one percent of the H100's arithmetic; bandwidth sets the token rate. This is a simplified roofline argument that ignores caches and batching, but the conclusion holds for serving.
    نحو 1 عملية لكل بايت مقابل عتبة 295. فك الترميز لتيار واحد يستخدم أقل بكثير من واحد بالمئة من قدرة الحساب في H100، وعرض النطاق هو ما يحدد معدل توليد الرموز. هذه حجة roofline مبسطة تتجاهل الذاكرات المخبئية (caches) والتجميع في دفعات (batching)، لكن الاستنتاج يبقى صحيحا في الخدمة (serving).

Tie back to the LLM curve: capacity, not TOPS, sets the minimum machineالعودة إلى منحنى LLM: السعة، لا TOPS، هي التي تحدد أصغر آلة ممكنة

Part 02 ended with model size outrunning GPU memory. Put the two lines together. Megatron-Turing NLG has 530 billion parameters (Smith et al., 2022). GPU memory grew 12x over the eight years from 2016 to 2024; in roughly half that time, from the Transformer of 2017 to MT-NLG in 2021, LLM size grew from 0.05B to 530B, about 10,000x. The hardware pillar cannot close that by itself.

انتهى الجزء 02 بأن حجم النموذج (model size) تجاوز ذاكرة الـ GPU. ضع الخطين معا. يملك Megatron-Turing NLG عدد 530 مليار معامل (Smith et al., 2022). نمت ذاكرة الـ GPU بمقدار 12x خلال ثماني سنوات من 2016 إلى 2024، بينما في نحو نصف هذه المدة، من Transformer عام 2017 إلى MT-NLG عام 2021، نما حجم نماذج LLM من 0.05B إلى 530B، أي نحو 10,000x. ركيزة العتاد لا تستطيع سد هذه الفجوة وحدها.

Worked exampleمثال محلول

How many GPUs hold MT-NLG's weightsكم وحدة GPU تلزم لحمل أوزان MT-NLG

  1. Bytes of weights at FP16بايتات الأوزان بدقة FP16

    530 × 10^9 parameters × 2 bytes = 1.06 × 10^12 bytes = 1.06 TB.
    530 × 10^9 معامل × 2 بايت = 1.06 × 10^12 بايت = 1.06 TB.
  2. A100 80 GB cardsبطاقات A100 بسعة 80 GB

    1.06 TB / 80 GB = 13.25, so 14 cards before a single activation is stored.
    1.06 TB / 80 GB = 13.25، إذن 14 بطاقة قبل تخزين أي تنشيط واحد.
  3. B100 192 GB cardsبطاقات B100 بسعة 192 GB

    1.06 TB / 192 GB = 5.5, so 6 cards. Four years of hardware progress cut the count by about 2.4x; the model side must do the rest.
    1.06 TB / 192 GB = 5.5، إذن 6 بطاقات. أربع سنوات من تقدم العتاد خفضت العدد بنحو 2.4x، وعلى جانب النموذج أن يتكفل بالباقي.
  4. Resultالنتيجة

    Memory capacity, not TOPS, decides the smallest machine that can even load the model.
    سعة الذاكرة، لا TOPS، هي التي تقرر أصغر آلة تستطيع حتى تحميل النموذج.

Recall

Compute TOPS per watt for the A100 and the B100 from the slide values. How much did efficiency improve?احسب TOPS لكل واط لكل من A100 وB100 من قيم الشريحة. بكم تحسنت الكفاءة؟

A100: 312 / 400 = 0.78 TOPS/W. B100: 1,750 / 700 = 2.5 TOPS/W. About 3.2x better efficiency in four years.
A100: 312 / 400 = 0.78 TOPS/W. B100: 1,750 / 700 = 2.5 TOPS/W. أي كفاءة أفضل بنحو 3.2x في أربع سنوات.

Recall

Performance grew 94x from P100 to B100. By how much did power and memory grow, and what does that imply?نما الأداء 94 ضعفا من P100 إلى B100. بكم نمت القدرة والذاكرة، وماذا يعني ذلك؟

Power 2.8x (250 to 700 W) and memory 12x (16 to 192 GB). Compute outran both, so the cost of moving data to the compute units (the memory wall) becomes the limit, especially for memory-bound work such as LLM decoding.
القدرة 2.8x (من 250 إلى 700 W) والذاكرة 12x (من 16 إلى 192 GB). سبقت الحوسبة كليهما، لذلك تصبح تكلفة نقل البيانات إلى وحدات الحساب (جدار الذاكرة) هي الحد، خصوصا في الأعمال المحدودة بالذاكرة مثل فك ترميز LLM.

Quick checkاختبار سريع

From P100 (2016) to B100 (2024), dense FP16 performance grew about 94x. By roughly how much did board power grow?من P100 (2016) إلى B100 (2024) نما أداء FP16 الكثيف نحو 94x. بكم نمت قدرة البطاقة تقريبا؟

Quick checkاختبار سريع

An H100 is rated 990 dense FP16 TOPS, but single-stream LLM token decoding runs far below that. What is the most likely limiter?تُصنَّف H100 عند 990 TOPS بدقة FP16 الكثيفة، لكن فك ترميز رموز LLM لتيار واحد يعمل بأقل من ذلك بكثير. ما العامل المقيِّد الأرجح؟

Quick checkاختبار سريع

What does the word dense mean in NVIDIA's dense FP16 TOPS figure?ماذا تعني كلمة dense (كثيف) في رقم NVIDIA لأداء FP16 الكثيف بوحدة TOPS؟

The Snapdragon 845 of 2018 delivered 3 TOPS at about 9 W. The Snapdragon 8 Gen 1 of 2022 delivers 52 TOPS at about 10 W. Seventeen times the performance, essentially no extra power. Why is the power line flat when the cloud line climbed to 700 W? Because a phone is a sealed slab held against skin with no fan. Its sustained power is capped by heat, not by engineering ambition, so every gain must come from efficiency. That is the rule for the whole edge tier: the power envelope is the constraint, and performance per watt is the design metric.

قدمت Snapdragon 845 عام 2018 قدرة 3 TOPS عند نحو 9 W. وتقدم Snapdragon 8 Gen 1 عام 2022 قدرة 52 TOPS عند نحو 10 W. سبعة عشر ضعفا من الأداء، بلا قدرة إضافية تقريبا. لماذا خط القدرة مسطح بينما صعد الخط السحابي إلى 700 W؟ لأن الهاتف لوح مغلق يُمسك باليد ملاصقا للجلد ولا مروحة فيه. قدرته المستدامة محدودة بالحرارة، لا بطموح المهندسين، لذلك يجب أن يأتي كل تحسن من الكفاءة. هذه هي قاعدة مستوى الأجهزة الطرفية (edge) كله: غلاف القدرة (power envelope) هو القيد، والأداء لكل واط (performance per watt) هو مقياس التصميم.

Slides 19 to 21 show three families that each obey this rule in their own way. The Qualcomm Hexagon DSP and the Apple Neural Engine live inside phones and share a lid near 10 W. NVIDIA Jetson modules live in robots and industrial boxes that have a fan and a battery budget, so their power is allowed to climb with each tier. Explore all three, and the cloud and microcontroller tiers, before reading on.

تعرض الشرائح من 19 إلى 21 ثلاث عائلات تلتزم كل منها بهذه القاعدة بطريقتها. معالج Hexagon DSP من Qualcomm وApple Neural Engine يعيشان داخل الهواتف ويشتركان في سقف قريب من 10 W. أما وحدات Jetson من NVIDIA فتعيش في الروبوتات وصناديق الأنظمة الصناعية التي فيها مروحة وميزانية بطارية، لذلك يُسمح لقدرتها أن ترتفع مع كل مستوى. استكشف العائلات الثلاث، ومعها المستوى السحابي ومستوى المتحكمات الدقيقة، قبل أن تكمل القراءة.

SimulatorمحاكيDevice picker: performance, power and memory by tierمنتقي الأجهزة: الأداء والقدرة والذاكرة حسب الفئة

NVIDIA data center, dense FP16 TOPS (slide 18)مراكز بيانات NVIDIA، قيم TOPS بدقة FP16 الكثيفة (dense) (الشريحة 18)

PerformanceالأداءTOPS
18.71253129901,750
PowerالقدرةW
250300400700700
MemoryالذاكرةGB
16328096192
Performance18.7TOPS
Powerالقدرة250W
Memory16GB
Efficiencyالكفاءة0.075TOPS/Wperformance divided by powerالأداء مقسومًا على القدرة
First to last in this familyمن الأول إلى الأخير في هذه العائلة
Performanceالأداء 93.6xPowerالقدرة 2.8xMemoryالذاكرة 12xEfficiencyالكفاءة 33.4x

Values are the slide figures. Compare within one family only: cloud numbers are dense FP16, Jetson Xavier and Orin are INT8 (Orin sparse) while Nano and TX2 are FP16 FLOPS, Qualcomm sums INT8 across CPU, GPU and Hexagon, Apple states no precision, and MCUs are rated in integer DMIPS, which is not an operations-per-second figure at all.القيم هي أرقام الشرائح. قارن داخل العائلة الواحدة فقط: أرقام السحابة بدقة FP16 الكثيفة، وJetson Xavier وOrin بدقة INT8 (وOrin متناثرة) بينما Nano وTX2 بوحدة FP16 FLOPS، وQualcomm تجمع INT8 عبر CPU وGPU وHexagon، وApple لا تذكر الدقة العددية، أما المتحكمات الدقيقة فتقاس بـ DMIPS الصحيحة، وهي ليست رقمًا لعدد العمليات في الثانية أصلًا.

Qualcomm Hexagon: seventeen times the work under the same lidQualcomm Hexagon: سبعة عشر ضعفا من العمل تحت السقف نفسه

Hexagon began as a digital signal processor for audio and camera pipelines. Qualcomm turned it into what its Snapdragon 888 brief calls a "fused AI-accelerator architecture": a tensor accelerator, vector extensions and a scalar unit sharing memory, supporting INT8, INT16 and FP16. The brief claims 26 TOPS for the whole AI Engine and "up to 3 times performance per watt improvement" over the 865; the 8 Gen 1 brief claims "up to 4x faster" and "best performance-per-watt in Snapdragon history" (Qualcomm product briefs). Notice the vendor language: every headline is a ratio to power. The products on the slide are the Qualcomm Robotics RB5 platform (865 class, 15 TOPS), the Galaxy Tab with the 888+ and the Galaxy Z Fold with the 8+ Gen 1.

بدأ Hexagon كمعالج إشارات رقمية لمسارات معالجة الصوت والكاميرا. ثم حولته Qualcomm إلى ما يسميه ملخص منتج Snapdragon 888 «معمارية مسرّع ذكاء اصطناعي مدمجة» (fused AI-accelerator architecture): مسرّع موترات (tensor accelerator)، وامتدادات متجهية (vector)، ووحدة قياسية (scalar) تتشارك الذاكرة، مع دعم INT8 وINT16 وFP16. يدّعي الملخص 26 TOPS لمحرك الذكاء الاصطناعي (AI Engine) كاملا و«تحسنا يصل إلى 3 أضعاف في الأداء لكل واط» مقارنة بـ 865، ويدّعي ملخص 8 Gen 1 أنه «أسرع بما يصل إلى 4 أضعاف» وأنه يقدم «أفضل أداء لكل واط في تاريخ Snapdragon» (ملخصات منتجات Qualcomm). لاحظ لغة الشركة: كل عنوان رئيسي هو نسبة إلى القدرة. المنتجات في الشريحة هي منصة Qualcomm Robotics RB5 (من فئة 865، 15 TOPS)، وجهاز Galaxy Tab بمعالج 888+، وجهاز Galaxy Z Fold بمعالج 8+ Gen 1.

PartالشريحةTOPSTOPSPower Wالقدرة WMemory GBالذاكرة GBTOPS/WTOPS/W
Snapdragon 845Snapdragon 8453399440.330.33
Snapdragon 855Snapdragon 855771010880.700.70
Snapdragon 865Snapdragon 8651515101012121.51.5
Snapdragon 888Snapdragon 8882626101016162.62.6
Snapdragon 8 Gen 1Snapdragon 8 Gen 15252101016165.25.2
Snapdragon Hexagon (slide 19 values, TOPS per watt computed)معالج Hexagon في Snapdragon (قيم الشريحة 19، وTOPS لكل واط محسوبة)
Five Hexagon generations grow 17x in TOPS while a thermal lid at about 10 W never movesخمسة أجيال من Hexagon تنمو 17 ضعفا في TOPS بينما سقف حراري عند نحو 10 W لا يتحرك أبدا

Worked exampleمثال محلول

Why the phone line is flatلماذا خط الهاتف مسطح

  1. Thermal budgetالميزانية الحرارية

    A fanless phone can sustain roughly 10 W before the case gets too hot to hold, so that number is fixed by physics, not by the chip roadmap.
    الهاتف بلا مروحة يستطيع أن يحافظ على نحو 10 W قبل أن يسخن غلافه بحيث لا يمكن الإمساك به، لذلك هذا الرقم تحدده الفيزياء، لا خارطة طريق الشرائح.
  2. Efficiency of the endpointsكفاءة الطرفين

    Snapdragon 845: 3 / 9 = 0.33 TOPS/W. Snapdragon 8 Gen 1: 52 / 10 = 5.2 TOPS/W.
    Snapdragon 845: 3 / 9 = 0.33 TOPS/W. Snapdragon 8 Gen 1: 52 / 10 = 5.2 TOPS/W.
  3. Ratioالنسبة

    5.2 / 0.33 ≈ 16x efficiency, which is 17x performance divided by 1.1x power.
    5.2 / 0.33 ≈ 16x في الكفاءة، وهي 17x في الأداء مقسومة على 1.1x في القدرة.
  4. Resultالنتيجة

    All of the gain is efficiency. Under a fixed lid, TOPS per watt is the only lever.
    كل التحسن جاء من الكفاءة. تحت سقف ثابت، TOPS لكل واط هي الرافعة الوحيدة.

Apple Neural Engine: the same lesson from a different vendorApple Neural Engine: الدرس نفسه من شركة مختلفة

Apple describes the Neural Engine as an energy-efficient, high-throughput engine for ML inference on its own silicon. Its newsroom gives the per-generation numbers the slide plots: 600 billion operations per second for the A11 in 2017, 5 trillion for the A12, 11 trillion for the 16-core A14, 15.8 trillion for the A15 and "nearly 17 trillion" for the A16 (Apple Newsroom). The A17 Pro's 35 TOPS comes from Apple's 2023 event rather than the newsroom text, which only says "up to 2x faster". The products on the slide span an iPhone (A14), an iPad (A15) and an iMac with the M1 Max, the same engine design scaled up.

تصف Apple المحرك العصبي (Neural Engine) بأنه محرك موفر للطاقة وعالي الإنجاز للاستدلال (inference) في تعلم الآلة على شرائحها الخاصة. ويعطي مركزها الإخباري أرقام كل جيل التي ترسمها الشريحة: 600 مليار عملية في الثانية لـ A11 عام 2017، و5 تريليونات لـ A12، و11 تريليونا لـ A14 ذات النوى الـ 16، و15.8 تريليون لـ A15، و«قرابة 17 تريليونا» لـ A16 (Apple Newsroom). أما رقم 35 TOPS لـ A17 Pro فمصدره حدث Apple عام 2023 لا نص المركز الإخباري، الذي يقول فقط «أسرع بما يصل إلى الضعفين». والمنتجات في الشريحة تشمل iPhone (A14) وiPad (A15) وiMac بشريحة M1 Max، أي تصميم المحرك نفسه بعد تكبيره.

ChipالشريحةTOPSTOPSPower Wالقدرة WMemory GBالذاكرة GBTOPS/WTOPS/W
A11 (2017)A11 (2017)0.60.688330.0750.075
A12 (2018)A12 (2018)5566440.830.83
A13 (2019)A13 (2019)6666441.01.0
A14 (2020)A14 (2020)111166661.831.83
A15 (2021)A15 (2021)15.815.866662.632.63
A16 (2022)A16 (2022)171788662.132.13
A17 Pro (2023)A17 Pro (2023)3535not plottedغير مرسومة88not computableلا يمكن حسابها
Apple Neural Engine (slide 20 values, TOPS per watt computed)محرك Apple Neural Engine (قيم الشريحة 20، وTOPS لكل واط محسوبة)

From A11 to A17 the engine gained about 58x in throughput while the estimated power sat between 6 and 8 W. Two vendors, two architectures, one shape: a rising performance line under a flat power line.

من A11 إلى A17 كسب المحرك نحو 58x في معدل الإنجاز (throughput) بينما بقيت القدرة المقدرة بين 6 و8 W. شركتان، ومعماريتان، وشكل واحد: خط أداء صاعد تحت خط قدرة مسطح.

NVIDIA Jetson: a ladder instead of a lidNVIDIA Jetson: سلّم بدلا من سقف

A Jetson is a complete system on module: GPU, CPU, memory, power management and high-speed interfaces on one board that plugs into a carrier. It targets robots, drones and industrial edge boxes, and those have what a phone lacks: a fan and a battery or wall power. So NVIDIA sells a ladder of tiers, each with a configurable power range, and the slide plots the top of each range: Nano at 5 to 10 W, TX2 at 7.5 to 15 W, Xavier NX at 10 to 20 W, AGX Xavier at up to 30 W, AGX Orin 32GB at 15 to 40 W and AGX Orin 64GB at 15 to 60 W (NVIDIA Jetson pages, Connect Tech comparison).

وحدة Jetson هي نظام كامل على وحدة (system on module): GPU وCPU وذاكرة وإدارة للقدرة وواجهات عالية السرعة على لوحة واحدة تُركّب على لوحة حاملة (carrier). وهي تستهدف الروبوتات والطائرات المسيّرة وصناديق الأنظمة الطرفية الصناعية، وهذه تملك ما يفتقده الهاتف: مروحة، وبطارية أو تغذية من مقبس الجدار. لذلك تبيع NVIDIA سلّما من المستويات، لكل منها نطاق قدرة قابل للضبط، وترسم الشريحة أعلى كل نطاق: Nano من 5 إلى 10 W، وTX2 من 7.5 إلى 15 W، وXavier NX من 10 إلى 20 W، وAGX Xavier حتى 30 W، وAGX Orin 32GB من 15 إلى 40 W، وAGX Orin 64GB من 15 إلى 60 W (صفحات NVIDIA Jetson، ومقارنة Connect Tech).

ModuleالوحدةTOPSTOPSPower Wالقدرة WMemory GBالذاكرة GBTOPS/WTOPS/W
NanoNano0.50.51010440.050.05
TX2TX21.31.31515440.0870.087
Xavier NXXavier NX21212020881.051.05
AGX XavierAGX Xavier3232303016161.071.07
AGX Orin 32GBAGX Orin 32GB200200404032325.05.0
AGX Orin 64GBAGX Orin 64GB275275606064644.64.6
NVIDIA Jetson (slide 21 values, TOPS per watt computed)وحدات NVIDIA Jetson (قيم الشريحة 21، وTOPS لكل واط محسوبة)

Here performance grew about 550x (0.5 to 275 TOPS) while power grew 6x, so efficiency still rose about 90x. The difference from the phone families is not the efficiency trend but the freedom to spend more watts when the application can afford them. A warehouse robot on a 60 W budget gets a different chip than a drone on 10 W.

هنا نما الأداء نحو 550x (من 0.5 إلى 275 TOPS) بينما نمت القدرة 6x، لذلك ارتفعت الكفاءة مع ذلك نحو 90x. الفرق عن عائلتي الهواتف ليس في اتجاه الكفاءة، بل في حرية إنفاق واطات أكثر عندما يستطيع التطبيق تحملها. روبوت مستودع بميزانية 60 W يحصل على شريحة مختلفة عن طائرة مسيّرة بميزانية 10 W.

Three families, one lessonثلاث عائلات، ودرس واحد

Snapdragon 845 to 8 Gen 1من Snapdragon 845 إلى 8 Gen 1
17x performance, 1.1x power, fixed lid17x في الأداء، و1.1x في القدرة، وسقف ثابت
Apple A11 to A17من Apple A11 إلى A17
58x performance, about 1x power, fixed lid58x في الأداء، ونحو 1x في القدرة، وسقف ثابت
Jetson Nano to AGX Orin 64GBمن Jetson Nano إلى AGX Orin 64GB
550x performance, 6x power, ladder of tiers550x في الأداء، و6x في القدرة، وسلّم من المستويات

The trap: TOPS from different vendors are not one axisالفخ: أرقام TOPS من شركات مختلفة ليست على محور واحد

It is tempting to line up the A17 Pro at 35, the Snapdragon 888 at 26 and the Jetson AGX Orin at 275 and rank them. Do not. NVIDIA's Xavier and Orin figures are INT8 (Orin sparse INT8), while Nano and TX2 are FP16 FLOPS (NVIDIA Jetson pages). The cloud numbers on slide 18 are dense FP16. Qualcomm sums INT8 throughput across the CPU, GPU and Hexagon together. Apple does not state a precision at all. Sze, Chen, Yang and Emer titled a whole paper on this: "TOPS/W (Alone) Considered Harmful". Their point is that peak numbers say nothing about utilization on a real network; a fair comparison needs the same precision, the same workload and a measured, not theoretical, throughput (Sze et al., 2020).

من المغري أن تصف A17 Pro عند 35، وSnapdragon 888 عند 26، وJetson AGX Orin عند 275 ثم ترتبها. لا تفعل. أرقام Xavier وOrin من NVIDIA هي INT8 (وOrin بدقة INT8 مع التفرق)، بينما رقما Nano وTX2 هما FLOPS بدقة FP16 (صفحات NVIDIA Jetson). والأرقام السحابية في الشريحة 18 هي FP16 كثيفة. وQualcomm تجمع إنجاز INT8 عبر CPU وGPU وHexagon معا. وApple لا تذكر الدقة العددية (precision) أصلا. وقد كتب Sze وChen وYang وEmer ورقة كاملة عن هذا بعنوان «TOPS/W (Alone) Considered Harmful». وفكرتهم أن الأرقام القصوى لا تقول شيئا عن نسبة الاستغلال (utilization) على شبكة حقيقية، وأن المقارنة العادلة تحتاج الدقة نفسها، وعبء العمل نفسه، ومعدل إنجاز مقاسا لا نظريا (Sze et al., 2020).

Recall

The Snapdragon 845 and the 8 Gen 1 both run near 10 W. What changed between them, and by how much?تعمل Snapdragon 845 و8 Gen 1 كلتاهما قرب 10 W. ما الذي تغير بينهما، وبكم؟

TOPS went from 3 to 52, about 17x, and efficiency from 0.33 to 5.2 TOPS/W, about 16x. A fanless phone cannot raise its power ceiling, so the gain had to be efficiency.
ارتفعت TOPS من 3 إلى 52، أي نحو 17x، والكفاءة من 0.33 إلى 5.2 TOPS/W، أي نحو 16x. الهاتف بلا مروحة لا يستطيع رفع سقف قدرته، لذلك كان لا بد أن يأتي التحسن من الكفاءة.

Recall

How does the Jetson family differ from phone chips in the power column, and why?كيف تختلف عائلة Jetson عن شرائح الهواتف في عمود القدرة، ولماذا؟

Power rises with performance, from 10 W (Nano) to 60 W (AGX Orin 64GB), because robots and industrial boxes have fans and a larger battery or wall power. NVIDIA sells a ladder of tiers rather than one thermal envelope.
ترتفع القدرة مع الأداء، من 10 W (Nano) إلى 60 W (AGX Orin 64GB)، لأن الروبوتات والصناديق الصناعية فيها مراوح وبطارية أكبر أو تغذية من الجدار. تبيع NVIDIA سلّما من المستويات بدلا من غلاف حراري واحد.

Recall

Why can you not rank a 35 TOPS Apple A17 Pro against a 26 TOPS Snapdragon 888 from those numbers alone?لماذا لا يمكنك ترتيب Apple A17 Pro بقدرة 35 TOPS مقابل Snapdragon 888 بقدرة 26 TOPS من هذين الرقمين وحدهما؟

TOPS depend on precision (INT8 versus FP16), whether sparsity is counted, which units are summed and the real utilization on a workload. Apple gives no precision, Qualcomm sums CPU, GPU and DSP, and Jetson Orin counts sparse INT8. Sze et al. call TOPS/W alone harmful for exactly this reason.
تعتمد TOPS على الدقة (INT8 مقابل FP16)، وعلى احتساب التفرق أو عدمه، وعلى الوحدات التي جُمعت، وعلى نسبة الاستغلال الفعلية على عبء عمل حقيقي. Apple لا تذكر أي دقة، وQualcomm تجمع CPU وGPU وDSP، وJetson Orin تحسب INT8 مع التفرق. ولهذا السبب بالذات يصف Sze et al. الاعتماد على TOPS/W وحده بأنه ضار.

Quick checkاختبار سريع

Across Snapdragon 845 to 8 Gen 1, performance rose about 17x while power stayed near 10 W. What forced that pattern?عبر أجيال Snapdragon من 845 إلى 8 Gen 1 ارتفع الأداء نحو 17x بينما بقيت القدرة قرب 10 W. ما الذي فرض هذا النمط؟

Quick checkاختبار سريع

Which family on slides 19 to 21 shows power scaling up together with performance?أي عائلة في الشرائح من 19 إلى 21 تُظهر تصاعد القدرة مع الأداء معا؟

Quick checkاختبار سريع

Why are TOPS figures from different vendors not directly comparable?لماذا لا يمكن مقارنة أرقام TOPS من شركات مختلفة مقارنة مباشرة؟

The STM32F746NG is one chip with a Cortex-M7 core at 216 MHz, 1 MB of flash and 320 kB of SRAM, drawing about 360 mW. It is the "off-the-shelf commercial microcontroller" on which MCUNet ran ImageNet-class vision in part 01 (slide 7). Against the smallest Jetson, the Nano at 10 W and 4 GB, it has 28x less power and 12,500x less memory. This is the tier that TinyML is named for.

STM32F746NG شريحة واحدة فيها نواة Cortex-M7 بتردد 216 MHz، و1 MB من ذاكرة flash، و320 kB من SRAM، وتستهلك نحو 360 mW. إنها «المتحكم الدقيق التجاري الجاهز» (off-the-shelf commercial microcontroller) الذي شغّل عليه MCUNet رؤية حاسوبية بمستوى ImageNet في الجزء 01 (الشريحة 7). ومقارنة بأصغر Jetson، أي Nano بقدرة 10 W و4 GB، فقدرتها أقل بمقدار 28x وذاكرتها أقل بمقدار 12,500x. هذا هو المستوى الذي سُمي TinyML باسمه.

A microcontroller is a compact integrated circuit designed for embedded systems, integrating a processor, memory and input/output peripherals on a single chip. The MCUNet paper adds what the definition implies: these are "bare-metal devices that do not have an operating system, nor do they have DRAM" (Lin et al., 2020). Everything a model needs, weights and activations alike, must live in the on-chip flash and SRAM, because there is nothing else.

المتحكم الدقيق (microcontroller) دائرة متكاملة مدمجة مصممة للأنظمة المضمنة، تجمع معالجا وذاكرة وطرفيات إدخال وإخراج على شريحة واحدة. وتضيف ورقة MCUNet ما يلزم من هذا التعريف: هذه «أجهزة تعمل مباشرة على العتاد (bare-metal) بلا نظام تشغيل ولا ذاكرة DRAM» (Lin et al., 2020). كل ما يحتاجه النموذج، أوزانا وتنشيطات، يجب أن يعيش في ذاكرتي flash وSRAM على الشريحة، لأنه لا يوجد شيء آخر.

Processor, SRAM, flash and I/O share one die. Weights are read from flash into the core; activations are read and written between SRAM and the core.المعالج وSRAM وflash ووحدات الإدخال والإخراج تتشارك قالبا واحدا (die). تُقرأ الأوزان من flash إلى النواة، وتُقرأ التنشيطات وتُكتب بين SRAM والنواة.

The units drop two prefixesالوحدات تنزل بادئتين

Slide 22 quietly changes the axes. Power is in milliwatts, not watts. Memory is in kilobytes, not gigabytes. Performance is in DMIPS, not TOPS. Each change is a signal that this tier is a different world, and the last one deserves the most care.

تغيّر الشريحة 22 المحاور بهدوء. القدرة بالميلي واط لا بالواط. والذاكرة بالكيلوبايت لا بالغيغابايت. والأداء بوحدة DMIPS لا TOPS. كل تغيير إشارة إلى أن هذا المستوى عالم مختلف، والتغيير الأخير يستحق أكبر قدر من الانتباه.

BoardاللوحةCoreالنواةClock MHzالتردد MHzDMIPSDMIPSPower mWالقدرة mWSRAM kBSRAM kBFlashFlashDMIPS/mWDMIPS/mW
Arduino ZeroArduino ZeroCortex-M0+Cortex-M0+4845632256 kB7.5
Arduino DueArduino DueCortex-M3Cortex-M3841582696512 kB6.1
STM32F407VGSTM32F407VGCortex-M4Cortex-M4168210132192 (slide says 196)192 (تذكر الشريحة 196)1 MB1.6
STM32F746NGSTM32F746NGCortex-M7Cortex-M72164623603201 MB1.3
Four microcontroller boards (slide 22 values plus verified core data, DMIPS per mW computed)أربع لوحات متحكمات دقيقة (قيم الشريحة 22 مع بيانات نوى موثّقة، وDMIPS لكل mW محسوبة)

The core data come from the vendors: the Arduino Zero's SAMD21 is a Cortex-M0+ at 48 MHz with 32 kB SRAM and 256 kB flash; the Due's SAM3X8E is a Cortex-M3 at 84 MHz with 96 kB SRAM; the STM32F407VG is a Cortex-M4 at 168 MHz rated 210 DMIPS with 192 kB SRAM plus 4 kB backup and 1 MB flash; the STM32F746NG is a Cortex-M7 at 216 MHz rated 462 DMIPS with 320 kB SRAM and 1 MB flash (Arduino, Keil and ST documentation).

بيانات النوى مأخوذة من الشركات المصنعة: شريحة SAMD21 في Arduino Zero نواتها Cortex-M0+ بتردد 48 MHz مع 32 kB من SRAM و256 kB من flash، وشريحة SAM3X8E في Due نواتها Cortex-M3 بتردد 84 MHz مع 96 kB من SRAM، وSTM32F407VG نواتها Cortex-M4 بتردد 168 MHz ومصنفة عند 210 DMIPS مع 192 kB من SRAM إضافة إلى 4 kB احتياطية و1 MB من flash، وSTM32F746NG نواتها Cortex-M7 بتردد 216 MHz ومصنفة عند 462 DMIPS مع 320 kB من SRAM و1 MB من flash (وثائق Arduino وKeil وST).

What DMIPS measures, and what it does notما الذي يقيسه DMIPS، وما الذي لا يقيسه

Dhrystone is a synthetic benchmark that Reinhold Weicker published in 1984 to exercise typical systems code: integer arithmetic, string handling, pointer chasing, no floating point (Weicker, 1984). A DMIPS is Dhrystones per second divided by 1757, the score of a VAX 11/780, which was nominally a one-MIPS machine. Arm publishes DMIPS per MHz for each core so that a clock frequency turns into a rating: Cortex-M0+ 0.95, Cortex-M3 and M4 1.25, Cortex-M7 2.14 (Arm Cortex-M comparison table).

Dhrystone اختبار أداء اصطناعي (benchmark) نشره Reinhold Weicker عام 1984 ليحاكي شيفرة الأنظمة المعتادة: حساب بالأعداد الصحيحة، ومعالجة سلاسل نصية، وتتبع مؤشرات (pointers)، بلا أي فاصلة عائمة (Weicker, 1984). ووحدة DMIPS هي عدد Dhrystones في الثانية مقسوما على 1757، وهي نتيجة حاسوب VAX 11/780 الذي كان اسميا آلة بسرعة MIPS واحد. وتنشر Arm قيمة DMIPS لكل MHz لكل نواة حتى يتحول التردد إلى تصنيف: Cortex-M0+ تساوي 0.95، وCortex-M3 وM4 تساويان 1.25، وCortex-M7 تساوي 2.14 (جدول مقارنة Arm Cortex-M).

DMIPS=Dhrystones per second1757\text{DMIPS} = \frac{\text{Dhrystones per second}}{1757}
Normalized to the VAX 11/780منسوبًا إلى VAX 11/780
DMIPS=(DMIPS/MHz)×fclock\text{DMIPS} = (\text{DMIPS/MHz}) \times f_{\text{clock}}
How the slide's numbers ariseكيف تنشأ أرقام الشريحة

Worked exampleمثال محلول

Rebuilding the slide's DMIPS from Arm's tableإعادة بناء أرقام DMIPS في الشريحة من جدول Arm

  1. STM32F746, Cortex-M7STM32F746، نواة Cortex-M7

    2.14 × 216 = 462.2, matching the slide's 462.
    2.14 × 216 = 462.2، وهو يطابق رقم الشريحة 462.
  2. STM32F407, Cortex-M4STM32F407، نواة Cortex-M4

    1.25 × 168 = 210, matching the slide.
    1.25 × 168 = 210، وهو يطابق الشريحة.
  3. Arduino Zero, Cortex-M0+Arduino Zero، نواة Cortex-M0+

    0.95 × 48 = 45.6, matching the slide's 45.
    0.95 × 48 = 45.6، وهو يطابق رقم الشريحة 45.
  4. Arduino Due, Cortex-M3Arduino Due، نواة Cortex-M3

    1.25 × 84 = 105, but the slide says 158, which implies about 1.88 DMIPS/MHz. That is an optimized-compiler score; Arm notes that Dhrystone results depend heavily on compiler switches.
    1.25 × 84 = 105، لكن الشريحة تقول 158، وهذا يعني نحو 1.88 DMIPS/MHz. هذه نتيجة مترجم محسَّن (optimized compiler)، وتنبه Arm إلى أن نتائج Dhrystone تعتمد كثيرا على خيارات المترجم.
  5. Resultالنتيجة

    DMIPS is a core property times a clock. It says nothing about multiply-accumulate throughput.
    DMIPS خاصية للنواة مضروبة في التردد. ولا تقول شيئا عن معدل إنجاز عمليات الضرب والتجميع (MAC).

So why can you not convert DMIPS into a small TOPS? Because the benchmark contains no MACs, and a neural network is almost nothing but MACs. You can only bound the MCU from above by counting what its SIMD unit could do at best.

فلماذا لا يمكنك تحويل DMIPS إلى TOPS صغيرة؟ لأن اختبار الأداء لا يحتوي على أي عملية MAC، والشبكة العصبية تكاد تكون كلها عمليات MAC. كل ما تستطيعه هو وضع حد أعلى للمتحكم الدقيق بحساب أفضل ما تستطيع وحدة SIMD فيه أن تفعله.

Worked exampleمثال محلول

An upper bound on microcontroller TOPSحد أعلى لـ TOPS في المتحكم الدقيق

  1. Best-case MAC rateمعدل MAC في أفضل حالة

    A Cortex-M7 can issue at most two 16-bit MACs per cycle with its SIMD instructions: 216 × 10^6 × 2 = 4.3 × 10^8 MACs per second.
    نواة Cortex-M7 تستطيع إصدار عمليتي MAC بعرض 16 بت على الأكثر في كل دورة باستخدام تعليمات SIMD: 216 × 10^6 × 2 = 4.3 × 10^8 عملية MAC في الثانية.
  2. Convert to operationsالتحويل إلى عمليات

    4.3 × 10^8 × 2 = 8.6 × 10^8 operations per second, about 0.0009 TOPS.
    4.3 × 10^8 × 2 = 8.6 × 10^8 عملية في الثانية، أي نحو 0.0009 TOPS.
  3. Compare with the edge tierالمقارنة مع المستوى الطرفي

    Jetson Nano at 0.5 TOPS is about 580x higher; Snapdragon 8 Gen 1 at 52 TOPS about 60,000x.
    Jetson Nano عند 0.5 TOPS أعلى بنحو 580x، وSnapdragon 8 Gen 1 عند 52 TOPS أعلى بنحو 60,000x.
  4. Resultالنتيجة

    Even after a generous conversion, the MCU sits three to five orders of magnitude below the accelerators. The design goal at this tier is fitting the workload in memory, not maximizing TOPS.
    حتى بعد تحويل سخي، يقع المتحكم الدقيق تحت المسرّعات بثلاث إلى خمس مراتب عشرية. وهدف التصميم في هذا المستوى هو أن يتسع عبء العمل في الذاكرة، لا تعظيم TOPS.

One more pattern in the table is worth noticing: DMIPS per milliwatt falls as the boards get faster, from 7.5 on the Zero to 1.3 on the F746. The faster core pays more energy per instruction. At this tier nobody buys the F746 for efficiency; they buy it because 320 kB is the smallest SRAM in which a useful vision model can breathe.

ونمط آخر في الجدول يستحق الانتباه: قيمة DMIPS لكل ميلي واط تنخفض كلما أصبحت اللوحات أسرع، من 7.5 في Zero إلى 1.3 في F746. النواة الأسرع تدفع طاقة أكبر لكل تعليمة. في هذا المستوى لا أحد يشتري F746 من أجل الكفاءة، بل لأن 320 kB هي أصغر SRAM يستطيع فيها نموذج رؤية مفيد أن يتنفس.

Recall

Define a microcontroller in one sentence and give the STM32F746's two memory numbers.عرّف المتحكم الدقيق في جملة واحدة واذكر رقمي الذاكرة في STM32F746.

A compact integrated circuit for embedded systems that puts a processor, memory and I/O peripherals on a single chip. The STM32F746 has 320 kB of SRAM and 1 MB of flash.
دائرة متكاملة مدمجة للأنظمة المضمنة تضع معالجا وذاكرة وطرفيات إدخال وإخراج على شريحة واحدة. تملك STM32F746 مقدار 320 kB من SRAM و1 MB من flash.

Recall

What does DMIPS measure, and why can it not be compared with TOPS?ماذا تقيس DMIPS، ولماذا لا يمكن مقارنتها مع TOPS؟

Dhrystone MIPS: a synthetic integer benchmark normalized to the VAX 11/780 (Dhrystones per second divided by 1757). It contains no floating point and no MACs, so it is not a neural network throughput figure.
Dhrystone MIPS: اختبار أداء اصطناعي للأعداد الصحيحة مُعاير على VAX 11/780 (عدد Dhrystones في الثانية مقسوما على 1757). لا يحتوي على فاصلة عائمة ولا على عمليات MAC، لذلك ليس رقما لمعدل إنجاز الشبكات العصبية.

Recall

Compute the DMIPS of a Cortex-M7 at 216 MHz using Arm's 2.14 DMIPS/MHz, and the ratio of a phone's 4 GB to the F746's 320 kB.احسب DMIPS لنواة Cortex-M7 بتردد 216 MHz باستخدام قيمة Arm البالغة 2.14 DMIPS/MHz، والنسبة بين 4 GB في الهاتف و320 kB في F746.

2.14 × 216 ≈ 462 DMIPS. 4 GB / 320 kB = 4,000,000 / 320 = 12,500x, about four orders of magnitude.
2.14 × 216 ≈ 462 DMIPS. و4 GB / 320 kB = 4,000,000 / 320 = 12,500x، أي نحو أربع مراتب عشرية.

Quick checkاختبار سريع

What does the DMIPS figure on slide 22 measure?ماذا يقيس رقم DMIPS في الشريحة 22؟

Quick checkاختبار سريع

Which of the four boards is the Cortex-M7 device that MCUNet targeted in part 01?أي اللوحات الأربع هي جهاز Cortex-M7 الذي استهدفه MCUNet في الجزء 01؟

Take ResNet-50, the workhorse image classifier from part 01, with 25,557,032 parameters (torchvision). At FP32 its weights are 102 MB; at FP16, 51 MB; at INT8, 25.6 MB. A cloud GPU holds the FP32 version 783 times over in its HBM. A phone stores it in 256 GB of flash with room for thousands of copies. A microcontroller's 1 MB flash cannot hold even the INT8 version, which is 25.6x too big. Slide 23 turns this into three tiers with two numbers each, and the ratios between them are the thesis of the course.

خذ ResNet-50، مصنف الصور الأساسي من الجزء 01، بعدد 25,557,032 معاملا (torchvision). بدقة FP32 تبلغ أوزانه 102 MB، وبدقة FP16 تبلغ 51 MB، وبدقة INT8 تبلغ 25.6 MB. تتسع ذاكرة HBM في وحدة GPU سحابية لنسخة FP32 منه 783 مرة. ويخزنه الهاتف في 256 GB من flash مع متسع لآلاف النسخ. أما ذاكرة flash بسعة 1 MB في المتحكم الدقيق (microcontroller) فلا تتسع حتى لنسخة INT8، التي تكبرها بمقدار 25.6x. تحول الشريحة 23 ذلك إلى ثلاثة مستويات لكل منها رقمان، والنسب بينها هي أطروحة المقرر.

The lecture calls the tiers cloud AI, mobile AI and tiny AI, and gives each tier two budgets. Activation memory is the working memory that holds intermediate results during computation: 80 GB of HBM on an A100-class cloud GPU, 4 GB of DRAM on a phone, 320 kB of SRAM on the STM32F746. Weight storage is the persistent memory that holds the model: terabytes to petabytes in a data center, 256 GB of phone flash, 1 MB of on-chip flash.

تسمي المحاضرة المستويات الثلاثة cloud AI, mobile AI and tiny AI (الذكاء الاصطناعي السحابي والمحمول والدقيق)، وتعطي كل مستوى ميزانيتين. ذاكرة التنشيطات (activation memory) هي ذاكرة العمل التي تحمل النتائج الوسيطة أثناء الحساب: 80 GB من HBM في وحدة cloud GPU من فئة A100، و4 GB من DRAM في الهاتف، و320 kB من SRAM في STM32F746. وتخزين الأوزان (weight storage) هو الذاكرة الدائمة التي تحمل النموذج: من التيرابايتات إلى البيتابايتات في مركز البيانات، و256 GB من flash الهاتف، و1 MB من flash على الشريحة.

TierالمستوىExample deviceجهاز مثالActivation memoryذاكرة التنشيطاتWeight storageتخزين الأوزانMemory vs tinyالذاكرة مقارنة بالدقيقStorage vs tinyالتخزين مقارنة بالدقيق
Cloud AIالذكاء الاصطناعي السحابي (Cloud AI)A100-class GPUوحدة GPU من فئة A10080 GBabout 1 TB or moreنحو 1 TB أو أكثر250,000xabout 1,000,000xنحو 1,000,000x
Mobile AIالذكاء الاصطناعي المحمول (Mobile AI)flagship phoneهاتف رائد4 GB256 GB12,500x256,000x
Tiny AIالذكاء الاصطناعي الدقيق (Tiny AI)STM32F746STM32F746320 kB1 MB1x1x
Three tiers on slide 23, with ratios to the tiny tierالمستويات الثلاثة في الشريحة 23، مع النسب إلى المستوى الدقيق
Three activation-memory squares whose side lengths follow log size; ResNet-50's 7.2 MB peak activation fits inside the mobile square but spills 22.5x past the tiny SRAM. The flash check for its weights is in the fit table below.ثلاثة مربعات لذاكرة التنشيطات تتبع أطوال أضلاعها الحجم على مقياس لوغاريتمي. ذروة تنشيطات ResNet-50 البالغة 7.2 MB تتسع داخل مربع المحمول لكنها تتجاوز SRAM المستوى الدقيق بمقدار 22.5 ضعف. فحص flash لأوزانه موجود في جدول الملاءمة أدناه.
80 GB320 kB=80×106 kB320 kB=250,000\frac{80\ \text{GB}}{320\ \text{kB}} = \frac{80 \times 10^{6}\ \text{kB}}{320\ \text{kB}} = 250{,}000
Cloud to tiny activation memory, with 1 GB = 1,000,000 kBذاكرة التنشيطات من السحابة إلى الأجهزة الصغيرة جدًا، مع 1 GB = 1,000,000 kB

Adjacent ratios worth memorizingنسب متجاورة تستحق الحفظ

Cloud to mobile, activationمن السحابة إلى المحمول، التنشيطات
80 GB / 4 GB = 20x80 GB / 4 GB = 20x
Mobile to tiny, activationمن المحمول إلى الدقيق، التنشيطات
4 GB / 320 kB = 12,500x4 GB / 320 kB = 12,500x
Cloud to tiny, activationمن السحابة إلى الدقيق، التنشيطات
20 × 12,500 = 250,000x20 × 12,500 = 250,000x
Cloud to mobile, storageمن السحابة إلى المحمول، التخزين
about 1 TB / 256 GB ≈ 4x (taking the low end of TB/PB)نحو 1 TB / 256 GB ≈ 4x (بأخذ الحد الأدنى من نطاق TB/PB)
Mobile to tiny, storageمن المحمول إلى الدقيق، التخزين
256 GB / 1 MB = 256,000x256 GB / 1 MB = 256,000x

MCUNet states the same gap in words: microcontroller memory is "3 orders of magnitude smaller than mobile devices, and 5-6 orders of magnitude smaller than cloud GPUs" (Lin et al., 2020). Its 2020 table used a V100 with 16 GB and an iPhone 11 with more than 64 GB; the slide updates the cloud and mobile columns to an 80 GB A100 and a 256 GB phone, while the tiny column is unchanged at 320 kB and 1 MB. The top tiers moved; the bottom did not.

يذكر MCUNet الفجوة نفسها بالكلمات: ذاكرة المتحكم الدقيق «أصغر بثلاث مراتب عشرية من الأجهزة المحمولة، وبخمس إلى ست مراتب عشرية من وحدات GPU السحابية» (Lin et al., 2020). استخدم جدوله عام 2020 وحدة V100 بسعة 16 GB وiPhone 11 بأكثر من 64 GB، بينما تحدّث الشريحة عمودي السحابة والمحمول إلى A100 بسعة 80 GB وهاتف بسعة 256 GB، ويبقى عمود المستوى الدقيق دون تغيير عند 320 kB و1 MB. المستويات العليا تحركت، والأدنى لم يتحرك.

Two budgets, not oneميزانيتان، لا ميزانية واحدة

The two rows on slide 23 are not interchangeable, and confusing them is the most common mistake in sizing a TinyML deployment. Storage holds the weights persistently, so what matters is the total model size, and on an MCU that budget is the read-only flash. Activation memory is the read-write scratch space used while a layer runs, so what matters is the peak across layers, because a layer's input and output tensors must coexist at the moment it executes. MCUNet puts it in one line: "SRAM constrains the activation size (read and write); Flash constrains the model size (read-only)". A model can fit in flash and still crash at runtime because one wide early layer's activations exceed SRAM, and a model with small activations can still be unloadable because its weights exceed flash.

الصفان في الشريحة 23 غير قابلين للتبادل، والخلط بينهما هو الخطأ الأكثر شيوعا عند تحجيم نشر TinyML. التخزين يحمل الأوزان بشكل دائم، لذلك ما يهم هو الحجم الكلي للنموذج، وفي المتحكم الدقيق هذه الميزانية هي ذاكرة flash للقراءة فقط. أما ذاكرة التنشيطات فهي مساحة مؤقتة للقراءة والكتابة تُستخدم أثناء تشغيل الطبقة، لذلك ما يهم هو الذروة عبر الطبقات، لأن موترات (tensors) الإدخال والإخراج للطبقة يجب أن تتواجد معا لحظة تنفيذها. ويلخصها MCUNet في سطر واحد: «SRAM تقيّد حجم التنشيطات (قراءة وكتابة)، وFlash تقيّد حجم النموذج (قراءة فقط)». قد يتسع النموذج في flash ومع ذلك ينهار أثناء التشغيل لأن تنشيطات طبقة مبكرة عريضة واحدة تتجاوز SRAM، وقد يكون نموذج ذو تنشيطات صغيرة غير قابل للتحميل أصلا لأن أوزانه تتجاوز flash.

QuantityالكميةSizeالحجمCloud, 80 GB HBMالسحابة، 80 GB من HBMMobile, 256 GB flash and 4 GB DRAMالمحمول، 256 GB من flash و4 GB من DRAMTiny, 1 MB flash and 320 kB SRAMالدقيق، 1 MB من flash و320 kB من SRAM
FP32 weightsأوزان FP32102.2 MByes, 783x headroomنعم، مع هامش 783xyesنعمno, 102x overلا، تتجاوز بمقدار 102x
FP16 weightsأوزان FP1651.1 MByesنعمyesنعمno, 51x overلا، تتجاوز بمقدار 51x
INT8 weightsأوزان INT825.6 MByesنعمyesنعمno, 25.6x overلا، تتجاوز بمقدار 25.6x
Peak activation (MCUNet)ذروة التنشيطات (MCUNet)7.2 MByesنعمyesنعمno, 22.5x over 320 kB SRAMلا، تتجاوز 320 kB من SRAM بمقدار 22.5x
Does ResNet-50 fit? (25,557,032 parameters; peak activation from MCUNet Table 1)هل يتسع ResNet-50؟ (25,557,032 معاملا، وذروة التنشيطات من الجدول 1 في MCUNet)

Worked exampleمثال محلول

Two budgets, one model: MobileNetV2 at INT8 on the STM32F746ميزانيتان ونموذج واحد: MobileNetV2 بدقة INT8 على STM32F746

  1. Storage checkفحص التخزين

    MobileNetV2 INT8 weights are 3.4 MB (MCUNet Table 1). Against 1 MB of flash that is 3.4x over.
    أوزان MobileNetV2 بدقة INT8 تبلغ 3.4 MB (MCUNet، الجدول 1). ومقابل 1 MB من flash فهي تتجاوزها بمقدار 3.4x.
  2. Activation checkفحص التنشيطات

    Its peak activation is 1.7 MB. Against 320 kB of SRAM that is 5.3x over.
    ذروة تنشيطاته 1.7 MB. ومقابل 320 kB من SRAM فهي تتجاوزها بمقدار 5.3x.
  3. What MCUNet didما فعله MCUNet

    Co-designed the network (TinyNAS, a memory-aware architecture search) with the runtime (TinyEngine), cutting SRAM use by 3.5x and flash by 5.7x versus quantized MobileNetV2 (Lin et al., 2020).
    صمم الشبكة (TinyNAS، وهو بحث في المعماريات (architecture search) يراعي الذاكرة) بالتزامن مع بيئة التشغيل (TinyEngine)، فخفض استخدام SRAM بمقدار 3.5x واستخدام flash بمقدار 5.7x مقارنة بـ MobileNetV2 المكمّم (Lin et al., 2020).
  4. Resultالنتيجة

    Both budgets had to be satisfied separately. Quantization alone (4x from FP32 to INT8) closes neither gap; the architecture and the runtime had to change too.
    كان لا بد من تلبية الميزانيتين كل على حدة. التكميم وحده (4x من FP32 إلى INT8) لا يسد أيا من الفجوتين، وكان لا بد أن تتغير المعمارية وبيئة التشغيل أيضا.

Why the rest of the course existsلماذا وُجد باقي المقرر

Put the two halves of this lecture side by side. The largest model in part 02, MT-NLG at 530B parameters, needs 1.06 TB of FP16 weights. The smallest tier here offers 1 MB. That is a factor of about one million, six orders of magnitude. GPU memory grew 12x in eight years, and phone memory grew 4x across the Snapdragon generations on slide 19. No hardware trend closes six orders of magnitude on any timescale that matters. So the model must change.

ضع نصفي هذه المحاضرة جنبا إلى جنب. أكبر نموذج في الجزء 02، وهو MT-NLG بعدد 530B معامل، يحتاج إلى 1.06 TB من أوزان FP16. وأصغر مستوى هنا يقدم 1 MB. هذا عامل يقارب المليون، أي ست مراتب عشرية. نمت ذاكرة الـ GPU بمقدار 12x في ثماني سنوات، ونمت ذاكرة الهاتف بمقدار 4x عبر أجيال Snapdragon في الشريحة 19. لا يوجد اتجاه في العتاد يسد ست مراتب عشرية في أي إطار زمني له معنى. لذلك يجب أن يتغير النموذج.

Worked exampleمثال محلول

530B at FP16 against each tier530B بدقة FP16 مقابل كل مستوى

  1. Cloudالسحابة

    1.06 TB / 80 GB = 13.25: fourteen A100s just for the weights, as computed in the first concept.
    1.06 TB / 80 GB = 13.25: أربع عشرة وحدة A100 للأوزان فقط، كما حسبنا في المفهوم الأول.
  2. Mobileالمحمول

    1.06 TB / 256 GB = 4.1: does not fit even the phone's storage, let alone its 4 GB of working memory.
    1.06 TB / 256 GB = 4.1: لا يتسع حتى في تخزين الهاتف، فضلا عن ذاكرة العمل فيه البالغة 4 GB.
  3. Tinyالدقيق

    1.06 TB / 1 MB = 1,060,000: a million times over.
    1.06 TB / 1 MB = 1,060,000: يتجاوزها مليون مرة.
  4. Resultالنتيجة

    Every tier below the cloud rejects the model. Compression is not optional; it is the subject.
    كل مستوى تحت السحابة يرفض النموذج. الضغط (compression) ليس اختياريا، بل هو الموضوع نفسه.

Each later lecture is one lever on the model side of this gap. Pruning removes weights; quantization shrinks each remaining weight from 4 bytes to 1 or fewer; neural architecture search, including Once-for-All from part 01, designs networks under an explicit memory budget; knowledge distillation transfers a large model's accuracy into a small one; and algorithm and system co-design, as in TinyEngine, makes the runtime spend the budget wisely. Slide 24 credits the source of this framing: the deck follows Prof. Song Han's MIT 6.5940 course, TinyML and Efficient Deep Learning Computing, whose introductory lecture carries the same charts (MIT HAN Lab).

كل محاضرة لاحقة هي رافعة واحدة على جانب النموذج من هذه الفجوة. التقليم (pruning) يزيل أوزانا، والتكميم (quantization) يقلص كل وزن متبق من 4 بايت إلى 1 أو أقل، والبحث في المعماريات العصبية (neural architecture search)، ومنه Once-for-All من الجزء 01، يصمم شبكات تحت ميزانية ذاكرة صريحة، وتقطير المعرفة (knowledge distillation) ينقل دقة نموذج كبير إلى نموذج صغير، والتصميم المشترك للخوارزمية والنظام (algorithm and system co-design)، كما في TinyEngine، يجعل بيئة التشغيل تنفق الميزانية بحكمة. وتذكر الشريحة 24 مصدر هذا الإطار: العرض يتبع مقرر البروفيسور Song Han في MIT رقم 6.5940، TinyML and Efficient Deep Learning Computing، الذي تحمل محاضرته التمهيدية المخططات نفسها (MIT HAN Lab).

Recall

Give the six numbers on slide 23.اذكر الأرقام الستة في الشريحة 23.

Activation memory: 80 GB, 4 GB, 320 kB. Weight storage: about TB to PB, 256 GB, 1 MB.
ذاكرة التنشيطات: 80 GB و4 GB و320 kB. تخزين الأوزان: من رتبة TB إلى PB، و256 GB، و1 MB.

Recall

Distinguish activation memory from weight storage and name the microcontroller component for each.ميّز بين ذاكرة التنشيطات وتخزين الأوزان، واذكر مكوّن المتحكم الدقيق المقابل لكل منهما.

Activation memory is the read-write working memory during inference; its peak across layers matters; on an MCU it is SRAM. Weight storage holds the read-only weights; the total model size matters; on an MCU it is flash.
ذاكرة التنشيطات هي ذاكرة العمل للقراءة والكتابة أثناء الاستدلال، والمهم فيها هو الذروة عبر الطبقات، وهي في المتحكم الدقيق SRAM. وتخزين الأوزان يحمل الأوزان للقراءة فقط، والمهم فيه هو الحجم الكلي للنموذج، وهو في المتحكم الدقيق flash.

Recall

Does INT8 ResNet-50 fit the tiny AI tier? Check both budgets.هل يتسع ResNet-50 بدقة INT8 في مستوى tiny AI؟ افحص الميزانيتين.

No. Its 25.6 MB of weights is 25.6x the 1 MB flash, and its 7.2 MB peak activation (MCUNet) is about 22x the 320 kB SRAM. It fails both.
لا. أوزانه البالغة 25.6 MB تساوي 25.6x من flash بسعة 1 MB، وذروة تنشيطاته البالغة 7.2 MB (MCUNet) تساوي نحو 22x من SRAM بسعة 320 kB. يفشل في الاثنتين.

Quick checkاختبار سريع

Using 1 GB = 1,000,000 kB, what is the ratio of cloud AI activation memory (80 GB) to tiny AI (320 kB)?باعتبار 1 GB = 1,000,000 kB، ما نسبة ذاكرة التنشيطات في cloud AI (80 GB) إلى tiny AI (320 kB)؟

Quick checkاختبار سريع

A model's INT8 weights fit in an MCU's 1 MB flash, yet inference crashes. What is the most likely reason?أوزان نموذج بدقة INT8 تتسع في ذاكرة flash بسعة 1 MB في متحكم دقيق، ومع ذلك ينهار الاستدلال. ما السبب الأرجح؟

Quick checkاختبار سريع

On slide 23, which budget does the 256 GB figure for mobile AI describe?في الشريحة 23، أي ميزانية يصفها رقم 256 GB في mobile AI؟

Quick checkاختبار سريع

Why does the course turn to compression, quantization and NAS rather than waiting for hardware?لماذا يتجه المقرر إلى الضغط والتكميم وNAS بدلا من انتظار العتاد؟

Recapالخلاصة

If you remember nothing elseإن لم تتذكر شيئاً آخر فتذكّر هذا

  • Slide 17 repeats the three pillars. Part 01 covered algorithm and data; this part is the hardware pillar.تعيد الشريحة 17 عرض الركائز الثلاث. غطى الجزء 01 الخوارزمية والبيانات، وهذا الجزء هو ركيزة العتاد.
  • P100 to B100: dense FP16 18.7 to 1750 TOPS (94x), power 250 to 700 W (2.8x), memory 16 to 192 GB (12x), bandwidth 732 to 8192 GB/s (11x). TOPS/W: 0.075, 0.42, 0.78, 1.41, 2.5.من P100 إلى B100: أداء FP16 الكثيف من 18.7 إلى 1750 TOPS (94 ضعفا)، والقدرة من 250 إلى 700 W (2.8 ضعف)، والذاكرة من 16 إلى 192 GB (12 ضعفا)، وعرض النطاق من 732 إلى 8192 GB/s (11 ضعفا). وقيم TOPS/W هي: 0.075 و0.42 و0.78 و1.41 و2.5.
  • TOPS counts two operations per MAC. NVIDIA headline numbers double with 2:4 sparsity; the slide and this part use dense figures.تحسب TOPS عمليتين لكل MAC. أرقام NVIDIA الدعائية تتضاعف مع التفرق بنمط 2:4، أما الشريحة وهذا الجزء فيستخدمان الأرقام الكثيفة.
  • The memory wall: peak compute grows about 3x every two years while DRAM bandwidth grows about 1.6x, so bandwidth and capacity, not TOPS, bound LLM serving.جدار الذاكرة: ذروة الحوسبة تنمو نحو 3 أضعاف كل سنتين بينما ينمو عرض نطاق DRAM نحو 1.6 ضعف، لذلك فإن عرض النطاق والسعة، لا TOPS، هما ما يحدّ خدمة نماذج LLM.
  • Phones are capped near 10 W by heat. Snapdragon 845 to 8 Gen 1 went 3 to 52 TOPS (17x) at flat power; Apple A11 to A17 went 0.6 to 35 TOPS at 6 to 8 W.الهواتف محدودة بنحو 10 W بسبب الحرارة. انتقلت Snapdragon من 845 إلى 8 Gen 1 من 3 إلى 52 TOPS (17 ضعفا) بقدرة ثابتة، وانتقلت Apple من A11 إلى A17 من 0.6 إلى 35 TOPS عند 6 إلى 8 W.
  • Jetson is a system on module whose power scales with tier: 0.5 TOPS at 10 W (Nano) to 275 TOPS at 60 W (AGX Orin 64GB).Jetson نظام على وحدة (system on module) تتدرج قدرته مع المستوى: 0.5 TOPS عند 10 W (Nano) حتى 275 TOPS عند 60 W (AGX Orin 64GB).
  • TOPS figures depend on precision, sparsity and workload. Compare only within a family at the same precision.أرقام TOPS تعتمد على الدقة العددية والتفرق وعبء العمل. قارن فقط داخل العائلة الواحدة وبالدقة نفسها.
  • A microcontroller puts processor, memory and I/O on one chip. STM32F746: Cortex-M7, 216 MHz, 462 DMIPS, 320 kB SRAM, 1 MB flash, about 360 mW.يضع المتحكم الدقيق المعالج والذاكرة ووحدات الإدخال والإخراج على شريحة واحدة. STM32F746: نواة Cortex-M7، بتردد 216 MHz، و462 DMIPS، و320 kB من SRAM، و1 MB من flash، ونحو 360 mW.
  • DMIPS is an integer benchmark (Dhrystones per second divided by 1757), not a neural network throughput. MCU compute is on the order of 0.001 TOPS.DMIPS اختبار أداء للعمليات الصحيحة (عدد Dhrystones في الثانية مقسوما على 1757)، وليس معدل إنجاز للشبكات العصبية. حوسبة المتحكم الدقيق من رتبة 0.001 TOPS.
  • Cloud, mobile, tiny: 80 GB, 4 GB, 320 kB of activation memory (20x and 12,500x steps, 250,000x end to end); about 1 TB, 256 GB, 1 MB of weight storage (256,000x mobile to tiny).السحابة والمحمول والدقيق: 80 GB و4 GB و320 kB من ذاكرة التنشيطات (خطوتان بمقدار 20 ضعفا و12,500 ضعف، و250,000 ضعف من الطرف إلى الطرف)، ونحو 1 TB و256 GB و1 MB من تخزين الأوزان (256,000 ضعف من المحمول إلى الدقيق).
  • Activation memory (SRAM, peak per layer) and weight storage (flash, total size) are separate budgets. ResNet-50 fails both on an MCU, by about 100x and 22x.ذاكرة التنشيطات (SRAM، الذروة لكل طبقة) وتخزين الأوزان (flash، الحجم الكلي) ميزانيتان منفصلتان. يفشل ResNet-50 في كلتيهما على المتحكم الدقيق، بنحو 100 ضعف و22 ضعفا.
  • A 530B FP16 model (1.06 TB) is a million times a 1 MB flash. The course closes the gap on the model side: pruning, quantization, NAS, distillation and co-design.نموذج بحجم 530B بدقة FP16 (أي 1.06 TB) يساوي مليون ضعف ذاكرة flash بسعة 1 MB. يسد المقرر هذه الفجوة من جانب النموذج: التقليم (pruning)، والتكميم (quantization)، والبحث في المعماريات (NAS)، والتقطير (distillation)، والتصميم المشترك (co-design).
  • The deck follows Prof. Song Han's MIT 6.5940 TinyML and Efficient Deep Learning Computing.يتبع العرض مقرر البروفيسور Song Han في MIT رقم 6.5940: TinyML and Efficient Deep Learning Computing.

Sourcesالمصادر