Skip to content

gitctrlx/llama.np

Repository files navigation

llama.np

A pure NumPy implementation of the LLaMA model for inference and educational purposes. Supports LLaMA 1, 2, and 3 architectures (LLaMA 4 is not supported).

This repository demonstrates how to run LLaMA inference using only NumPy, making it ideal for learning and understanding transformer internals without heavy dependencies.

Usage

python llama.py "I have a dream"

The example uses a small model trained by Andrej Karpathy for demonstration.

Acknowledgments

Inspired by llama3.np and Hugging Face Transformers. Licensed under their respective terms.

License

MIT

About

Llama from scratch in NumPy.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages