Text Classification
Transformers
Joblib
Safetensors
multilingual
binary-classification
amis
agriculture
Instructions to use faodl/agri-production-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use faodl/agri-production-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="faodl/agri-production-classifier")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("faodl/agri-production-classifier", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "created_at": "2026-05-19T18:39:45.207640+00:00", | |
| "config": { | |
| "hf_dataset": "faodl/amis-agri-production-v03", | |
| "hf_subset": null, | |
| "train_split": "train", | |
| "validation_split": "validation", | |
| "test_split": "test", | |
| "text_col": "chunk_text", | |
| "label_col": "label", | |
| "group_col": "id", | |
| "id_col": "chunk_id", | |
| "model_name": "FacebookAI/xlm-roberta-base", | |
| "output_dir": "/content/agri-production-classifier", | |
| "max_length": 256, | |
| "learning_rate": 2e-05, | |
| "weight_decay": 0.01, | |
| "num_train_epochs": 5.0, | |
| "per_device_train_batch_size": 16, | |
| "per_device_eval_batch_size": 32, | |
| "gradient_accumulation_steps": 1, | |
| "warmup_ratio": 0.1, | |
| "early_stopping_patience": 2, | |
| "seed": 42, | |
| "metric_for_best_model": "f1", | |
| "skip_transformer": false, | |
| "skip_baselines": false, | |
| "baseline_models": [ | |
| "logistic", | |
| "xgboost", | |
| "embedding-logistic", | |
| "embedding-svm", | |
| "embedding-lightgbm" | |
| ], | |
| "tfidf_max_features": 50000, | |
| "embedding_model_name": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", | |
| "embedding_batch_size": 64, | |
| "positive_label_name": "RELEVANT", | |
| "negative_label_name": "NOT_RELEVANT", | |
| "push_to_hub": true, | |
| "hub_model_id": "faodl/agri-production-classifier", | |
| "hub_private_repo": false | |
| }, | |
| "dataset_summary": { | |
| "train": { | |
| "rows": 5937, | |
| "labels": { | |
| "0": 4830, | |
| "1": 1107 | |
| }, | |
| "unique_groups": null, | |
| "text_length_mean": 670.8157318511032, | |
| "text_length_median": 526.0 | |
| }, | |
| "validation": { | |
| "rows": 1280, | |
| "labels": { | |
| "0": 1011, | |
| "1": 269 | |
| }, | |
| "unique_groups": null, | |
| "text_length_mean": 678.05, | |
| "text_length_median": 513.0 | |
| }, | |
| "test": { | |
| "rows": 1388, | |
| "labels": { | |
| "0": 1106, | |
| "1": 282 | |
| }, | |
| "unique_groups": null, | |
| "text_length_mean": 659.2327089337176, | |
| "text_length_median": 517.5 | |
| } | |
| }, | |
| "results": [ | |
| { | |
| "model_type": "logistic_tfidf", | |
| "model_name": "logistic", | |
| "artifact_dir": "/content/agri-production-classifier/baselines/logistic", | |
| "artifact_file": "/content/agri-production-classifier/baselines/logistic/logistic_tfidf.joblib", | |
| "validation_best_threshold": { | |
| "threshold": 0.47902895736910023, | |
| "f1": 0.7775831873905429, | |
| "precision": 0.7350993377483444, | |
| "recall": 0.8252788104089219 | |
| }, | |
| "test_default_0_5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.899135446685879, | |
| "precision": 0.7414965986394558, | |
| "recall": 0.7730496453900709, | |
| "f1": 0.7569444444444444, | |
| "confusion_matrix": [ | |
| [ | |
| 1030, | |
| 76 | |
| ], | |
| [ | |
| 64, | |
| 218 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.9414990859232175, | |
| "recall": 0.9312839059674503, | |
| "f1-score": 0.9363636363636364, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.7414965986394558, | |
| "recall": 0.7730496453900709, | |
| "f1-score": 0.7569444444444444, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.899135446685879, | |
| "macro avg": { | |
| "precision": 0.8414978422813366, | |
| "recall": 0.8521667756787605, | |
| "f1-score": 0.8466540404040404, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.9008645748180151, | |
| "recall": 0.899135446685879, | |
| "f1-score": 0.8999110339708323, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.9343298321213753, | |
| "average_precision": 0.8131443889860821 | |
| }, | |
| "test_optimal_threshold": { | |
| "threshold": 0.47902895736910023, | |
| "accuracy": 0.8969740634005764, | |
| "precision": 0.7293729372937293, | |
| "recall": 0.7836879432624113, | |
| "f1": 0.7555555555555555, | |
| "confusion_matrix": [ | |
| [ | |
| 1024, | |
| 82 | |
| ], | |
| [ | |
| 61, | |
| 221 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.943778801843318, | |
| "recall": 0.9258589511754068, | |
| "f1-score": 0.9347329986307622, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.7293729372937293, | |
| "recall": 0.7836879432624113, | |
| "f1-score": 0.7555555555555555, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.8969740634005764, | |
| "macro avg": { | |
| "precision": 0.8365758695685237, | |
| "recall": 0.854773447218909, | |
| "f1-score": 0.8451442770931589, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.9002179561639346, | |
| "recall": 0.8969740634005764, | |
| "f1-score": 0.8983295123575573, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.9343298321213753, | |
| "average_precision": 0.8131443889860821 | |
| } | |
| }, | |
| { | |
| "model_type": "xgboost_tfidf", | |
| "model_name": "xgboost", | |
| "artifact_dir": "/content/agri-production-classifier/baselines/xgboost", | |
| "artifact_file": "/content/agri-production-classifier/baselines/xgboost/xgboost_tfidf.joblib", | |
| "validation_best_threshold": { | |
| "threshold": 0.19665858149528503, | |
| "f1": 0.7173144876325089, | |
| "precision": 0.6835016835016835, | |
| "recall": 0.7546468401486989 | |
| }, | |
| "test_default_0_5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.8976945244956772, | |
| "precision": 0.8723404255319149, | |
| "recall": 0.5815602836879432, | |
| "f1": 0.6978723404255319, | |
| "confusion_matrix": [ | |
| [ | |
| 1082, | |
| 24 | |
| ], | |
| [ | |
| 118, | |
| 164 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.9016666666666666, | |
| "recall": 0.9783001808318263, | |
| "f1-score": 0.9384215091066782, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.8723404255319149, | |
| "recall": 0.5815602836879432, | |
| "f1-score": 0.6978723404255319, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.8976945244956772, | |
| "macro avg": { | |
| "precision": 0.8870035460992908, | |
| "recall": 0.7799302322598848, | |
| "f1-score": 0.8181469247661051, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.8957084534101826, | |
| "recall": 0.8976945244956772, | |
| "f1-score": 0.889549127573477, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.9163893270747566, | |
| "average_precision": 0.7909075826875256 | |
| }, | |
| "test_optimal_threshold": { | |
| "threshold": 0.19665858149528503, | |
| "accuracy": 0.8782420749279539, | |
| "precision": 0.6738461538461539, | |
| "recall": 0.776595744680851, | |
| "f1": 0.7215815485996705, | |
| "confusion_matrix": [ | |
| [ | |
| 1000, | |
| 106 | |
| ], | |
| [ | |
| 63, | |
| 219 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.940733772342427, | |
| "recall": 0.9041591320072333, | |
| "f1-score": 0.9220839096357769, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.6738461538461539, | |
| "recall": 0.776595744680851, | |
| "f1-score": 0.7215815485996705, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.8782420749279539, | |
| "macro avg": { | |
| "precision": 0.8072899630942905, | |
| "recall": 0.8403774383440421, | |
| "f1-score": 0.8218327291177236, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.8865102072012533, | |
| "recall": 0.8782420749279539, | |
| "f1-score": 0.8813478391659052, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.9163893270747566, | |
| "average_precision": 0.7909075826875256 | |
| } | |
| }, | |
| { | |
| "model_type": "embedding-logistic_sentence_embeddings", | |
| "model_name": "logistic", | |
| "embedding_model_name": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", | |
| "artifact_dir": "/content/agri-production-classifier/baselines/embedding-logistic", | |
| "artifact_file": "/content/agri-production-classifier/baselines/embedding-logistic/embedding-logistic.joblib", | |
| "validation_best_threshold": { | |
| "threshold": 0.504836451018676, | |
| "f1": 0.7974481658692185, | |
| "precision": 0.6983240223463687, | |
| "recall": 0.929368029739777 | |
| }, | |
| "test_default_0_5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.8796829971181557, | |
| "precision": 0.6455696202531646, | |
| "recall": 0.9042553191489362, | |
| "f1": 0.7533234859675036, | |
| "confusion_matrix": [ | |
| [ | |
| 966, | |
| 140 | |
| ], | |
| [ | |
| 27, | |
| 255 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.972809667673716, | |
| "recall": 0.8734177215189873, | |
| "f1-score": 0.920438303954264, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.6455696202531646, | |
| "recall": 0.9042553191489362, | |
| "f1-score": 0.7533234859675036, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.8796829971181557, | |
| "macro avg": { | |
| "precision": 0.8091896439634403, | |
| "recall": 0.8888365203339618, | |
| "f1-score": 0.8368808949608838, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.9063242978087336, | |
| "recall": 0.8796829971181557, | |
| "f1-score": 0.8864855815679049, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.9491618893719621, | |
| "average_precision": 0.8123161283338098 | |
| }, | |
| "test_optimal_threshold": { | |
| "threshold": 0.504836451018676, | |
| "accuracy": 0.8804034582132565, | |
| "precision": 0.6472081218274112, | |
| "recall": 0.9042553191489362, | |
| "f1": 0.7544378698224852, | |
| "confusion_matrix": [ | |
| [ | |
| 967, | |
| 139 | |
| ], | |
| [ | |
| 27, | |
| 255 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.9728370221327968, | |
| "recall": 0.8743218806509946, | |
| "f1-score": 0.920952380952381, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.6472081218274112, | |
| "recall": 0.9042553191489362, | |
| "f1-score": 0.7544378698224852, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.8804034582132565, | |
| "macro avg": { | |
| "precision": 0.810022571980104, | |
| "recall": 0.8892885998999653, | |
| "f1-score": 0.8376951253874331, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.9066789890736334, | |
| "recall": 0.8804034582132565, | |
| "f1-score": 0.887121622927431, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.9491618893719621, | |
| "average_precision": 0.8123161283338098 | |
| } | |
| }, | |
| { | |
| "model_type": "embedding-svm_sentence_embeddings", | |
| "model_name": "svm", | |
| "embedding_model_name": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", | |
| "artifact_dir": "/content/agri-production-classifier/baselines/embedding-svm", | |
| "artifact_file": "/content/agri-production-classifier/baselines/embedding-svm/embedding-svm.joblib", | |
| "validation_best_threshold": { | |
| "threshold": 0.26135853709254125, | |
| "f1": 0.7848932676518883, | |
| "precision": 0.7029411764705882, | |
| "recall": 0.8884758364312267 | |
| }, | |
| "test_default_0_5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.8847262247838616, | |
| "precision": 0.7276119402985075, | |
| "recall": 0.6914893617021277, | |
| "f1": 0.7090909090909091, | |
| "confusion_matrix": [ | |
| [ | |
| 1033, | |
| 73 | |
| ], | |
| [ | |
| 87, | |
| 195 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.9223214285714286, | |
| "recall": 0.933996383363472, | |
| "f1-score": 0.9281221922731356, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.7276119402985075, | |
| "recall": 0.6914893617021277, | |
| "f1-score": 0.7090909090909091, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.8847262247838616, | |
| "macro avg": { | |
| "precision": 0.8249666844349681, | |
| "recall": 0.8127428725327999, | |
| "f1-score": 0.8186065506820224, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.8827622962277948, | |
| "recall": 0.8847262247838616, | |
| "f1-score": 0.8836216001568619, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.946846985494979, | |
| "average_precision": 0.8073861124441263 | |
| }, | |
| "test_optimal_threshold": { | |
| "threshold": 0.26135853709254125, | |
| "accuracy": 0.8832853025936599, | |
| "precision": 0.6630434782608695, | |
| "recall": 0.8652482269503546, | |
| "f1": 0.7507692307692307, | |
| "confusion_matrix": [ | |
| [ | |
| 982, | |
| 124 | |
| ], | |
| [ | |
| 38, | |
| 244 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.9627450980392157, | |
| "recall": 0.8878842676311031, | |
| "f1-score": 0.9238005644402634, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.6630434782608695, | |
| "recall": 0.8652482269503546, | |
| "f1-score": 0.7507692307692307, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.8832853025936599, | |
| "macro avg": { | |
| "precision": 0.8128942881500426, | |
| "recall": 0.8765662472907289, | |
| "f1-score": 0.8372848976047471, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.9018547113119149, | |
| "recall": 0.8832853025936599, | |
| "f1-score": 0.888645783391826, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.946846985494979, | |
| "average_precision": 0.8073861124441263 | |
| } | |
| }, | |
| { | |
| "model_type": "embedding-lightgbm_sentence_embeddings", | |
| "model_name": "lightgbm", | |
| "embedding_model_name": "sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2", | |
| "artifact_dir": "/content/agri-production-classifier/baselines/embedding-lightgbm", | |
| "artifact_file": "/content/agri-production-classifier/baselines/embedding-lightgbm/embedding-lightgbm.joblib", | |
| "validation_best_threshold": { | |
| "threshold": 0.16106461000649094, | |
| "f1": 0.8150684931506849, | |
| "precision": 0.7555555555555555, | |
| "recall": 0.8847583643122676 | |
| }, | |
| "test_default_0_5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.8904899135446686, | |
| "precision": 0.7407407407407407, | |
| "recall": 0.7092198581560284, | |
| "f1": 0.7246376811594203, | |
| "confusion_matrix": [ | |
| [ | |
| 1036, | |
| 70 | |
| ], | |
| [ | |
| 82, | |
| 200 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.9266547406082289, | |
| "recall": 0.9367088607594937, | |
| "f1-score": 0.9316546762589928, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.7407407407407407, | |
| "recall": 0.7092198581560284, | |
| "f1-score": 0.7246376811594203, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.8904899135446686, | |
| "macro avg": { | |
| "precision": 0.8336977406744848, | |
| "recall": 0.822964359457761, | |
| "f1-score": 0.8281461787092066, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.8888825878973993, | |
| "recall": 0.8904899135446686, | |
| "f1-score": 0.8895950273987049, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.9495209880343196, | |
| "average_precision": 0.8095411157881081 | |
| }, | |
| "test_optimal_threshold": { | |
| "threshold": 0.16106461000649094, | |
| "accuracy": 0.8955331412103746, | |
| "precision": 0.7044776119402985, | |
| "recall": 0.8368794326241135, | |
| "f1": 0.7649918962722853, | |
| "confusion_matrix": [ | |
| [ | |
| 1007, | |
| 99 | |
| ], | |
| [ | |
| 46, | |
| 236 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.956315289648623, | |
| "recall": 0.9104882459312839, | |
| "f1-score": 0.9328392774432608, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.7044776119402985, | |
| "recall": 0.8368794326241135, | |
| "f1-score": 0.7649918962722853, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.8955331412103746, | |
| "macro avg": { | |
| "precision": 0.8303964507944608, | |
| "recall": 0.8736838392776987, | |
| "f1-score": 0.848915586857773, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.9051494214110528, | |
| "recall": 0.8955331412103746, | |
| "f1-score": 0.8987377201736533, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.9495209880343196, | |
| "average_precision": 0.8095411157881081 | |
| } | |
| }, | |
| { | |
| "model_type": "transformer", | |
| "model_name": "FacebookAI/xlm-roberta-base", | |
| "artifact_dir": "/content/agri-production-classifier/transformer", | |
| "validation_best_threshold": { | |
| "threshold": 0.3764225244522095, | |
| "f1": 0.8217317487266553, | |
| "precision": 0.75625, | |
| "recall": 0.8996282527881041 | |
| }, | |
| "test_default_0_5": { | |
| "threshold": 0.5, | |
| "accuracy": 0.9012968299711815, | |
| "precision": 0.7331189710610932, | |
| "recall": 0.8085106382978723, | |
| "f1": 0.7689713322091062, | |
| "confusion_matrix": [ | |
| [ | |
| 1023, | |
| 83 | |
| ], | |
| [ | |
| 54, | |
| 228 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.9498607242339833, | |
| "recall": 0.9249547920433996, | |
| "f1-score": 0.9372423270728355, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.7331189710610932, | |
| "recall": 0.8085106382978723, | |
| "f1-score": 0.7689713322091062, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.9012968299711815, | |
| "macro avg": { | |
| "precision": 0.8414898476475383, | |
| "recall": 0.8667327151706359, | |
| "f1-score": 0.8531068296409708, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.9058252959956873, | |
| "recall": 0.9012968299711815, | |
| "f1-score": 0.9030547041970635, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.9566660895438165, | |
| "average_precision": 0.8271081453687152 | |
| }, | |
| "test_optimal_threshold": { | |
| "threshold": 0.3764225244522095, | |
| "accuracy": 0.8962536023054755, | |
| "precision": 0.6960227272727273, | |
| "recall": 0.8687943262411347, | |
| "f1": 0.7728706624605678, | |
| "confusion_matrix": [ | |
| [ | |
| 999, | |
| 107 | |
| ], | |
| [ | |
| 37, | |
| 245 | |
| ] | |
| ], | |
| "classification_report": { | |
| "NOT_RELEVANT": { | |
| "precision": 0.9642857142857143, | |
| "recall": 0.903254972875226, | |
| "f1-score": 0.9327731092436975, | |
| "support": 1106.0 | |
| }, | |
| "RELEVANT": { | |
| "precision": 0.6960227272727273, | |
| "recall": 0.8687943262411347, | |
| "f1-score": 0.7728706624605678, | |
| "support": 282.0 | |
| }, | |
| "accuracy": 0.8962536023054755, | |
| "macro avg": { | |
| "precision": 0.8301542207792207, | |
| "recall": 0.8860246495581804, | |
| "f1-score": 0.8528218858521326, | |
| "support": 1388.0 | |
| }, | |
| "weighted avg": { | |
| "precision": 0.9097827154833639, | |
| "recall": 0.8962536023054755, | |
| "f1-score": 0.9002857245226293, | |
| "support": 1388.0 | |
| } | |
| }, | |
| "roc_auc": 0.9566660895438165, | |
| "average_precision": 0.8271081453687152 | |
| } | |
| } | |
| ] | |
| } |