Text Classification
Transformers
Safetensors
code
bert
Generated from Trainer
text-embeddings-inference
Run this model with HF Jobs
Run HuggingFaceTB/stack-edu-classifier-markdown on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/HuggingFaceTB/stack-edu-classifier-markdown. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/HuggingFaceTB/stack-edu-classifier-markdown on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use HuggingFaceTB/stack-edu-classifier-markdown with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceTB/stack-edu-classifier-markdown with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="HuggingFaceTB/stack-edu-classifier-markdown")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/stack-edu-classifier-markdown") model = AutoModelForSequenceClassification.from_pretrained("HuggingFaceTB/stack-edu-classifier-markdown", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files59 unmodified lines6061626364656667686970717259 unmodified linesWe added a classification head with a single regression output to StarEncoder 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.It achieves the following results on the evaluation set:- Loss: 0.4719- Precision: 0.6074- Recall: 0.4618- F1 Macro: 0.4864- Accuracy: 0.5478- F1 Binary Minimum3: 0.8854- F1 Binary Minimum2: 0.9418While the macro F1 scores across the 1-5 rating scale are relatively low due to the model's difficulty in distinguishing between higher-rated samples, the classifier performs well for our primary filtering task. When converting to binary classification, using a threshold of 2 achieves the F1 scores ranges between 0.8 and 0.9 for most Stack-Edu classifiers, whereas a threshold of 3 yields F1 scores between 0.5 and 0.8. With the Highest being Python, SQL, C, Rust and the lowest being TypeScript and PHP.59 unmodified lines6061626364656667686970717259 unmodified linesWe added a classification head with a single regression output to StarEncoder 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.It achieves the following results on the evaluation set:- Loss: 0.3043- Precision: 0.6007- Recall: 0.5268- F1 Macro: 0.5255- Accuracy: 0.6694- F1 Binary Minimum3: 0.8552- F1 Binary Minimum2: 0.9316While the macro F1 scores across the 1-5 rating scale are relatively low due to the model's difficulty in distinguishing between higher-rated samples, the classifier performs well for our primary filtering task. When converting to binary classification, using a threshold of 2 achieves the F1 scores ranges between 0.8 and 0.9 for most Stack-Edu classifiers, whereas a threshold of 3 yields F1 scores between 0.5 and 0.8. With the Highest being Python, SQL, C, Rust and the lowest being TypeScript and PHP.
README.md+7-7