Skip to content

Expand the multilabel guide with a complete training workflow - #671

Draft
Aurantium-47 wants to merge 1 commit into
huggingface:mainfrom
Aurantium-47:docs/multilabel-workflow
Draft

Aurantium-47 wants to merge 1 commit into
huggingface:mainfrom
Aurantium-47:docs/multilabel-workflow

Conversation

@Aurantium-47

Copy link
Copy Markdown

Summary

The existing page names the multilabel strategies and shows model initialization, but leaves data preparation, evaluation and inference to the reader. This expands it into a runnable support-message example with:

  • a binary indicator schema and stable label order across splits;
  • a native Trainer workflow with explicit micro/macro F1;
  • label decoding and head-specific probability shapes;
  • threshold selection caveats and model persistence;
  • a working differentiable-head alternative, including the required output dimension.

The change is documentation-only and retains existing section anchors. The small illustrative dataset is not intended as a performance benchmark.

Validation

  • Executed all Python blocks in order with the public sentence-transformers/paraphrase-MiniLM-L3-v2 encoder, current SetFit source, and CPU PyTorch.
  • Trained and evaluated both head types; checked prediction/probability shapes and save/reload equality.
  • Ran additional assertions for alternate strategy behavior, independent sigmoid decisions, and zero-denominator F1.
  • Built the full English documentation with the repository's documented doc-builder command.
  • Passed all six sampler tests and git diff --check.

No GPU run or full repository test-suite run. The generated docs were not visually previewed in a browser.

AI assistance

AI assistance was used for the documentation, executable validation and independent source review. No personal human-review or maintainer-approval claim is made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant