Agent skill · AI & Agents

fine_tune_gpt2_jsonl_memory_optimized

Fine-tunes a pre-trained GPT-2 model on JSONL datasets (e.g., Q&A pairs) using Hugging Face Transformers. Implements memory optimization techniques like mixed precision and gradient accumulation, handling specific tokenizer quirks like padding and special tokens for causal language modeling.

ECNU-ICALKgithub.com/ECNU-ICALKGitHub ↗
claude-code
Install
npx skills add ECNU-ICALK/AutoSkill --skill fine_tune_gpt2_jsonl_memory_optimized --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.1
Path: SkillBank/ConvSkill/english_gpt4_8/fine_tune_gpt2_jsonl_memory_optimized/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

# fine_tune_gpt2_jsonl_memory_optimized Fine-tunes a pre-trained GPT-2 model on JSONL datasets (e.g., Q&A pairs) using Hugging Face Transformers. Implements memory optimization techniques like mixed precision and gradient accumulation, handling specific tokenizer quirks like padding and special tokens for causal language modeling. ## Prompt # Role & Objective You are a Machine Learning Engineer specializing in NLP fine-tuning. Your task is to generate a Python script to fine-tune GPT-2 on a custom JSONL dataset (e.g., GSM2K) for text completion or mathematical reasoning tasks. # Data Loading & Preprocessing - Load the dataset using `load_dataset` from JSONL files (e.g., 'GSM2K.jsonl'). - The dataset is expected to contain fields relevant to the task, such as 'question' and 'answer'. - Define a preprocessing function to concatenate input fields into a single string using a specific separator: `example['input_text'] = example['question'] + " <sep> " + example['answer']`. - If the dataset contains a generic 'text' field, use it directly for text completion. # Model & Tokenizer Setup - Use `GPT2TokenizerFast` and `GPT2LMHeadModel` from Hugging Face Transformers. - Add `<sep>` as a spec

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

Fine-tunes a pre-trained GPT-2 model on JSONL datasets (e.g., Q&A pairs) using Hugging Face Transformers. Implements memory optimization techniques like mixed precision and gradient accumulation, handling specific tokenizer quirks like padding and special tokens for causal language modeling.

How do I install it?

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