技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
simpletransformers【数据与研究】Use Simple Transformers package workflows for NLP classification, NER, QA, generation, T5, Seq2Seq, retrieval, representations, data validation, and troubleshooting.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when the user asks about the simpletransformers Python package,
Simple Transformers task wrappers, task-specific training/evaluation/prediction
data formats, ClassificationModel, NERModel, QuestionAnsweringModel,
LanguageModelingModel, LanguageGenerationModel, T5Model, Seq2SeqModel,
RepresentationModel, RetrievalModel, ConvAIModel, or package-specific
import/runtime errors.
Simple Transformers wraps Hugging Face Transformers and uses PyTorch in model modules. Install a compatible PyTorch build before importing task model classes:
pip install torch # choose CPU or CUDA wheel for the target machine
pip install simpletransformers
python -c "import simpletransformers; print(simpletransformers.name)"
For smoke runs, pass use_cuda=False to model constructors unless the user has
already verified a CUDA-capable PyTorch environment.
| User task | Read |
|---|---|
| binary/multiclass/regression/sentence-pair/multilabel/LayoutLM/multimodal classification, cross-encoder reranking | classification |
| named entity recognition, token classification, CoNLL, LayoutLM token boxes, extractive QA, SQuAD JSON/JSONL | token-and-qa |
| language model training/fine-tuning, generation, T5, Seq2Seq, ConvAI, text-to-text tasks | generative-workflows |
| sentence/word representations, dense retrieval, DPR, hard negatives, BEIR/MSMARCO/TREC, FAISS/pytrec | retrieval-representation |
ModelArgs/task args and safe smoke-run defaults.simple-viewer Streamlit launcher and why not to run it in automated checks.scripts/check_simpletransformers_env.py: run to check package versions, task-module imports, and optional CUDA visibility.scripts/inspect_model_args.py: run in an environment where Simple Transformers imports cleanly to list args dataclass fields.sub-skills/*/scripts/: use these before model construction to catch data/schema mistakes without downloads or training.Simple Transformers 0.70.8 declares transformers>=4.31.0 but package
inspection found runtime hazards with modern Transformers versions: removed
SequenceSummary aliases, TransfoXLConfig, and top-level cached_path can
break imports before any dataset is read. When import errors mention these
symbols, debug dependency compatibility first and use the troubleshooting
references; do not rewrite user data prematurely.
use_cuda=False) and no-save settings for smoke/debug runs.output_dir, cache_dir, and checkpoint policy before production runs.