# karpathy/llama2\.c

> Inference Llama 2 in one file of pure C

Canonical: https://starboard.codevetter.com/explore/karpathy/llama2.c

[Back to Discover](https://starboard.codevetter.com/discover)

![karpathy](https://avatars.githubusercontent.com/u/241138?v=4&s=40)

karpathy

# llama2\.c

[View on GitHub
](https://github.com/karpathy/llama2.c)

Inference Llama 2 in one file of pure C

20k stars

C

Updated 18h ago

Created Jul 23, 2023

## Star history

\+749 stars
3\.8% growth


## Detected tools

[pytest](https://starboard.codevetter.com/tools/pytest)
[GitHub Actions](https://starboard.codevetter.com/tools/github-actions)


Tool detection is evidence\-based, not a full runtime audit\. Package manifests, lockfiles, and SBOMs are high\-confidence; README, topics, and AI metadata are lower\-confidence signals\. Repository language is metadata, not counted as a tool\. Accuracy varies by ecosystem, especially for C/C\+\+ and custom monorepos\.

- pytest  · 98% confidence · Sources: github\-sbom, requirements\.txt · Detected Jul 16, 2026

- GitHub Actions  · 88% confidence · Sources: \.github/workflows/build\.yml · Detected Jul 16, 2026

## Similar projects

[![ggml\-org](https://avatars.githubusercontent.com/u/134263123?v=4&s=24)

ggml\-org/ llama\.cpp

LLM inference in C/C\+\+

C\+\+ 136k 70%](https://starboard.codevetter.com/explore/ggml-org/llama.cpp)[![mozilla\-ai](https://avatars.githubusercontent.com/u/129804596?v=4&s=24)

mozilla\-ai/ llamafile

Distribute and run LLMs with a single file\.

C\+\+ 27k 69%](https://starboard.codevetter.com/explore/mozilla-ai/llamafile)[![meta\-llama](https://avatars.githubusercontent.com/u/153379578?v=4&s=24)

meta\-llama/ llama

Inference code for Llama models

Python 60k 68%](https://starboard.codevetter.com/explore/meta-llama/llama)[![meta\-llama](https://avatars.githubusercontent.com/u/153379578?v=4&s=24)

meta\-llama/ codellama

Inference code for CodeLlama models

Python 16k 66%](https://starboard.codevetter.com/explore/meta-llama/codellama)[![withcatai](https://avatars.githubusercontent.com/u/142035548?v=4&s=24)

withcatai/ node\-llama\-cpp

Run AI models locally on your machine with node\.js bindings for llama\.cpp\. Enforce a JSON schema on the model output on the generation level

TypeScript 2\.2k 66%](https://starboard.codevetter.com/explore/withcatai/node-llama-cpp)[![Michael\-A\-Kuykendall](https://avatars.githubusercontent.com/u/196678413?v=4&s=24)

Michael\-A\-Kuykendall/ shimmy

⚡ Pure\-Rust WebGPU inference engine — OpenAI\-API compatible, GGUF native, runs on any GPU\. No Python\. No llama\.cpp\. Single binary\.

Rust 6\.0k 64%](https://starboard.codevetter.com/explore/Michael-A-Kuykendall/shimmy)[![php](https://avatars.githubusercontent.com/u/25158?v=4&s=24)

php/ php\-src

The PHP Interpreter

C 42k 63%](https://starboard.codevetter.com/explore/php/php-src)[![ymcui](https://avatars.githubusercontent.com/u/16095339?v=4&s=24)

ymcui/ Chinese\-LLaMA\-Alpaca\-2

中文LLaMA\-2 & Alpaca\-2大模型二期项目 \+ 64K超长上下文模型 \(Chinese LLaMA\-2 & Alpaca\-2 LLMs with 64K long context models\)

Python 7\.1k 65%](https://starboard.codevetter.com/explore/ymcui/Chinese-LLaMA-Alpaca-2)
