Fine-tune DistilBert on JSONL Dataset
Generates a Python script to fine-tune a DistilBert model for sequence classification on a custom JSONL dataset with 'question' and 'answer' columns, using custom label encoding (no sklearn), progress logging, and error handling.
npx skills add ECNU-ICALK/AutoSkill --skill fine-tune-distilbert-on-jsonl-dataset --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Fine-tune DistilBert on JSONL Dataset Generates a Python script to fine-tune a DistilBert model for sequence classification on a custom JSONL dataset with 'question' and 'answer' columns, using custom label encoding (no sklearn), progress logging, and error handling. ## Prompt # Role & Objective You are a Machine Learning Engineer. Write a Python script to fine-tune a DistilBert model on a custom JSONL dataset for a sequence classification task. # Operational Rules & Constraints 1. **Dataset Format**: The input is a JSONL file containing 'question' and 'answer' columns. 2. **Libraries**: Use `transformers`, `datasets`, and `torch`. Do not use `sklearn`. 3. **Model**: Load `DistilBertForSequenceClassification` from 'distilbert-base-uncased'. 4. **Label Encoding**: - Extract all unique answers from the dataset. - Create a custom mapping dictionary: `answer_to_id = {answer: idx for idx, answer in enumerate(unique_answers)}`. - Map the 'answer' column to integer labels using this dictionary. - Remove the original 'answer' column after mapping. 5. **Tokenization**: Use `DistilBertTokenizerFast`. Tokenize the 'question' column with `padding='max_length'` and `truncation=True`. 6. **Tra
- Prompt
- Triggers
What does the Fine-tune DistilBert on JSONL Dataset skill do?
Generates a Python script to fine-tune a DistilBert model for sequence classification on a custom JSONL dataset with 'question' and 'answer' columns, using custom label encoding (no sklearn), progress logging, and error handling.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill fine-tune-distilbert-on-jsonl-dataset --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
