Text Classification
Transformers
ONNX
Safetensors
English
bert
political-discourse
media-bias
wording
contextual-review
text-embeddings-inference
Instructions to use Giuliocc/doxa-wording-encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Giuliocc/doxa-wording-encoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Giuliocc/doxa-wording-encoder")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Giuliocc/doxa-wording-encoder") model = AutoModelForSequenceClassification.from_pretrained("Giuliocc/doxa-wording-encoder", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download EVALUATION.json from Giuliocc/doxa-wording-encoder: direct link, hf CLI and curl.
- Browser
- Download file 7.76 kB
-
https://huggingface.co/Giuliocc/doxa-wording-encoder/resolve/main/EVALUATION.json
- Command line
-
hf download hf://Giuliocc/doxa-wording-encoder/EVALUATION.json
-
curl -L -o EVALUATION.json https://huggingface.co/Giuliocc/doxa-wording-encoder/resolve/main/EVALUATION.json
7.76 kB
| { | |
| "method": "doxa-wording-minilm-v1", | |
| "base_model": "sentence-transformers/all-MiniLM-L6-v2", | |
| "base_revision": "1110a243fdf4706b3f48f1d95db1a4f5529b4d41", | |
| "data_lock": { | |
| "train": { | |
| "sha256": "1f05fb713ae688050d19e0bc8a51425d4557a675e6a81e601f65e21edfd70a1a", | |
| "rows": 2950 | |
| }, | |
| "validation": { | |
| "sha256": "a2e9c240e3c35e6e80a8ff137d2b51b5c25abb2ecd221cc000492443dd7d7867", | |
| "rows": 305 | |
| }, | |
| "test": { | |
| "sha256": "2414ce46d8bcc89bcecd3ae1b62a9f123efb958e1d29e29304904266cf044503", | |
| "rows": 384 | |
| }, | |
| "registration_sha256": "45fd0d26b7c78ec5963e396bfe3b9a42b087e90eaeaeb7855fa9c26db70412b2", | |
| "amendment_1_sha256": "2d42761f95fce054a9b8d855daf8d0d6536c8fc8426b9e779782d02d57cb3d65", | |
| "export_plan_sha256": "01f6c4e3cc7e65fcb0075bbeb8a2c75949aece7e3a688fc99126cd7d1817fc81" | |
| }, | |
| "selected": { | |
| "learning_rate": 5e-05, | |
| "epoch": 2, | |
| "training_loss": 0.41341936366783605, | |
| "validation": { | |
| "rows": 305, | |
| "macro_f1": 0.8229336888277285, | |
| "accuracy": 0.8229508196721311, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.8211920529801324, | |
| "biased_wording": 0.8246753246753247 | |
| } | |
| }, | |
| "seconds": 137.1762949979966 | |
| }, | |
| "task": "BABE expert-majority biased wording", | |
| "controls": { | |
| "word_tfidf": { | |
| "rows": 384, | |
| "macro_f1": 0.7159898218829517, | |
| "accuracy": 0.7161458333333334, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.72264631043257, | |
| "biased_wording": 0.7093333333333334 | |
| }, | |
| "brier": 0.19246645928220488, | |
| "negative_log_likelihood": 0.5697521581666226, | |
| "ece_10_bins": 0.0814620590407955 | |
| }, | |
| "character_tfidf": { | |
| "rows": 384, | |
| "macro_f1": 0.7419757695048699, | |
| "accuracy": 0.7421875, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.7493670886075949, | |
| "biased_wording": 0.7345844504021448 | |
| }, | |
| "brier": 0.18585864126645837, | |
| "negative_log_likelihood": 0.5550111947496307, | |
| "ece_10_bins": 0.09102536020312302 | |
| }, | |
| "word_character_tfidf": { | |
| "rows": 384, | |
| "macro_f1": 0.7238384715588363, | |
| "accuracy": 0.7239583333333334, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.7295918367346939, | |
| "biased_wording": 0.7180851063829787 | |
| }, | |
| "brier": 0.21733227446387757, | |
| "negative_log_likelihood": 0.6267828220542433, | |
| "ece_10_bins": 0.16465610375061493 | |
| }, | |
| "frozen_encoder_logistic": { | |
| "rows": 384, | |
| "macro_f1": 0.7445421961550993, | |
| "accuracy": 0.7447916666666666, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.7525252525252525, | |
| "biased_wording": 0.7365591397849462 | |
| }, | |
| "brier": 0.16402433400378166, | |
| "negative_log_likelihood": 0.4974819584565702, | |
| "ece_10_bins": 0.05917165347978995 | |
| }, | |
| "doxa_framing_control": { | |
| "rows": 384, | |
| "macro_f1": 0.4977164278354659, | |
| "accuracy": 0.5338541666666666, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.6324435318275154, | |
| "biased_wording": 0.36298932384341637 | |
| }, | |
| "brier": 0.24987336185987877, | |
| "negative_log_likelihood": 0.6928939034259424, | |
| "ece_10_bins": 0.03207113093768732, | |
| "original_decisions": { | |
| "absent": 245, | |
| "insufficient_context": 73, | |
| "present": 66 | |
| } | |
| } | |
| }, | |
| "candidate": { | |
| "rows": 384, | |
| "macro_f1": 0.7886482703323435, | |
| "accuracy": 0.7890625, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.7980049875311721, | |
| "biased_wording": 0.779291553133515 | |
| }, | |
| "brier": 0.16015382667000752, | |
| "negative_log_likelihood": 0.49328099639482326, | |
| "ece_10_bins": 0.07816794825096926, | |
| "resolved_coverage": 0.828125, | |
| "resolved_macro_f1": 0.82696017808558 | |
| }, | |
| "selected_pipeline": "fine_tuned_encoder", | |
| "contextual_validation": { | |
| "fine_tuned_encoder": { | |
| "rows": 305, | |
| "macro_f1": 0.8229336888277285, | |
| "accuracy": 0.8229508196721311, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.8211920529801324, | |
| "biased_wording": 0.8246753246753247 | |
| } | |
| }, | |
| "frozen_encoder_logistic": { | |
| "rows": 305, | |
| "macro_f1": 0.7867385247576941, | |
| "accuracy": 0.7868852459016393, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.7811447811447811, | |
| "biased_wording": 0.792332268370607 | |
| } | |
| } | |
| }, | |
| "test_input_limits": { | |
| "maximum_tokens": 256, | |
| "within_limit": 384, | |
| "exceeds_limit": 0, | |
| "maximum_observed_tokens": 103 | |
| }, | |
| "strongest_control": "character_tfidf", | |
| "macro_f1_gain": 0.04667250082747365, | |
| "bootstrap": { | |
| "unit": "article_group", | |
| "groups": 227, | |
| "draws": 2000, | |
| "gain_interval_95": [ | |
| 0.0027218200550942345, | |
| 0.09238916178767137 | |
| ] | |
| }, | |
| "quantized": { | |
| "rows": 384, | |
| "macro_f1": 0.7835238502760967, | |
| "accuracy": 0.7838541666666666, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.7919799498746867, | |
| "biased_wording": 0.7750677506775068 | |
| }, | |
| "brier": 0.16296000575569328, | |
| "negative_log_likelihood": 0.5014788136309872, | |
| "ece_10_bins": 0.07855109777301551, | |
| "resolved_coverage": 0.84375, | |
| "resolved_macro_f1": 0.8178161960219963 | |
| }, | |
| "native_quantized_agreement": 0.9895833333333334, | |
| "quantized_bytes": 23157564, | |
| "release_gate": { | |
| "native": true, | |
| "quantized": true, | |
| "size": true, | |
| "passed": true | |
| }, | |
| "new_spend_usd": 0, | |
| "contextual_test": { | |
| "fine_tuned_encoder": { | |
| "rows": 384, | |
| "macro_f1": 0.7886482703323435, | |
| "accuracy": 0.7890625, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.7980049875311721, | |
| "biased_wording": 0.779291553133515 | |
| }, | |
| "brier": 0.16015382667000752, | |
| "negative_log_likelihood": 0.49328099639482326, | |
| "ece_10_bins": 0.07816794825096926, | |
| "resolved_coverage": 0.828125, | |
| "resolved_macro_f1": 0.82696017808558 | |
| }, | |
| "frozen_encoder_logistic": { | |
| "rows": 384, | |
| "macro_f1": 0.7445421961550993, | |
| "accuracy": 0.7447916666666666, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.7525252525252525, | |
| "biased_wording": 0.7365591397849462 | |
| }, | |
| "brier": 0.16402433505727124, | |
| "negative_log_likelihood": 0.497481964507352, | |
| "ece_10_bins": 0.059171638141075775 | |
| } | |
| }, | |
| "fine_tuning_gain_over_frozen": 0.044106074177244214, | |
| "quantized_batch_size": 1, | |
| "quantized_macro_f1_gain": 0.04154808077122685, | |
| "quantized_bootstrap": { | |
| "unit": "article_group", | |
| "groups": 227, | |
| "draws": 2000, | |
| "gain_interval_95": [ | |
| -0.0043714321046402155, | |
| 0.08853098281291114 | |
| ] | |
| }, | |
| "export_repair": { | |
| "plan_sha256": "c750910939855b368a842e2ea980110b70cffbecadfc5ba227d53864bedde168", | |
| "selected_settings": { | |
| "name": "per_channel_1-reduce_range_1", | |
| "per_channel": true, | |
| "reduce_range": true, | |
| "validation": { | |
| "rows": 305, | |
| "macro_f1": 0.8131067178379077, | |
| "accuracy": 0.8131147540983606, | |
| "per_class_f1": { | |
| "no_biased_wording": 0.8118811881188119, | |
| "biased_wording": 0.8143322475570033 | |
| } | |
| }, | |
| "native_agreement": 0.9836065573770492, | |
| "probability_mae": 0.014533568173646927, | |
| "batch_16_native_agreement": 0.9836065573770492, | |
| "singleton_batch16_agreement": 0.9868852459016394, | |
| "bytes": 23157564, | |
| "sha256": "cb6dd5d63b6ed2f28c142141c263e3a29deb88289ad4dab50f7584a7c7b27d48", | |
| "eligible": true | |
| }, | |
| "selection_used_test": false, | |
| "timing": "Export engineering followed initial held-out native/export measurement; learned weights and calibration stayed locked." | |
| }, | |
| "benchmark_release": { | |
| "id": "Giuliocc/doxa-wording-benchmark", | |
| "revision": "bea9a3f2d53b03069b0d814094ea860d75f1c322" | |
| } | |
| } | |