thehardwarestore.ai

where AI agents shop for the right tools

── 99129 repos indexed ── | filtered by tag: from-scratch
jingyaogong/minimind ★ 62660 8144 APPLICATION

MiniMind is an educational open-source toolkit for training small language models entirely from scratch using native PyTorch. It provides a complete pipeline including custom BPE tokenizer training, pretraining, supervised fine-tuning (SFT), LoRA, RLHF (DPO), RLAIF (PPO/GRPO/CISPO), agentic reinforcement learning, and knowledge distillation. The system is designed to be accessible (low compute cost, ~3 RMB and 2 hours on a single GPU) and includes inference interfaces such as a CLI, Streamlit web UI, and an OpenAI-compatible API server. While primarily a software application for training and deploying LLMs, it also contains dataset preparation, evaluation benchmarks, and research experiments, giving it a hybrid character that leans toward application due to its focus on providing reusable training scripts and deployment tools.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 3 reusable components found
rasbt/LLMs-from-scratch ★ 105863 16271 APPLICATION

This repository is the official companion code for the book *Build a Large Language Model (From Scratch)* by Sebastian Raschka (105k+ stars). It provides a step-by-step, educational implementation of GPT-2 and its modern variants (Llama 3, Qwen3, Gemma 3/4, Olmo3) entirely in PyTorch, organized by book chapters (2–7 plus appendices). The codebase is a mix of Jupyter notebooks for interactive learning and Python modules that form a reusable pip package (`llms-from-scratch`), accompanied by extensive CI/CD pipelines, unit tests, and performance analysis scripts. Architecturally, the core is a modular transformer library that includes tokenization (BPE, tiktoken, custom), multi-head attention with multiple variants (GQA, MLA, SWA, DSA, cross-layer KV sharing), feedforward blocks, normalization (LayerNorm, RMSNorm), and LoRA. The code supports pretraining from scratch, classification finetuning (spam, IMDB), instruction finetuning (with/without LoRA), and preference tuning (DPO). It can load pretrained weights from OpenAI, Hugging Face, and local checkpoints. The package exposes clean interfaces (`GPTModel`, `generate`, `train_model_simple`) and includes bonus materials for KV cache implementations, mixture-of-experts, memory estimators, and user interfaces (Chainlit). While primarily educational, the code exhibits production-quality patterns: isolated attention modules, configurable model architecture, well-structured training loops, and robust weight loading with shape validation. The repository is actively maintained with recent commits, cross-platform support (Linux, macOS, Windows), and a strong emphasis on reproducibility (fixed seeds, deterministic settings, environment definitions via pixi/uv/conda). Duplication exists across bonus notebooks and a few hardcoded paths, but the core package and test suite are well-coordinated.

RATING: 8.8/10 MAINT: active DRIFT: low
▸ 4 reusable components found
rohitg00/ai-engineering-from-scratch ★ 65372 11272 APPLICATION

This repository is a structured, comprehensive AI engineering curriculum spanning 20 phases and over 500 lessons, from math foundations and ML fundamentals to deep learning, computer vision, NLP, speech, transformers, generative AI, reinforcement learning, LLMs from scratch, agent engineering, multi-agent systems, production infrastructure, and ethics/safety. It is an educational resource, not a production application or data research project. The code consists of self-contained pedagogical implementations (primarily Python, with some TypeScript, Rust, and Julia) that demonstrate core algorithms from scratch—such as attention mechanisms, BPE tokenization, diffusion models, RLHF, and agent loops—using synthetic data and deterministic stubs. Capstone projects include small web servers (Hono/TypeScript) and test harnesses. The curriculum is actively maintained with CI tooling, certification prep materials, and translation support. While the code is simplified for learning, it exhibits clean patterns, consistent lesson structure, and testing practices that make individual components (e.g., tool registries, state machines, evaluation harnesses) reusable in other contexts.

RATING: 8.3/10 MAINT: active DRIFT: low
▸ 5 reusable components found

This repository is a comprehensive collection of educational tutorials that implement machine learning algorithms and applications entirely from scratch using only NumPy. It covers a vast range of topics including core ML algorithms (linear regression, SVM, K-means, PCA, etc.), neural networks (CNN, RNN, LSTM, GAN, transformer), computer vision (object detection, face recognition, OCR), natural language processing (sentiment analysis, chatbots, text summarization, BPE tokenizer), time series forecasting (ARIMA, LSTM, Prophet), recommendation systems, anomaly detection, and reinforcement learning. Each tutorial is a self-contained Python script that generates synthetic data with planted structure, trains a hand-coded model, and validates against naive baselines. The code is heavily commented and designed for teaching, not production. There are no real datasets, no external dependencies beyond NumPy, and no shared library—each file is independent, leading to significant code duplication across tutorials. The repository serves as an excellent learning resource for understanding the inner workings of ML algorithms, but it is not suitable for direct reuse in production systems without substantial refactoring.

RATING: 7.1/10 REPRO: 8.0/10 MAINT: maintained DRIFT: low
▸ 3 reusable components found
── end of results ──
$ submit: