Sponsored by
Vmake Labs Video Enhancer
-Vmake Labs Video Enhancer uses AI to improve video quality, restore details, reduce blur, and upscale videos to 8K.
This is a classifier for judging the educational value of web pages. It was developed to filter and curate educational content from web datasets and was trained on 145k annotations generated by
Qwen2-72B-instruct
for web samples from
CCI3
dataset.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("BAAI/cci3-hq-classifier")
model = AutoModelForSequenceClassification.from_pretrained("BAAI/cci3-hq-classifier")
text = "曾巩:为人廉洁奉公,才华横溢,关心民间疾苦曾巩,字子固,是我国北宋时期著名的文学家,政治家和教育家。他的一生政绩颇丰,为百姓们做出了许多的好事,在文学创作上他又是北宋诗文革新的主要人物。他文章写得耐人寻味,表露了自己的真情实感。被后人称之为 唐宋八大家之一 。"
inputs = tokenizer(text, return_tensors="pt", padding="longest", truncation=True)
outputs = model(**inputs)
logits = outputs.logits.squeeze(-1).float().detach().numpy()
score = logits.item()
result = {
"text": text,
"score": score
}
print(result)
Training
The classifier was trained on 145,000 pairs of web samples and their scores from 0 to 5, generated by Qwen2. The samples were annotated based on their educational quality with 0 being not educational and 5 being highly educational.
We added a classification head with a single regression output to
BGE-M3
and trained the model for 20 epochs with a learning rate of 3e-4. During training, the embedding and encoder layers were frozen to focus on the classification head and dropout was not used. The model achieved an F1 score of 73% when converted to a binary classifier using a score threshold of 3.
Training Details:
Model: BGE-M3 with a classification head
Dataset: 145,000 samples from Qwen2 annotations
Epochs: 20
Learning Rate: 3e-4
Evaluation Metric: F1 score
Classification report
We treat the regression model's predictions as discrete classes to calculate the metrics on a hold-out set of 1500 Qwen2-annotated samples.
While the CCI3-HQ classifier performs well in distinguishing high-quality educational content for CCI3 dataset, there are some limitations:
Scope
: The model's performance may vary across different datasets, particularly when applied to out-of-distribution samples. It is specifically designed to handle educational content related to primary and grade school levels and may exhibit lower performance on content intended for higher education or specialized domains.
Bias
: The model's performance relies on the quality and representativeness of both the training data and the LLM used for annotation. Biases in either can influence the classifier's decisions. There is a risk of overfitting to content that appears more academic, leading to higher scores. We recommend using an
int_score >= 3
as a threshold for data curation.
Context
: The classifier operates by evaluating individual web pages or extracts without considering the broader context, which may limit its effectiveness in certain scenarios.
CCI3-HQ-Classifier huggingface.co is an AI model on huggingface.co that provides CCI3-HQ-Classifier's model effect (), which can be used instantly with this BAAI CCI3-HQ-Classifier model. huggingface.co supports a free trial of the CCI3-HQ-Classifier model, and also provides paid use of the CCI3-HQ-Classifier. Support call CCI3-HQ-Classifier model through api, including Node.js, Python, http.
CCI3-HQ-Classifier huggingface.co is an online trial and call api platform, which integrates CCI3-HQ-Classifier's modeling effects, including api services, and provides a free online trial of CCI3-HQ-Classifier, you can try CCI3-HQ-Classifier online for free by clicking the link below.
BAAI CCI3-HQ-Classifier online free url in huggingface.co:
CCI3-HQ-Classifier is an open source model from GitHub that offers a free installation service, and any user can find CCI3-HQ-Classifier on GitHub to install. At the same time, huggingface.co provides the effect of CCI3-HQ-Classifier install, users can directly use CCI3-HQ-Classifier installed effect in huggingface.co for debugging and trial. It also supports api for free installation.