Công cụ phân loại linh hoạt: Các thuật toán phân loại theo chính sách nội dung tuỳ chỉnh
Thuật toán phân loại linh hoạt là một phương thức hiệu quả và linh hoạt
để tạo các thuật toán phân loại chính sách nội dung tuỳ chỉnh bằng cách điều chỉnh các mô hình như Gemma,
cho phù hợp với nhu cầu của bạn. Chúng cũng cho phép bạn kiểm soát hoàn toàn địa điểm và cách thức
được triển khai.
codelab và
hướng dẫn sử dụng LoRA để tinh chỉnh Gemma
đóng vai trò là thuật toán phân loại chính sách nội dung bằng KerasNLP
thư viện của bạn. Chỉ sử dụng 200 ví dụ trong tập dữ liệu ETHOS, bộ phân loại này đạt được điểm F1 là 0,80 và điểm ROC-AUC là 0,78, so với kết quả bảng xếp hạng hiện đại. Khi được huấn luyện trên 800 ví dụ, giống như các thuật toán phân loại khác trên bảng xếp hạng, thuật toán phân loại linh hoạt dựa trên Gemma đạt được điểm F1 là 83,74 và điểm ROC-AUC là 88,17. Bạn có thể điều chỉnh
các hướng dẫn để tinh chỉnh thêm thuật toán phân loại này hoặc tự tạo thuật toán phân loại
các biện pháp bảo vệ thuật toán phân loại an toàn tuỳ chỉnh.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2024-10-23 UTC."],[],[],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."]]