Text Classification
Transformers
Safetensors
Chinese
chinese
ai-text-detection
ensemble
bert
roberta
qwen
lora
research
dataset
Instructions to use LUCIFerace/enhanced-replica-model-pack with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LUCIFerace/enhanced-replica-model-pack with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="LUCIFerace/enhanced-replica-model-pack")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("LUCIFerace/enhanced-replica-model-pack", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| """Batch runner for the cross-domain benchmark datasets.""" | |
| from __future__ import annotations | |
| import subprocess | |
| import sys | |
| from pathlib import Path | |
| REPO_ROOT = Path(__file__).resolve() | |
| while REPO_ROOT != REPO_ROOT.parent and not (REPO_ROOT / "src").exists(): | |
| REPO_ROOT = REPO_ROOT.parent | |
| SCRIPT_ROOT = REPO_ROOT / "scripts" / "inference" | |
| DATASETS = [ | |
| "DS06_External_core_balanced_v1", | |
| "DS07_External_long_v1", | |
| ] | |
| def run(command: list[str]) -> None: | |
| print(">>>", " ".join(command)) | |
| subprocess.run(command, cwd=REPO_ROOT, check=True) | |
| def main() -> None: | |
| infer_qwen = SCRIPT_ROOT / "infer_qwen_adapters.py" | |
| infer_plm = SCRIPT_ROOT / "infer_bert_roberta.py" | |
| zero_shot = SCRIPT_ROOT / "run_zero_shot_detectors.py" | |
| cross_domain = SCRIPT_ROOT / "run_cross_domain_ensemble.py" | |
| for dataset in DATASETS: | |
| print("=" * 80) | |
| print(f"dataset: {dataset}") | |
| print("=" * 80) | |
| run([sys.executable, str(infer_qwen), "--dataset", dataset]) | |
| run([sys.executable, str(infer_plm), "--dataset", dataset]) | |
| run([sys.executable, str(zero_shot), "--dataset", dataset]) | |
| run([ | |
| sys.executable, | |
| str(cross_domain), | |
| "--dataset", | |
| dataset, | |
| "--fallback-dataset", | |
| "DS06_External_core_balanced_v1", | |
| "--force-fallback", | |
| ]) | |
| if __name__ == "__main__": | |
| main() | |