NanoLLM-105M (Llama Architecture Base Model)

Model Size Architecture Training

NanoLLM-105M is a custom, ultra-lightweight Large Language Model (LLM) trained entirely from scratch. Rather than fine-tuning an existing foundation model, this project was built to demonstrate a deep understanding of core Transformer architectures and full pre-training pipelines.

This specific variant (llama-arc-base) utilizes the highly efficient structural design of the Llama model family, scaled down to 105 million parameters for rapid iteration, educational research, and edge-device compatibility.

Model Highlights

  • Trained from Scratch: This is a base model pre-trained natively, demonstrating end-to-end knowledge of tokenization, dataset preparation, and distributed training loops.
  • Llama Architecture: Implements standard Llama architectural improvements, including:
    • RoPE (Rotary Position Embeddings): For better sequence length generalization.
    • RMSNorm: For improved training stability over standard LayerNorm.
    • SwiGLU Activation: For enhanced feed-forward network performance.
  • Ultra-Lightweight: At just 105M parameters, this model can be loaded into memory and run on standard CPUs or extreme edge devices without requiring a discrete GPU.

How to Use

Because this model is built on standard architectures, it is fully compatible with the Hugging Face transformers ecosystem. You can load and run inference with just a few lines of code:

from transformers import AutoTokenizer, AutoModelForCausalLM

model_id = "harsh8001/NanoLLM-105M-llama-arc-base"

# Load the Tokenizer and Model
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

# Prepare input
prompt = "The future of artificial intelligence is"
inputs = tokenizer(prompt, return_tensors="pt")

# Generate text
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Downloads last month
8
Safetensors
Model size
0.1B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Collection including harsh8001/NanoLLM-105M-Base