مسرد المصطلحات

الضبط الفعال للبارامترات (PEFT)

اكتشف الضبط الدقيق الفعال للمعلمات (PEFT) لتكييف نماذج الذكاء الاصطناعي الكبيرة بأقل قدر من الموارد. وفِّر التكاليف، وتجنب الإفراط في الضبط، وحسِّن النشر!

تدريب YOLO النماذج
ببساطة مع Ultralytics HUB

التعرف على المزيد

Parameter-Efficient Fine-Tuning (PEFT) describes a collection of techniques used in machine learning (ML) to adapt large, pre-trained models (like foundation models) to specific downstream tasks without needing to update all of the model's parameters. Instead, PEFT methods focus on modifying only a small subset of parameters or adding a small number of new parameters. This approach drastically reduces the computational and storage costs associated with fine-tuning massive models, such as large language models (LLMs) or large-scale vision models used in computer vision (CV), making customization more accessible and efficient.

الملاءمة والفوائد

أدى ظهور نماذج كبيرة للغاية مُدربة مسبقاً، والتي غالباً ما تحتوي على مليارات المعلمات، إلى جعل أساليب الضبط الدقيق التقليدية تستهلك موارد كثيرة. يتطلب الضبط الدقيق الكامل لهذه النماذج قوة حاسوبية كبيرة (غالبًا ما تكون وحدات معالجة رسومات متعددة متطورة)، وكميات كبيرة من الذاكرة، ومساحة تخزين كبيرة لكل نموذج مُعدّل. يعالج برنامج PEFT هذه التحديات من خلال تقديم العديد من المزايا الرئيسية:

  • Reduced Computational Cost: Training only a small fraction of parameters requires significantly less computing power and time, enabling faster iteration and experimentation, potentially using platforms like Ultralytics HUB Cloud Training.
  • Lower Memory Requirements: Fewer active parameters mean less memory is needed during training and inference, making it feasible to fine-tune large models on consumer-grade hardware or edge devices.
  • Smaller Storage Footprint: Instead of saving a full copy of the fine-tuned model for each task, PEFT often only requires storing the small set of modified or added parameters, leading to substantial storage savings.
  • Mitigation of Overfitting: By limiting the number of trainable parameters, PEFT can reduce the risk of overfitting, especially when fine-tuning on smaller datasets.
  • Prevention of Catastrophic Forgetting: PEFT methods, by keeping most of the base model parameters frozen, help retain the general knowledge learned during pre-training, overcoming catastrophic forgetting where a model loses previous capabilities when learning new tasks.
  • Efficient Model Deployment: The smaller size of the task-specific parameters makes model deployment simpler, especially in resource-constrained environments like edge AI.

المفاهيم والتقنيات الرئيسية

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

  • Adapters: Small neural network modules inserted between the layers of a pre-trained model. Only the parameters of these adapter modules are trained during fine-tuning, while the original model weights remain frozen.
  • LoRA (Low-Rank Adaptation): This technique injects trainable low-rank matrices into the layers (often Transformer layers) of a large model. It hypothesizes that the change needed to adapt the model has a low "intrinsic rank" and can be represented efficiently. Read the original LoRA research paper for details.
  • Prefix-Tuning: Prepends a sequence of continuous, task-specific vectors (prefixes) to the input, keeping the base LLM parameters frozen. Only the prefix parameters are learned.
  • Prompt Tuning: Similar to Prefix-Tuning, but simplifies it by adding trainable "soft prompts" (embeddings) to the input sequence, which are optimized directly through backpropagation.

Libraries like the Hugging Face PEFT library provide implementations of various PEFT methods, making them easier to integrate into common ML workflows.

التمييز عن المفاهيم ذات الصلة

من المهم تمييز PEFT عن غيرها من تقنيات تكييف النماذج الأخرى وتحسينها:

  • Fine-tuning: Standard fine-tuning typically updates all or a significant portion of the pre-trained model's parameters on a new dataset. PEFT, in contrast, modifies only a very small fraction of parameters or adds a few new ones.
  • Model Pruning: This technique involves removing redundant or unimportant parameters (weights or connections) from a trained model to reduce its size and computational cost, often after training or full fine-tuning. PEFT focuses on efficient adaptation by limiting what gets trained initially.
  • Knowledge Distillation: Involves training a smaller "student" model to mimic the behavior of a larger, pre-trained "teacher" model. PEFT directly adapts the large model itself, albeit efficiently.
  • Hyperparameter Tuning: This process focuses on finding the optimal configuration settings for the training process (e.g., معدل التعلم, حجم الدُفعة) rather than adapting the model's learned parameters for a new task. Tools like the Ultralytics Tuner الفئة facilitate this.

التطبيقات الواقعية

يتيح برنامج PEFT التطبيق العملي للنماذج الكبيرة في مختلف المجالات:

In essence, Parameter-Efficient Fine-Tuning makes state-of-the-art AI models like the Ultralytics YOLO models more versatile and cost-effective to adapt for a wide array of specific applications, democratizing access to powerful AI capabilities.

قراءة الكل