Velqora-95M-Base: A compact LLM trained from scratch on a single RTX 4060
2 min readupdated
A 94.56M parameter base English language model by developer Maxilicious20 designed for text generation. Unlike most mini-models, it is not a fine-tuned version of an existing checkpoint, but was trained completely from scratch on educational texts, textbooks, and stories. Under the hood, it features a modern architecture built on custom PyTorch with GQA (grouped-query attention for memory efficiency), QK-Norm, SwiGLU, and RoPE supporting up to 4096 tokens of context. It is ideal for researchers, developers, and students looking to experiment with local deployment on modest hardware and explore modern transformer architecture.
Key features
- Custom
VelqoraNextGenarchitecture: 18 layers, 640 hidden size, GQA (10 query / 5 key-value heads), QK-Norm, Layer-0 Value Residuals, SwiGLU, and RMSNorm. - Context window up to 4096 tokens with RoPE positional encoding (base θ = 50,000) and a custom byte-level BPE tokenizer with a 16,384 vocabulary size.
- Full training from scratch performed on a single consumer NVIDIA GeForce RTX 4060 GPU (8 GB VRAM) running Windows 11.
- In addition to
bfloat16weights (safetensorsand.pt), the author provided a ready-to-use GGUF version for convenient local inference.
What you can do
- Examine the practical design of modern transformers using clean code in
velqora/model.pywithout relying onAutoModelForCausalLM. - Run lightweight text generation on a CPU or budget GPU (including the GGUF variant) for local inference testing.
- Use the base checkpoint as a foundation for your own fine-tuning or compare it against instruction-tuned variants in the same family (Velqora-40M/160M-Instruct).
Example
pip install torch safetensors tokenizers huggingface_hub
hf download Maxilicious20/Velqora-95M-Base --local-dir ./Velqora-95M-Base
python ./Velqora-95M-Base/run_inference.py --model-dir ./Velqora-95M-Base --prompt "What is the capital of Germany?"
Read more
DetailsBest validation loss: 4.6043 (trained in bfloat16 using scaled_dot_product_attention).
Training hardware: single NVIDIA RTX 4060 8 GB; weight size ~94.56M parameters.
Limitations: base-type model (not instruction-tuned), prompts must be provided as natural text continuations without ChatML tags; hallucinations and arithmetic errors may occur. Apache-2.0 license.










Comments