Skip to content
Back to skills

Classification Training

ASecurity

"Plan Qwen-VL sequence-classification training, labels, losses,

  • 247 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 9, 2026
toolspythongobash

Works with

  • cli

Security analysis

A100/100

Pro scans all 5 files and shows the line behind each finding

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill classification-training --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Classification Training?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Classification Training
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-classification-training/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-classification-training)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: "classification-training"
description: "Plan Qwen-VL sequence-classification training, labels, losses,
  metrics, and early stopping."
metadata:
  disco-role: operating
disable-model-invocation: true
license: Apache 2.0
---

# Classification Training

Use this sub-skill for Qwen-VL sequence classification, class-imbalance losses, custom heads, and early stopping.

## Covers

- `train_cls.py` command planning.
- Classification dataset shape and label mapping.
- Cross-entropy, focal loss, and class-balanced losses.
- MLP head settings and label metrics.
- Eval hooks and early stopping.
- DeepSpeed launch planning for classification.

## Excludes

- SFT, DPO, and GRPO training.
- Adapter merge or serving.
- Generic image augmentation not tied to this repo.

## Read first

- `../../references/workflow-map.md` for route confirmation.
- `../../references/data-formats.md` for media/path conventions that also apply here.
- `../../references/cli-reference.md` for the shared flag surface.
- `references/losses.md` for class-aware losses and head choices.
- `references/troubleshooting.md` for classification-specific failures.
- `scripts/classification_command.py` for a safe command builder.

## Typical user requests

- "Train a classifier on Qwen-VL."
- "How do I choose the classification loss?"
- "How do I add a tiny MLP head?"
- "How do I stop training on poor validation improvements?"

## Workflow

1. Confirm the label set and prompt format.
2. Decide whether the dataset needs eval records.
3. Pick a loss function based on imbalance and the user’s metric goal.
4. Decide whether LoRA or head-only tuning is needed.
5. Emit the command with the bundled command builder.

## Decision rules

- Default labels in the repo are `A -> 0` and `B -> 1`.
- If the dataset omits `prompt`, the repo injects a default user message.
- The trainer can use early stopping when validation stops improving.
- LoRA classification saves the classifier head with `modules_to_save`.
- The repo disables Liger for sequence-classification wrappers at runtime even if the flag is present.

## Safe command builder

Start with the bundled helper:

```bash
python scripts/classification_command.py --help
python scripts/classification_command.py --model-id Qwen/Qwen2.5-VL-3B-Instruct --data-path data/train.json --image-folder data/images --output-dir outputs/cls
```

## If you need more detail

Read `references/losses.md` for the loss choices and `references/troubleshooting.md` for label, head, and metric issues.

Files in this skill

  • SKILL.md2.5 KB
  • references/losses.md956 B
  • references/troubleshooting.md1.1 KB
  • references/workflow.md1.4 KB
  • scripts/classification_command.py10.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.