{"id":28471694,"url":"https://github.com/borhanmorphy/llm-fine-tuning-101","last_synced_at":"2025-07-01T22:31:15.076Z","repository":{"id":295696932,"uuid":"985401295","full_name":"borhanMorphy/llm-fine-tuning-101","owner":"borhanMorphy","description":"LLM Fine-Tuning 101","archived":false,"fork":false,"pushed_at":"2025-05-26T22:31:07.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-07T11:08:30.644Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/borhanMorphy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-17T17:26:58.000Z","updated_at":"2025-05-26T22:31:10.000Z","dependencies_parsed_at":"2025-05-29T15:16:18.379Z","dependency_job_id":null,"html_url":"https://github.com/borhanMorphy/llm-fine-tuning-101","commit_stats":null,"previous_names":["borhanmorphy/llm-fine-tuning-101"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/borhanMorphy/llm-fine-tuning-101","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borhanMorphy%2Fllm-fine-tuning-101","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borhanMorphy%2Fllm-fine-tuning-101/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borhanMorphy%2Fllm-fine-tuning-101/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borhanMorphy%2Fllm-fine-tuning-101/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/borhanMorphy","download_url":"https://codeload.github.com/borhanMorphy/llm-fine-tuning-101/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/borhanMorphy%2Fllm-fine-tuning-101/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263046150,"owners_count":23405144,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-07T11:08:34.094Z","updated_at":"2025-07-01T22:31:15.064Z","avatar_url":"https://github.com/borhanMorphy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🧠 Educational Repository for Fine-Tuning Large Language Models (LLMs) — PyTorch Only\n\nWelcome to the **LLM Fine-Tuning Educational Repository**, built entirely with **pure PyTorch** — no HuggingFace, no external frameworks. This project is designed to provide a hands-on, from-scratch learning experience for understanding and fine-tuning large language models. Perfect for learners who want to build a solid foundation by implementing everything step by step.\n\n---\n\n## 📚 What You'll Learn\n\n- Core architecture and internals of LLMs and SLMs\n- Dataset handling, preprocessing and multi-gpu training with PyTorch\n- Building tokenizers and vocabularies from scratch\n- Implementing training loops and loss functions\n- Fine-tuning techniques without relying on external libraries\n- LoRA (Low-Rank Adaptation) for parameter-efficient fine-tuning\n- DPO (Direct Preference Optimization) for aligning models using preference data\n\n---\n\n## 🛠️ Repository Structure\n\n```\n.\n├── demo/                 # Markdowns for demos\n├── scripts/              # Utility scripts\n├── slm_full_sft.py       # Supervised Full Fine-Tuning Smollm2\n├── slm_lora_sft.py       # Supervised Fine-Tuning Smollm2 via LoRA\n├── llm_lora_sft.py       # Supervised Fine-Tuning Gemma3 via LoRA\n└── README.md             # This file\n```\n\n## 🧪 Demos\n| Markdown                           | Description                             |\n| ---------------------------------- | --------------------------------------- |\n| `YugiohGPT.md`                     | Yugioh Card generation via LLM          |\n\n\n## 💡 Why No HuggingFace?\nThis repo is intended for educational purposes. By not using external libraries, you’ll:\n\n- Learn how everything works under the hood\n- Gain deep insight into training dynamics and model architecture\n- Build skills that translate to research and custom implementations","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborhanmorphy%2Fllm-fine-tuning-101","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborhanmorphy%2Fllm-fine-tuning-101","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborhanmorphy%2Fllm-fine-tuning-101/lists"}