{"id":31767645,"url":"https://github.com/nihar3453/llm-transformers-and-rag","last_synced_at":"2026-04-14T23:33:26.828Z","repository":{"id":318464519,"uuid":"1071383819","full_name":"Nihar3453/llm-transformers-and-rag","owner":"Nihar3453","description":"A hands-on suite for exploring and fine-tuning foundation models (Transformers, BERT, GPT-2, BART) and end-to-end RAG pipelines with attention visualizations, semantic search (ChromaDB/Weaviate), LangChain workflow demos.","archived":false,"fork":false,"pushed_at":"2025-10-07T09:49:41.000Z","size":297,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-07T11:42:20.483Z","etag":null,"topics":["bart","bert","chromadb","chunking","generative-ai","hnsw","huggingface-transformers","langchain","llms","minigpt","rag","transformers","vector-database","weav"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Nihar3453.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-07T09:22:05.000Z","updated_at":"2025-10-07T09:52:34.000Z","dependencies_parsed_at":"2025-10-07T11:42:23.027Z","dependency_job_id":null,"html_url":"https://github.com/Nihar3453/llm-transformers-and-rag","commit_stats":null,"previous_names":["nihar3453/llm-transformers-and-rag"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Nihar3453/llm-transformers-and-rag","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nihar3453%2Fllm-transformers-and-rag","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nihar3453%2Fllm-transformers-and-rag/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nihar3453%2Fllm-transformers-and-rag/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nihar3453%2Fllm-transformers-and-rag/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Nihar3453","download_url":"https://codeload.github.com/Nihar3453/llm-transformers-and-rag/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Nihar3453%2Fllm-transformers-and-rag/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002398,"owners_count":26083373,"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","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bart","bert","chromadb","chunking","generative-ai","hnsw","huggingface-transformers","langchain","llms","minigpt","rag","transformers","vector-database","weav"],"created_at":"2025-10-10T01:18:32.008Z","updated_at":"2025-10-10T01:18:37.122Z","avatar_url":"https://github.com/Nihar3453.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Foundation Models and RAG Labs\nA collection of end-to-end notebooks exploring decoder-only Transformers from scratch, BERT fine-tuning across frameworks, multi-model fine-tuning with Hugging Face, and practical semantic search/RAG pipelines with ChromaDB and Weaviate.\n\nWhat’s inside:- \n-mini-transformer-decoder.ipynb\n\nBuilds a GPT-style, decoder-only Transformer from scratch: scaled dot-product attention, multi-head attention, sinusoidal positional encodings, masked self-attention blocks, a minimal training loop on toy text, and attention map visualizations.\n\n-BERT_TensorFlow_vs_HuggingFace_Comparison.ipynb\n\nImplements BERT text classification with both TensorFlow Hub and Hugging Face, using the same dataset/splits/epochs, then compares accuracy, macro-F1, confusion matrices, runtime, GPU memory, sequence lengths, and implementation effort.\n\n-Finetune_BERT_GPT2_BART.ipynb\n\nLoads and fine-tunes three families with Hugging Face: BERT for sentiment classification (IMDB), GPT-2 for language modeling and generation (Wikitext-2), and BART for summarization (CNN/DailyMail); includes short demo training and inference pipelines.\n\n-LangChain_Primitives_and_JSON_Parsing.ipynb\n\nSets up an LLM API key flow, demonstrates LangChain model primitives and PromptTemplates, builds prompt→model chains, parses plain text and structured JSON (JsonOutputParser, PydanticOutputParser, OutputFixingParser), and contrasts temperature 0.1 vs 0.9 outputs.\n\n-chromadb_weaviate_semantic_search.ipynb\n\nTwo semantic search tracks over the same mini corpus: ChromaDB local collection with sentence-transformer embeddings and cosine distance; Weaviate Cloud collection with manual vectorization, HNSW indexing, and semantic queries; includes multi-query evaluation.\n\n-text_chunking_hnsw_rag_pipeline.ipynb\nEnd-to-end RAG lab featuring multiple chunking strategies (fixed, sentence, paragraph, sliding window, heading-based, semantic, hybrid), FAISS HNSW retrieval, a small embedding model, a simple LLM client, and an interactive RAG loop with qualitative comparisons.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihar3453%2Fllm-transformers-and-rag","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnihar3453%2Fllm-transformers-and-rag","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnihar3453%2Fllm-transformers-and-rag/lists"}