Llama Model Implementations Transformer Models

Educational and production implementations of the Llama model architecture from scratch in various frameworks (PyTorch, JAX, NumPy). Includes simplified variants, language-specific adaptations, and training/inference code. Does NOT include fine-tuning frameworks, detection tools, or applications built on top of Llama.

There are 45 llama model implementations models tracked. The highest-rated is hkproj/pytorch-llama at 49/100 with 366 stars.

Get all 45 projects as JSON

curl "https://pt-edge.onrender.com/api/v1/datasets/quality?domain=transformers&subcategory=llama-model-implementations&limit=20"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.

# Model Score Tier
1 hkproj/pytorch-llama

LLaMA 2 implemented from scratch in PyTorch

49
Emerging
2 4AI/LS-LLaMA

A Simple but Powerful SOTA NER Model | Official Code For Label Supervised...

44
Emerging
3 luchangli03/export_llama_to_onnx

export llama to onnx

42
Emerging
4 ayaka14732/llama-2-jax

JAX implementation of the Llama 2 model

42
Emerging
5 harleyszhang/lite_llama

A light llama-like llm inference framework based on the triton kernel.

42
Emerging
6 liangyuwang/zo2

ZO2 (Zeroth-Order Offloading): Full Parameter Fine-Tuning 175B LLMs with...

41
Emerging
7 tpoisonooo/llama.onnx

LLaMa/RWKV onnx models, quantization and testcase

40
Emerging
8 Nkluge-correa/TeenyTinyLlama

A pair of tiny foundational models trained in Brazilian Portuguese.🦙🦙

38
Emerging
9 hscspring/llama.np

Inference Llama/Llama2/Llama3 Modes in NumPy

38
Emerging
10 p-nordmann/eqx-llama

LLaMA implementation with Jax and Equinox

37
Emerging
11 sh0416/llama-classification

Text classification with Foundation Language Model LLaMA

36
Emerging
12 ASSERT-KTH/repairllama

RepairLLaMA: Efficient Representations and Fine-Tuned Adapters for Program...

34
Emerging
13 Esmail-ibraheem/Tinyllamas-pytorch

Tinyllamas🦙 is an Extensible advanced language model framework, inspired by...

33
Emerging
14 Nondzu/LlamaTor

LlamaTor: Decentralized AI model sharing via BitTorrent for efficient,...

33
Emerging
15 ES7/LLaMA-from-Scratch

In this repository, I have explained the working of the LLaMA Model,...

33
Emerging
16 akanyaani/miniLLAMA

A simplified LLAMA implementation for training and inference tasks.

33
Emerging
17 ntropy-network/enrichment_models

This repository benchmark Ntropy API against different Large Language Models...

31
Emerging
18 MoFHeka/LLaMA-Megatron

A LLaMA1/LLaMA12 Megatron implement.

30
Emerging
19 dhakalnirajan/LLaMA-BitNet

LLaMA-BitNet is a repository dedicated to empowering users to train their...

30
Emerging
20 Riccorl/llama-trainer

Llama Trainer Utility

30
Emerging
21 aju22/LLaMA2

This repository contains an implementation of the LLaMA 2 (Large Language...

29
Experimental
22 cbacary/MoDeGPT

An implementation of the MoDeGPT LLM compression from the ICLR 2025...

28
Experimental
23 JamesVorder/python-tddpp

This LLM generates code based on tests, and makes sure they pass.

27
Experimental
24 nuochenpku/LLaMA_Analysis

This is official project in our paper: Is Bigger and Deeper Always Better?...

26
Experimental
25 frikishaan/glama-124m

GLaMA is a small-scale autoregressive transformer model inspired by...

24
Experimental
26 longday1102/VietAI-experiment-LLaMA2

âš¡ LLaMA-2 model experiment

24
Experimental
27 kimtth/ai-pytorch-vis-llama-trial

💥Hello Pytorch! Llama

22
Experimental
28 gitctrlx/llama.np

Llama from scratch in NumPy.

21
Experimental
29 shreyanmitra/CandyLLM

A simple, easy-to-use framework for HuggingFace and OpenAI text-generation...

20
Experimental
30 maris205/llama-gene

A General-purpose Gene Task Large Language Model Based on Instruction Fine-tuning

20
Experimental
31 adithyab94/Attiri

Attiri: An Instruction-following LLaMa and Alpaca model for Tamil

19
Experimental
32 jerrypan617/LightLlama

Build a light-weight Llama from scratch, based on course Stanford CS336 2025.

18
Experimental
33 Brownwang0426/Cullama

Customize Your Own Llama Attention! No peft, no lora, only customizing your...

17
Experimental
34 dt-3t/TeGu

Official implementation of "Temporal Guidance for Large Language Models". A...

14
Experimental
35 JeffreyYAJ/Mini-Llama-Project

Fine-tuning d'un modèle Llama-3.2-1B avec Unsloth (GPU Cloud) et déploiement...

12
Experimental
36 AngeloGalav/compressed-llama

Compression pipeline for Llama-based models.

12
Experimental
37 piex-1/llama-pytorch

code pytorch in llama

11
Experimental
38 kougioulis/LLaMA-torch

A reimplementation of the LLaMA 🦙 model in PyTorch

11
Experimental
39 rlucatoor/llama3

A Pytorch implementation of Llama 3 🦙

11
Experimental
40 AngeloGalav/franken-llama

Making Llama2 more computationally and memory efficient by skipping and...

10
Experimental
41 ajheshbasnet/LLaMA-2-from-Scratch

llama-2 from scratch — a clean, educational pytorch implementation of the...

10
Experimental
42 Aveygo/DetectLlama

Detect text written by Meta's Llama on a word by word basis

10
Experimental
43 ygsharma/llama-inference

Llama 2 implementation in PyTorch.

10
Experimental
44 anish2105/Q-A-model-with-LLAMA2

Testing out LLAMA2.

10
Experimental
45 iamarunbrahma/llama-from-scratch

Implementation of Llama-3 Model from Scratch

10
Experimental