Huawei HCIA-AI study materials
Huawei HCIA-AI study resources

Huawei HCIA-AI cheat sheet

Huawei HCIA-AI · Keep the key ideas within reach.

Quick reference

AI Overview and Huawei AI Strategy

  • Huawei's AI strategy rests on four pillars: Ascend chips, CANN (compute architecture), MindSpore framework, and ModelArts development platform - often summarized as 'device-edge-cloud' full-stack AI.

  • Huawei positions Ascend as an 'all-scenario' AI processor family: Ascend 310 for inference at edge/device and Ascend 910 for training in data centers.

  • The Atlas product line packages Ascend silicon into deployable forms: Atlas 200 modules, Atlas 300/500 accelerator cards, Atlas 800 servers, and Atlas 900 AI clusters.

  • Huawei's AI strategy emphasizes inclusive AI: making AI affordable and usable across industries (manufacturing, healthcare, transport) rather than only in large cloud providers.

  • AI capability layers from bottom to top: chip → chip enablement (CANN) → framework (MindSpore) → platform (ModelArts) → application (HoloSens, HiAI, etc.).

  • Huawei distinguishes strong AI (general-purpose, self-supervised, low-data) from weak/domain AI (task-specific, supervised, data-hungry); its strategy targets both via pre-trained large models.

  • Huawei Cloud AI services include ModelArts (development), HiLens (vision edge), and EI (Enterprise Intelligence) APIs for vision, NLP, and speech.

Quick reference

Machine Learning Fundamentals

  • Supervised learning maps input x to label y from labeled pairs; unsupervised learning finds structure in unlabeled x; reinforcement learning learns a policy from reward signals.

  • Bias-variance tradeoff: high bias underfits (model too simple), high variance overfits (model too sensitive to training data); total error = bias² + variance + irreducible noise.

  • Cross-validation (k-fold) partitions data into k folds, trains on k−1 and validates on the held-out fold, averaging performance to estimate generalization.

  • Classification metrics: accuracy, precision = TP/(TP+FP), recall = TP/(TP+FN), F1 = 2·P·R/(P+R); ROC-AUC measures ranking quality across thresholds.

  • Regression metrics: MSE = (1/n)Σ(y−ŷ)², RMSE = √MSE, MAE = (1/n)Σ|y−ŷ|, R² = 1 − SS_res/SS_tot.

  • Gradient descent update: θ ← θ − η·∇L(θ); η is learning rate; variants include SGD, momentum, RMSProp, Adam.

  • Regularization: L1 (Lasso) drives weights to zero for sparsity; L2 (Ridge) shrinks weights; dropout and early stopping are common in neural nets.

  • Common algorithms: linear/logistic regression, decision trees, random forests, SVM, k-NN, k-means, PCA, naive Bayes.

  • Overfitting signs: training loss decreases while validation loss rises; remedies include more data, regularization, simpler models, and early stopping.

Quick reference

Deep Learning Fundamentals

  • Perceptron: y = f(Σ wᵢxᵢ + b); stacking with non-linear activation f yields multi-layer networks; without non-linearity, stacking collapses to a linear map.

  • Common activations: ReLU (max(0,x), mitigates vanishing gradient), sigmoid (0–1), tanh (−1 to 1), softmax for multi-class output.

  • Backpropagation computes gradients via chain rule from output to input; the optimizer then applies the update step.

  • CNN building blocks: convolution (local receptive field, weight sharing), pooling (downsampling), fully connected head; reduces parameters versus dense nets.

  • RNN processes sequences with hidden state; LSTM/GRU add gates to mitigate vanishing gradients over long dependencies.

  • Transformer uses self-attention (Q, K, V) with scaled dot-product attention: softmax(QKᵀ/√d_k)V; parallelizable and the basis of large language models.

  • Loss functions: cross-entropy for classification, MSE for regression; softmax + cross-entropy is the standard classification pairing.

  • Batch normalization normalizes activations per mini-batch to stabilize and accelerate training; layer normalization is common in transformers.

  • Transfer learning: reuse a pre-trained backbone, then fine-tune on the target task - reduces data and compute requirements.

Quick reference

Mainstream AI Development Frameworks (TensorFlow, MindSpore)

  • TensorFlow 2.x uses eager execution by default; tf.function compiles Python functions into graph form for performance.

  • TensorFlow graph mode: define computation as a dataflow graph; Keras is its high-level API (Sequential, Functional, subclassing).

  • MindSpore is Huawei's open-source framework; it supports both PyNative (eager) and Graph modes, with automatic differentiation via MindSpore's autodiff engine.

  • MindSpore key APIs: mindspore.nn (layers/losses), mindspore.ops (operations), mindspore.dataset (data pipelines), mindspore.train.Model for training/eval.

  • MindSpore supports Ascend, GPU, and CPU backends via device_target; it emphasizes device-edge-cloud unified deployment.

  • MindSpore's 'source-to-source' compilation and automatic parallelism (data, model, hybrid) target large-scale distributed training.

  • TensorFlow deployment options: TF Serving, TF Lite, TF.js; MindSpore deployment options: MindSpore Lite (edge/device) and MindSpore Serving.

  • Both frameworks support ONNX-style interoperability; MindSpore provides tools for converting models and running on Ascend via CANN.

Quick reference

Huawei AI Computing Platform (Ascend, Atlas, CANN)

  • Ascend 310: inference-focused AI processor (edge and data center inference); Ascend 910: training-focused, high-throughput data center processor.

  • Atlas 200: module/edge device; Atlas 300: inference accelerator card; Atlas 500: edge smart station; Atlas 800: training/inference server; Atlas 900: AI cluster.

  • CANN (Compute Architecture for Neural Networks) is the chip-enablement layer between frameworks (MindSpore, TensorFlow, PyTorch) and Ascend hardware.

  • CANN components: Graph Engine (graph optimization), AscendCL (runtime/API), and operator libraries (TBE, AICPU operators).

  • AscendCL provides device management, context/stream management, memory management, and model execution APIs for Ascend applications.

  • TBE (Tensor Boost Engine) is used to develop custom operators for Ascend; operators are compiled to run efficiently on the Ascend AI Core.

  • Ascend AI Core architecture includes Cube units (matrix multiply), Vector units, and Scalar units, plus on-chip buffers for data reuse.

  • Huawei's full-stack AI: Ascend (chip) → CANN (enablement) → MindSpore (framework) → ModelArts (platform) → industry applications.

  • ModelArts provides data labeling, training job management, hyperparameter tuning, and model deployment on Huawei Cloud.