Kazakh sentiment analysis model fine-tuned for 5-class sentiment classification.
This model is based on bert-base-multilingual-cased and fine-tuned for sentiment classification of Kazakh text into five classes:
from transformers import pipeline
classifier = pipeline("text-classification", model="Darmm/sentiment-kk")
text = "Бұл фильм маған ұнамады"
print(classifier(text))
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "Darmm/sentiment-kk"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
text = "Бұл фильм маған ұнамады"
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
predicted_class = torch.argmax(predictions, dim=-1).item()
labels = ["very_negative", "negative", "neutral", "positive", "very_positive"]
print(f"Predicted: {labels[predicted_class]}")
print(f"Confidence: {predictions[0][predicted_class].item():.2%}")
The model was trained on the Darmm/darmm-sentiment-kk dataset with the following parameters:
bert-base-multilingual-cased{
"eval_loss": 0.02658640407025814,
"eval_accuracy": 0.9969512195121951,
"eval_runtime": 0.544,
"eval_samples_per_second": 602.947,
"eval_steps_per_second": 38.603,
"epoch": 3.0
}
We present a Kazakh sentiment classification model based on bert-base-multilingual-cased, fine‑tuned on the Darmm/darmm-sentiment-kk dataset. The model predicts five sentiment classes and achieves high accuracy on the evaluation split.
Darmm/darmm-sentiment-kkbert-base-multilingual-casedБұл модель bert-base-multilingual-cased негізінде Darmm/darmm-sentiment-kk деректерінде оқытылып, қазақ тіліндегі 5 классты sentiment жіктеуін орындайды.
Darmm/darmm-sentiment-kkbert-base-multilingual-casedМодель на базе bert-base-multilingual-cased, дообученная на Darmm/darmm-sentiment-kk для 5‑классовой классификации тональности казахского текста.
Darmm/darmm-sentiment-kkbert-base-multilingual-casedKazakh sentiment analysis model fine-tuned for 5-class sentiment classification.
This model is based on bert-base-multilingual-cased and fine-tuned for sentiment classification of Kazakh text into five classes:
from transformers import pipeline
classifier = pipeline("text-classification", model="Darmm/sentiment-kk")
text = "Бұл фильм маған ұнамады"
print(classifier(text))
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
model_name = "Darmm/sentiment-kk"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForSequenceClassification.from_pretrained(model_name)
text = "Бұл фильм маған ұнамады"
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)
with torch.no_grad():
outputs = model(**inputs)
predictions = torch.nn.functional.softmax(outputs.logits, dim=-1)
predicted_class = torch.argmax(predictions, dim=-1).item()
labels = ["very_negative", "negative", "neutral", "positive", "very_positive"]
print(f"Predicted: {labels[predicted_class]}")
print(f"Confidence: {predictions[0][predicted_class].item():.2%}")
The model was trained on the Darmm/darmm-sentiment-kk dataset with the following parameters:
bert-base-multilingual-cased{
"eval_loss": 0.02658640407025814,
"eval_accuracy": 0.9969512195121951,
"eval_runtime": 0.544,
"eval_samples_per_second": 602.947,
"eval_steps_per_second": 38.603,
"epoch": 3.0
}
We present a Kazakh sentiment classification model based on bert-base-multilingual-cased, fine‑tuned on the Darmm/darmm-sentiment-kk dataset. The model predicts five sentiment classes and achieves high accuracy on the evaluation split.
Darmm/darmm-sentiment-kkbert-base-multilingual-casedБұл модель bert-base-multilingual-cased негізінде Darmm/darmm-sentiment-kk деректерінде оқытылып, қазақ тіліндегі 5 классты sentiment жіктеуін орындайды.
Darmm/darmm-sentiment-kkbert-base-multilingual-casedМодель на базе bert-base-multilingual-cased, дообученная на Darmm/darmm-sentiment-kk для 5‑классовой классификации тональности казахского текста.
Darmm/darmm-sentiment-kkbert-base-multilingual-cased