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.
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.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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
- Prompt
- Triggers
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.
