Text Classification
Transformers
PyTorch
Safetensors
English
marketing_classifier
feature-extraction
fineweb
marketing
content-filtering
data-curation
gemma
embedding
custom_code
Instructions to use marketeam/Fineweb-Classifier-Marketing with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use marketeam/Fineweb-Classifier-Marketing with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="marketeam/Fineweb-Classifier-Marketing", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("marketeam/Fineweb-Classifier-Marketing", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
| """ | |
| Shared score-rounding helper. | |
| Used by both annotation/annotate.py (Stage 2 aggregation) and | |
| classification/infer.py (Stage 4 inference) to compute the `int_score` | |
| column: round(clip(score, 0, 5)) -> integer 0-5, for FineWeb-EDU | |
| backwards compatibility. | |
| """ | |
| def clip_round_score(score: float) -> int: | |
| """round(clip(score, 0, 5)) -> integer 0-5. Uses Python's banker's rounding.""" | |
| return int(round(max(0.0, min(5.0, float(score))))) | |