tairov/llama2.mojo
Inference Llama 2 in one file of pure 🔥 observed · 2026-08-28
Health v2 · maintenance only
57/100
- Activity 66
- Release rhythm 35
- Longevity 77
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 1088
- days_rel: n/a
- days_push: 205
- n_releases_24m: 0
Adoption not part of the score
2125 stars · 138 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A single-file implementation of Llama 2 transformer inference written in pure Mojo, leveraging SIMD and vectorization for fast CPU inference. It outperforms llama2.c and llama.cpp on small Llama models and serves as a showcase of Mojo's performance capabilities.
Use cases
- run llama 2 inference locally on cpu
- benchmark mojo vs c and python llama2 implementations
- learn how transformer inference works in a single file
- experiment with simd vectorized matrix multiplication
- run tinyllama and stories models from the terminal
When to choose
- you want fast CPU inference of small Llama 2 models without GPU dependencies
- you are learning Mojo or studying optimized transformer inference code
- you want a minimal single-file LLM inference implementation
When to avoid
- you need production LLM serving with batching, quantization, or GPU support
- you need to run large models beyond ~1B parameters
- you require a stable long-term dependency, since it tracks Mojo nightly versions
Facets
cli-tool · maturity active
llm-inference machine-learning benchmarking large-language-models deep-learning performance developer-tools cli mojo llama2 simd vectorization single-file transformer cpu-inference educational macos linux cpu
5 sources
- readme: https://github.com/tairov/llama2.mojo · fetched 2026-08-28 · bdf5d79083b1
- homepage: https://www.modular.com/blog/community-spotlight-how-i-built-llama2-by-aydyn-tairov · fetched 2026-08-29 · 3a8fd8fe7221
- site_page: https://docs.modular.com/ · fetched 2026-08-29 · 05fe31f74212
- site_page: https://www.modular.com/company/about · fetched 2026-08-29 · 3b5f4e72598e
- site_page: https://www.modular.com/pricing · fetched 2026-08-29 · bc1180bba7dd
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| tairov/llama2.mojo | main | 57 |
For agents
markdown · JSON · MCP: product_card(name="tairov/llama2.mojo")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem