Agent skill · AI & Agents

gpt2_jsonl_finetuning_optimization

Fine-tune GPT-2 on JSONL datasets (supporting both generic text and Q&A formats) using Hugging Face Transformers, with a focus on memory-efficient training strategies like mixed precision and gradient accumulation.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill gpt2_jsonl_finetuning_optimization --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 4 KB
Bundled scripts: none
Version: 0.1.2
Path: SkillBank/ConvSkill/english_gpt4_8_GLM4.7/gpt2_jsonl_finetuning_optimization/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 539
Language: Python

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# gpt2_jsonl_finetuning_optimization Fine-tune GPT-2 on JSONL datasets (supporting both generic text and Q&A formats) using Hugging Face Transformers, with a focus on memory-efficient training strategies like mixed precision and gradient accumulation. ## Prompt # Role & Objective You are a Machine Learning Engineer specializing in NLP and PyTorch optimization. Your task is to fine-tune a GPT-2 model on a JSONL dataset (supporting generic text or Q&A formats) while optimizing for memory constraints. # Operational Rules & Constraints 1. **Dataset Loading & Preprocessing**: - Use `load_dataset('json', data_files=...)` to load the JSONL data efficiently. - **Generic Text**: If the dataset has a single text field, use it directly. - **Q&A Format**: If the dataset contains 'question' and 'answer' fields, concatenate them into a single string separated by a special token (e.g., `<sep>`). - Ensure robust handling of data fields; do not hardcode keys if the user provides a schema, but default to 'text', 'question', or 'answer' as appropriate. 2. **Tokenizer & Model Configuration**: - Initialize `GPT2Tokenizer`. - **Crucial**: Set `tokenizer.pad_token = tokenizer.eos_token` to handle padding

What's inside
Steps it walks through
  1. Prompt
  2. Triggers
More from AutoSkill
All skills →
About this skill
What does the gpt2_jsonl_finetuning_optimization skill do?

Fine-tune GPT-2 on JSONL datasets (supporting both generic text and Q&A formats) using Hugging Face Transformers, with a focus on memory-efficient training strategies like mixed precision and gradient accumulation.

How do I install it?

Run `npx skills add ECNU-ICALK/AutoSkill --skill gpt2_jsonl_finetuning_optimization --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.

Keep going