PyTorch bilan foydalanish uchun BERT til modelini pythonga import qilishning eng oson usuli - BERTni oldindan o'qitish, xulosa qilish va joylashtirish usullari o'rnatilgan Hugging Face Transformer kutubxonasi. ``` transformatorlardan import AutoTokenizer, BertModel import to'g'ri tokenizer = AutoTokenizer.from_pretrained ((("bert-base-uncased") model = BertModel.from_pretrained ((("bert-base-uncased") kirish = ((tokenizer"Salom, mening itim yoqimli", return_tensors="pt") chiqish = model (((** kirish) so'nggi_qopilgan_states = chiqish._so'nggi_qopilgan_states ``` model
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence