---
title: "Personal Copilot: Train Your Own Coding Assistant"
description: "HugCoder is a code LLM fine-tuned on the top 10 Hugging Face GitHub repositories, built by cloning repos in parallel, filtering non-code files and training StarCoder with a fill-in-the-middle objective."
url: "https://swe.quest/articles/personal-copilot-train-your-own-coding-assistant-058d44307821dd4e"
canonical: "https://huggingface.co/blog/personal-copilot"
source: "Hugging Face"
published: "2023-10-27"
difficulty: "hard"
kind: "How-to"
reading_minutes: 15
tags: ["model-training","ai-coding","llms"]
---

# Personal Copilot: Train Your Own Coding Assistant

A post on [Hugging Face](https://swe.quest/sources/hugging-face.md), published 2023-10-27, 15 min read, How-to. Original: [https://huggingface.co/blog/personal-copilot](https://huggingface.co/blog/personal-copilot)

## Summary

HugCoder is a code LLM fine-tuned on the top 10 Hugging Face GitHub repositories, built by cloning repos in parallel, filtering non-code files and training StarCoder with a fill-in-the-middle objective. Full fine-tuning of the 15.5B model on 8×A100 80GB with FSDP took 9 hours (~$108), while QLoRA on a single A100 40GB took 12.5 hours (~$13.75), with a per-parameter memory breakdown explaining why. QLoRA reached slightly higher loss than full fine-tuning but preserved HumanEval pass@1 (33.37 vs 33.57) and matched it qualitatively on HF-specific infilling where GitHub Copilot failed. The post also covers serving the model in VS Code via Inference Endpoints, training a chat variant, and combining LoRA adapters across tasks and base models.

Written by swe.quest, not by the author.

**Difficulty:** Hard: written for specialists in the field

## Topics

- [Model training](https://swe.quest/tags/model-training.md) (AI & ML)
- [AI for coding](https://swe.quest/tags/ai-coding.md) (AI & ML)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- LLM fine-tuning basics ([easy posts on LLMs](https://swe.quest/tags/llms.md?difficulty=easy))
- LoRA/QLoRA
- PyTorch distributed training ([easy posts on Model training](https://swe.quest/tags/model-training.md?difficulty=easy))
- Hugging Face Transformers

## Keywords

StarCoder, QLoRA, PEFT, FSDP, Flash Attention 2, HumanEval, Hugging Face Accelerate, llm-vscode

## Related posts

- [Code Llama: Llama 2 learns to code](https://swe.quest/articles/code-llama-llama-2-learns-to-code-bbc6e9367fb26138.md): Hugging Face · 2023-08-25 · Medium · 12 min read · LLMs, AI for coding, Inference & serving, Python, Evaluation
  Code Llama is a family of 7B, 13B and 34B Llama 2 derivatives trained on 500B tokens of code.
- [Codex is Open Sourcing AI models](https://swe.quest/articles/codex-is-open-sourcing-ai-models-fa17d18abe8d9c1f.md): Hugging Face · 2025-12-11 · Medium · 18 min read · Model training, AI agents, AI for coding, Evaluation
  Hugging Face Skills, a repository of agent instructions loaded via AGENTS.md (or Claude Code Skills), lets OpenAI Codex run end-to-end fine-tuning experiments on Hugging Face Jobs.
- [We Got Claude to Fine-Tune an Open Source LLM](https://swe.quest/articles/we-got-claude-to-fine-tune-an-open-source-llm-b2f9fccf5ad1d82f.md): Hugging Face · 2025-12-04 · Medium · 12 min read · Model training, AI agents, AI for coding, LLMs
  Hugging Face Skills, specifically the hf-llm-trainer skill, lets coding agents like Claude Code, Codex and Gemini CLI run a full LLM fine-tuning lifecycle.
- [StarCoder: A State-of-the-Art LLM for Code](https://swe.quest/articles/starcoder-a-state-of-the-art-llm-for-code-ae224d2374e67db4.md): Hugging Face · 2023-05-04 · Easy · 5 min read · LLMs, AI for coding, Evaluation, Open source
  StarCoder and StarCoderBase are ~15B-parameter code LLMs trained on 1 trillion tokens of permissively licensed GitHub data from The Stack 1.2, covering 80+ languages, commits, issues and notebooks, with StarCoder further fine-tuned on 35B Python tokens.
- [Creating a Coding Assistant with StarCoder](https://swe.quest/articles/creating-a-coding-assistant-with-starcoder-ee69e88ef6796911.md): Hugging Face · 2023-05-09 · Medium · 23 min read · Model training, LLMs, AI for coding, Python
  StarCoder, BigCode's 16B-parameter open code model with an 8k context window, can be turned into a coding assistant either by dialogue prompting or by fine-tuning it on conversations.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
