المصنّفات المرنة هي طريقة فعالة ومرنة
لإنشاء مصنّفات مخصّصة لسياسة المحتوى من خلال ضبط النماذج، مثل Gemma،
لتلبية احتياجاتك. وتتيح لك أيضًا التحكّم الكامل في مكان
نشرها وطريقة نشرها.
يستخدم كلّ من الدرس التطبيقي والدليل التعليميLoRA لتحسين نموذج Gemma
لكي يعمل كأداة تصنيف لسياسة المحتوى باستخدام مكتبة KerasNLP
. باستخدام 200 مثال فقط من مجموعة بيانات EHOS،
حقّق المصنِّف نتيجة F1 تبلغ 0.80 ونتيجة RoC-AUC
من 0.78، والتي تقارن بشكل إيجابي بالأحدث
نتائج قوائم الصدارة وعند تدريبه على 800 مثال،
مثل المصنِّفات الأخرى على قائمة الصدارة، يمكن للمصنِّف الرشيق المستند إلى Gemma
حقّق نتيجة F1 بلغت 83.74 ودرجة ROC-AUC لـ 88.17. يمكنك تعديل تعليمات الدليل التمهيدي لتحسين هذا التصنيف بشكلٍ أكبر، أو لإنشاء تدابير حماية مخصّصة لنظام تصنيف الأمان.
تاريخ التعديل الأخير: 2024-10-23 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2024-10-23 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Agile Classifiers: Customized content policy classifiers\n\n\u003cbr /\u003e\n\n[Agile classifiers](https://arxiv.org/pdf/2302.06541.pdf) is an efficient and flexible method\nfor creating custom content policy classifiers by tuning models, such as Gemma,\nto fit your needs. They also allow you complete control over where and how they\nare deployed.\n\n**Gemma Agile Classifier Tutorials**\n\n|---|---------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Start Codelab](https://codelabs.developers.google.com/codelabs/responsible-ai/agile-classifiers) | [Start Google Colab](https://colab.research.google.com/github/google/generative-ai-docs/blob/main/site/en/gemma/docs/agile_classifiers.ipynb) |\n\n\u003cbr /\u003e\n\nThe [codelab](https://codelabs.developers.google.com/codelabs/responsible-ai/agile-classifiers) and\n[tutorial](/gemma/docs/agile_classifiers) use [LoRA](https://arxiv.org/abs/2106.09685) to fine-tune a Gemma\nmodel to act as a content policy classifier using the [KerasNLP](https://keras.io/keras_nlp/)\nlibrary. Using only 200 examples from the [ETHOS dataset](https://paperswithcode.com/dataset/ethos), this\nclassifier achieves an [F1 score](https://en.wikipedia.org/wiki/F-score) of 0.80 and [ROC-AUC score](https://developers.google.com/machine-learning/crash-course/classification/roc-and-auc#AUC)\nof 0.78, which compares favorably to state of the art\n[leaderboard results](https://paperswithcode.com/sota/hate-speech-detection-on-ethos-binary). When trained on the 800 examples,\nlike the other classifiers on the leaderboard, the Gemma-based agile classifier\nachieves an F1 score of 83.74 and a ROC-AUC score of 88.17. You can adapt the\ntutorial instructions to further refine this classifier, or to create your own\ncustom safety classifier safeguards."]]