Text Classification
Transformers
Safetensors
Vietnamese
roberta
esg
greenwashing
phobert
vietnamese
commitment-detection
Instructions to use dqa2412/esg-washing-optimized with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dqa2412/esg-washing-optimized with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="dqa2412/esg-washing-optimized")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("dqa2412/esg-washing-optimized") model = AutoModelForSequenceClassification.from_pretrained("dqa2412/esg-washing-optimized", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| # Config CHỈ task commitment (trích từ config/train.yml gốc, bỏ env/soc/gov/specificity). | |
| # Tune: python -m src.training.tune_hyperparams --config config/train_commitment.yml --task commitment --trials 10 | |
| # Train: python -m src.training.train_model --config config/train_commitment.yml --task commitment | |
| defaults: | |
| task: commitment | |
| _model_subst: | |
| name: vinai/phobert-base-v2 | |
| max_length: 256 | |
| word_segment: true | |
| _tune_subst: | |
| train_batch_size: [8, 16] | |
| _data: | |
| use_context_prev: false | |
| use_context_next: false | |
| _es: | |
| enabled: true | |
| patience: 2 | |
| threshold: 0.0 | |
| _train: | |
| epochs: 10 | |
| seeds: [42, 43, 44, 45, 46] | |
| train_batch_size: 16 | |
| eval_batch_size: 32 | |
| learning_rate: 2.0e-5 | |
| weight_decay: 0.01 | |
| warmup_ratio: 0.1 | |
| use_class_weights: true | |
| weight_method: sqrt_inverse | |
| gradient_accumulation_steps: 1 | |
| max_grad_norm: 1.0 | |
| label_smoothing_factor: 0.0 | |
| precision: bf16 | |
| metric_for_best_model: macro_f1 | |
| tasks: | |
| commitment: | |
| labels: [0, 1] | |
| seed: 42 | |
| model: | |
| data: | |
| tune: | |
| paths: | |
| train_data: data/vi_gold/commitment/train.parquet | |
| val_data: data/vi_gold/commitment/val.parquet | |
| test_data: data/vi_gold/commitment/test.parquet | |
| output_dir: outputs/models/commitment | |
| training: | |
| early_stopping: | |