From 0877982bbe7ffa3da38abe3e7d15e49dfd881fc9 Mon Sep 17 00:00:00 2001 From: sudhendra Date: Sun, 27 Sep 2026 19:42:33 +0530 Subject: [PATCH] fix: solve issue #30 - remove duplicate llm_fundamentals/WEIGHT-LOADING folder --- llm_fundamentals/WEIGHT-LOADING/supplementary.py | 16 ---------------- llm_fundamentals/fine_tuning/01_fine_tuning.py | 7 ++++++- 2 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 llm_fundamentals/WEIGHT-LOADING/supplementary.py diff --git a/llm_fundamentals/WEIGHT-LOADING/supplementary.py b/llm_fundamentals/WEIGHT-LOADING/supplementary.py deleted file mode 100644 index 11c9a3e..0000000 --- a/llm_fundamentals/WEIGHT-LOADING/supplementary.py +++ /dev/null @@ -1,16 +0,0 @@ -import matplotlib.pyplot as plt -from matplotlib.ticker import MaxNLocator -import tiktoken -import torch -import torch.nn as nn -from torch.utils.data import Dataset, DataLoader - - -class GPTDatasetV1(Dataset): - def __init__(self, txt, tokenizer, max_length, stride): - self.input_ids = [] - self.target_ids = [] - - # Tokenize the entire text - token_ids = tokenizer.encode(txt, allowed_special={" - diff --git a/llm_fundamentals/fine_tuning/01_fine_tuning.py b/llm_fundamentals/fine_tuning/01_fine_tuning.py index 7642912..06db9cb 100644 --- a/llm_fundamentals/fine_tuning/01_fine_tuning.py +++ b/llm_fundamentals/fine_tuning/01_fine_tuning.py @@ -1,6 +1,11 @@ import json -file_path = "../../WEIGHT-LOADING/instruction-data.json" +# Path is resolved relative to this file's folder, so run the script from +# `llm_fundamentals/fine_tuning/`. This previously pointed at +# `../../WEIGHT-LOADING/instruction-data.json`, a path that never existed and +# whose folder has now been removed as a duplicate of `weight_loading/`. The +# dataset actually lives in the top-level `data/` folder. +file_path = "../../data/instruction-data.json" with open(file_path, "r") as file: data = json.load(file)