طبقهبندیکنندههای چابک روشی کارآمد و انعطافپذیر برای ایجاد طبقهبندیهای خطمشی محتوای سفارشی با تنظیم مدلهایی مانند Gemma است که متناسب با نیازهای شما باشد. آنها همچنین به شما امکان کنترل کامل بر مکان و نحوه استقرار آنها را می دهند.
نرم افزار Codelab و آموزش از LoRA برای تنظیم دقیق مدل Gemma استفاده می کند تا به عنوان طبقه بندی خط مشی محتوا با استفاده از کتابخانه KerasNLP عمل کند. تنها با استفاده از 200 نمونه از مجموعه داده ETHOS ، این طبقهبندیکننده امتیاز F1 0.80 و ROC-AUC 0.78 را به دست میآورد که به طور مطلوبی با نتایج پیشرفته تابلوی برتر مقایسه میشود. هنگامی که بر روی 800 نمونه آموزش داده می شود، مانند سایر طبقه بندی کننده ها در تابلوی امتیازات، طبقه بندی کننده چابک مبتنی بر Gemma به امتیاز F1 83.74 و امتیاز ROC-AUC 88.17 دست می یابد. میتوانید دستورالعملهای آموزشی را برای اصلاح بیشتر این طبقهبندیکننده، یا ایجاد حفاظتهای طبقهبندیکننده ایمنی سفارشی خود تطبیق دهید.
تاریخ آخرین بهروزرسانی 2024-11-12 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-11-12 بهوقت ساعت هماهنگ جهانی."],[],[],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."]]