Downloads · 30 days
0
sercetexam9/3-cai-tien-1607-roberta-large
3-cai-tien-1607-roberta-large is a machine learning model from sercetexam9. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
1. Create a Conda Environment: Create a new Conda environment named moe with Python 3.10:
Downloads · 30 days
0
Access
Public
Updated Jul 17, 2026
Repo size
1.5 GB
Likes
0
Public
Click a slice to open those files.
.pt2.2 GB · 91%
From the Hugging Face model README
Create a Conda Environment:
Create a new Conda environment named moe with Python 3.10:
conda create -n moe python=3.10 -y
Activate the Conda Environment: Activate the newly created environment:
conda activate moe
Run Environment Setup Script: Execute the setup script to configure dependencies:
bash moe.bash
Build DGL with CUDA Support: If using CUDA 12.8, build DGL with the provided script:
bash build_dgl_cuda128.sh
Optional Runtime Overrides (recommended for stable runs):
source runtime_env_overrides.sh
To debug the system with a very small number of samples (e.g., to check for code errors without full training):
Overfit on 1 Sample:
python moe.py \
--stage overfit \
--overfit-docs 1 \
--epochs 10 \
--device auto
Custom Sample Limit:
python moe.py \
--stage train \
--train-limit 10 \
--eval-limit 5 \
--epochs 2 \
--device auto
moe.bash script should contain all necessary dependency installations.build_dgl_cuda128.sh script is specific to CUDA 12.8. Adjust if using a different CUDA version.To run the full pipeline with all data, execute the following commands:
Distant Supervision Cleaning:
python moe.py \
--stage ds \
--distant-file train_distant.json \
--eval-file dev.json \
--distant-clean-file train_distant_clean.json \
--build-distant-clean \
--distant-topk 2 \
--device auto
Supervised Training:
python -u moe.py \
--stage train \
--epochs 20 \
--full-train \
--full-eval \
--full-test \
--pretrained-gnn-checkpoint "<wandb_artifact_url_or_ref>" \
--no-pair-markers \
--result-dir inference_results \
--result-file result.json
To quickly verify the pipeline with a small subset of data, use the --debug flag:
Distant Supervision Cleaning (Smoke Test):
python moe.py \
--stage ds \
--distant-file train_distant.json \
--eval-file dev.json \
--distant-clean-file train_distant_clean.json \
--build-distant-clean \
--distant-topk 2 \
--device auto \
--debug
Supervised Training (Smoke Test):
python moe.py \
--stage train \
--train-file train_annotated.json \
--distant-clean-file train_distant_clean.json \
--eval-file dev.json \
--test-file dev.json \
--epochs 2 \
--num-experts 2 \
--capacity-factor 1.0 \
--lambda-moe 0.1 \
--lambda-scl 0.05 \
--scl-temp 0.1 \
--candidate-keep-ratio 0.3 \
--adaptive-threshold-scale 1.0 \
--max-pairs-per-doc 25 \
--max-seq-length 1024 \
--result-dir inference_results \
--result-file result.json \
--device auto \
--debug
Overfit Smoke Test (fastest end-to-end check):
python moe.py \
--stage overfit \
--overfit-docs 1 \
--epochs 2 \
--model-id sshleifer/tiny-gpt2 \
--result-dir inference_results \
--result-file result.json \
--device auto \
--debug
moe.py arguments (including --max-seq-length and multi-label pipeline settings).--no-wandb).--wandb-mode online. If your shell/directory was previously set to offline, the run still forces online unless you explicitly pass --wandb-mode offline.--wandb-no-offline-fallback.403 Forbidden, avoid stale hardcoded credentials and run with your own account context, for example:
wandb login --relogin then add --wandb-project <your_project> (optionally --wandb-entity <your_team>).--model-id sshleifer/tiny-gpt2 to avoid loading a very large backbone.best_model.pt)--result-dir (for example inference_results/*.json)checkpoints/.--pretrained-gnn-checkpoint with one of:
checkpoints/<run_name>/best_model.pt)<entity>/<project>/<artifact_name>:v0)https://wandb.ai/<entity>/<project>/artifacts/model/<artifact_name>/v0)--pretrained-gnn-strict if you want strict key matching when loading the checkpoint.conda create -n moe python=3.10 -y
conda activate moe
bash moe.bash
bash fix_datapipe.sh
python moe.py \
--stage ds \
--distant-file train_distant.json \
--eval-file dev.json \
--distant-clean-file train_distant_clean.json \
--build-distant-clean \
--distant-topk 2 \
--device auto
python -u moe.py \
--stage train \
--epochs 20 \
--full-train \
--full-eval \
--full-test \
--pretrained-gnn-checkpoint "<wandb_artifact_url_or_ref>" \
--no-pair-markers \
--result-dir inference_results \
--result-file result.json