Nano  by bd4sur

Transformer LLM for interactive, offline voice and text applications

Created 2 years ago
254 stars

Top 99.1% on SourcePulse

GitHubView on GitHub
Project Summary

Summary: bd4sur/Nano is a toy language model project inspired by nanoGPT, targeting hobbyists and researchers for LLM experimentation. It facilitates training, fine-tuning, and efficient inference of Transformer models (including Qwen adaptations) across diverse hardware, from browsers and embedded devices to PCs, enabling offline, local LLM usage.

How It Works: Nano implements Transformer architectures (Llama2/nanoGPT-based) with features like RoPE and GQA. Its key innovation is highly portable inference engines: WASM for browsers and pure C (from llama2.c) for resource-constrained devices like Raspberry Pis and routers, enabling offline execution.

Quick Start & Requirements:

  • Training: Requires Python 3.10+, Conda, PyTorch. GPU with CUDA recommended. Install dependencies via pip install -r requirements.txt.
  • Inference (C): Requires C/C++ toolchain (make).
  • Inference (WASM): Runs directly in browsers; build WASM module via infer/build_wasm.sh.
  • Models: Pre-trained models (e.g., Nano-168M) and Qwen conversion tools available.
  • Links: Bilibili Demo, Animac Playground, HuggingFace.

Highlighted Details:

  • Cross-Platform Inference: Supports local execution via browser WASM, C binaries for embedded systems, and PyTorch CPU/GPU.
  • Model Scale: Offers models from 1M to 168M parameters, plus Qwen support.
  • Non-NLP Tasks: Experimental scripts explore LLM use cases like sorting and logic evaluation.
  • PEFT: Includes support for LoRA fine-tuning.

Maintenance & Community: Appears to be a personal project by BD4SUR, lacking explicit community channels (Discord/Slack), formal roadmaps, or multiple listed maintainers.

Licensing & Compatibility: States MIT license, generally permissive for commercial use. However, a concurrent "all rights reserved" copyright notice creates ambiguity requiring clarification for adoption.

Limitations & Caveats: Positioned as a "toy" for learning/research; training large models is computationally expensive. Data preprocessing can be memory-intensive. The custom heuristic tokenizer differs from standard BPE. License ambiguity is a key adoption blocker.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
1
Star History
24 stars in the last 30 days

Explore Similar Projects

Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Gabriel Almeida Gabriel Almeida(Cofounder of Langflow), and
2 more.

torchchat by pytorch

0.1%
4k
PyTorch-native SDK for local LLM inference across diverse platforms
Created 1 year ago
Updated 4 months ago
Starred by Yineng Zhang Yineng Zhang(Inference Lead at SGLang; Research Scientist at Together AI), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
9 more.

LightLLM by ModelTC

0.3%
4k
Python framework for LLM inference and serving
Created 2 years ago
Updated 1 day ago
Starred by Lianmin Zheng Lianmin Zheng(Coauthor of SGLang, vLLM), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
1 more.

MiniCPM by OpenBMB

0.1%
8k
Ultra-efficient LLMs for end devices, achieving 5x+ speedup
Created 1 year ago
Updated 3 months ago
Feedback? Help us improve.