Bu yerda maskalangan so'zni bashorat qilish uchun yuklangan BERT modelini qanday ishlatishning misoli keltirilgan: ```python # Birinchidan, siz kirish matnini tayyorlab, uni tensor matniga aylantirishingiz kerak = "[CLS] Bu maskalangan [MASK] so'zi bilan jumlad. " input_ids = torch.tensor(tokenizer.encode.text)).unsqueeze(0) # Kirish tensorini GPU-ga ko'chiring, agar mavjud bo'lsa, agar torch.cuda.is_available: input_ids = input_ids.cuda) # Maskalangan so'zni bashorat qiling torch.no_grad: model = {input_ids) predicted_token = torch.argmax.outputs{0}, input_ids{0}toolist {10
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence