Buning o'rniga quyidagilarni sinab ko'ring: transformatorlardan mash'ala import qiling import BertTokenizer, BertModel # BERT tokenizerni yuklang tokenizer = BertTokenizer.from_pretrained('bert-base-uncased') # Matnli kirishni kodlang input_ids = torch.tensor(tokenizer.encode("Salom, mening itim yoqimli", add_special_tokens=True)).unsqueeze(0) # To'plam hajmi 1 # BERT modelini yuklang = BertModel.from_(pretrained'bert-base-uncased') # Modelni baholash rejimida qo'ying.eval) # Mash'ala bilan har bir qatlam uchun yashirin holatlarni taxmin qiling model.no_): outputs = model(ingrad_ids) last_hid
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence