Text Classification
Transformers
Safetensors
code
bert
Generated from Trainer
text-embeddings-inference
Run this model with HF Jobs
Run HuggingFaceTB/stack-edu-classifier-rust 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-rust. 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-rust 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-rust with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HuggingFaceTB/stack-edu-classifier-rust with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="HuggingFaceTB/stack-edu-classifier-rust")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("HuggingFaceTB/stack-edu-classifier-rust") model = AutoModelForSequenceClassification.from_pretrained("HuggingFaceTB/stack-edu-classifier-rust", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files68 unmodified lines69707172737475767778798068 unmodified lines- Accuracy: 0.5715- F1 Binary Minimum3: 0.6938While 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.55 and 0.70. With the Highest being Python, C, Rust and the lowest being TypeScript and PHP.<div style="display: flex; justify-content: center; gap: 20px;"><img src="https://cdn-uploads.huggingface.co/production/uploads/61c141342aac764ce1654e43/z0lCnH2nqYMu09JsxPvFb.png" width="600"><img src="https://cdn-uploads.huggingface.co/production/uploads/61c141342aac764ce1654e43/W6BQO6Rkafpj-96fWdCOv.png" width="600"></div>We validated these classifiers by filtering Stack v2 data and testing on an intermediate SmolLM2 checkpoint. Filtering with a threshold of 3 improved performance across most languages while maintaining adequate data volume, though Java showed better results with a threshold of 2.### Training hyperparameters68 unmodified lines697071727374757677787980818268 unmodified lines- Accuracy: 0.5715- F1 Binary Minimum3: 0.6938While 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.<div style="display: flex; justify-content: center; gap: 20px;"><img src="https://cdn-uploads.huggingface.co/production/uploads/61c141342aac764ce1654e43/VYh1deFc8Jif7B4kDpndc.png" width="600"><img src="https://cdn-uploads.huggingface.co/production/uploads/61c141342aac764ce1654e43/I_O96PgYAZ9pj27lM4B9a.png" width="600"></div>We validated these classifiers by filtering Stack v2 data and testing on an intermediate SmolLM2 checkpoint. Filtering with a threshold of 3 improved performance across most languages while maintaining adequate data volume, though Java showed better results with a threshold of 2.### Training hyperparameters
README.md+5-3