Views
No views yet
| Model | Test MSE Loss |
|---|---|
| Qwen2.5-1.5B | 0.00226 |
| Qwen2.5-3B | 0.00209 |
pip install transformers torch1from transformers import AutoModelForSequenceClassification, AutoTokenizer
2import torch
3
4# Load model and tokenizer
5model_name = "OpenSQZ/Qwen2.5-1.5B-Classifier" # or Qwen2.5-3B-Quality-Classifier
6model = AutoModelForSequenceClassification.from_pretrained(model_name)
7tokenizer = AutoTokenizer.from_pretrained(model_name)
8
9# Predict quality score
10text = "Linear algebra is fundamental to understanding vector spaces and matrix operations in mathematics."
11inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=8192)
12
13with torch.no_grad():
14 outputs = model(**inputs)
15 score = torch.sigmoid(outputs.logits).item()
16
17print(f"Quality Score: {score:.3f}") # Output: Quality Score: 0.847| Score Range | Quality Level | Use Case |
|---|---|---|
| 0.8 - 1.0 | Excellent | Premium training data |
| 0.6 - 0.8 | Good | Standard training data |
| 0.4 - 0.6 | Average | Conditional use |
| 0.0 - 0.4 | Poor | Filter out |
1@model{qwen25_quality_classifier_2025,
2 title={Qwen2.5 Text Quality Classifier},
3 author={Chao Li, Yifan Zhang},
4 year={2025},
5 publisher={OpenSQZ}
6}