karpathy/llama2.c
GitHub: karpathy/llama2.c
一个极简的教育性全栈框架,用于在 PyTorch 中训练 Llama 2 架构,并使用单个纯 C 文件进行无依赖推理。
Stars: 19223 | Forks: 2450
## llama2.c
):此项目的 C++ 移植
- [llama2.cpp](https://github.com/coldlarry/llama2.cpp) 作者 @[coldlarry](https://github.com/coldlarry):此项目的 C++ 移植
- JavaScript
- [llama2.js](https://github.com/epicure/llama2.js) 作者 @[epicure](https://github.com/epicure):此项目的 JavaScript 移植
- [llamajs](https://github.com/agershun/llamajs) 作者 @[agershun](https://github.com/agershun):此项目的 JavaScript 移植
- [llama2.ts](https://github.com/wizzard0/llama2.ts) 作者 @[oleksandr_now](https://twitter.com/oleksandr_now):此项目的 TypeScript 移植。完全支持 Llama2-7B。
- [llama2.c-emscripten](https://github.com/gohai/llama2.c-emscripten) 作者 @[gohai](https://github.com/gohai):Emscripten (JavaScript) 移植,基于 @ggerganov 的初始原型
- Zig
- [llama2.zig](https://github.com/cgbur/llama2.zig) 作者 @[cgbur](https://github.com/cgbur):此项目的 Zig 移植
- [llama2.zig](https://github.com/vodkaslime/llama2.zig) 作者 @[vodkaslime](https://github.com/vodkaslime):此项目的 Zig 移植
- [llama2.zig](https://github.com/clebert/llama2.zig) 作者 @[clebert](https://github.com/clebert):此项目的 Zig 移植
- Julia
- [llama2.jl](https://github.com/juvi21/llama2.jl) 作者 @[juvi21](https://github.com/juvi21):此项目的 Julia 移植
- Scala
- [llama2.scala](https://github.com/jrudolph/llama2.scala) 作者 @[jrudolph](https://github.com/jrudolph):此项目的 Scala 移植
- Java
- [llama2.java](https://github.com/mukel/llama2.java) 作者 @[mukel](https://github.com/mukel):此项目的 Java 移植
- [llama2.java](https://github.com/neoremind/llama2.java) 作者 @[neoremind](https://github.com/neoremind):此项目的 Java 移植
- [llama2.tornadovm.java](https://github.com/mikepapadim/llama2.tornadovm.java) 作者 @[mikepapadim](https://github.com/mikepapadim):llama2.java 的扩展,通过 [TornadoVM](https://github.com/beehive-lab/TornadoVM) 支持 GPU。
- Kotlin
- [llama2.kt](https://github.com/madroidmaq/llama2.kt) 作者 @[madroidmaq](https://github.com/madroidmaq):此项目的 Kotlin 移植
- [llama2-kmp](https://github.com/stepango/llama2-kmp) 作者 @[stepango](https://github.com/stepango):此项目的 Kotlin 多平台 (KMP) 移植
- Python
- [llama2.py](https://github.com/tairov/llama2.py) 作者 @[tairov](https://github.com/tairov):此项目的简单单文件纯 Python 移植,零依赖
- C#
- [llama2.cs](https://github.com/trrahul/llama2.cs) 作者 @[trrahul](https://github.com/trrahul):此项目的 C# 移植
- F#
- [llama2.fs](https://github.com/micsh/llama2.fs) 作者 @[micsh](https://github.com/micsh):此项目的 F# 移植
- Dart
- [llama2.dart](https://github.com/yiminghan/llama2.dart) 作者 @[yiminghan](https://github.com/yiminghan/llama2.dart):此项目的单文件 dart 移植,可与 Flutter 配合使用!
- Web
- [llama2c-web](https://github.com/dmarcos/llama2.c-web) 作者 @[dmarcos](https://github.com/dmarcos):将未修改的 llama2.c 构建为 WASM 并在浏览器中运行的超简单方法。[Demo](https://diegomarcos.com/llama2.c-web/)
- [llama2.rs.wasm](https://github.com/mtb0x1/llama2.rs.wasm) 作者 @[mtb0x1](https://github.com/mtb0x1/) :列出的所有 Rust 移植到 WASM 的 [Demo](https://mtb0x1.github.io/llama2.rs.wasm/),全部在一个网页中。
- WebAssembly
- [icpp-llm](https://github.com/icppWorld/icpp-llm):用于 Internet Computer 的 LLM
- Fortran
- [llama2.f90](https://github.com/rbitr/llama2.f90):此项目的 Fortran 移植
- Mojo
- [llama2.🔥](https://github.com/tairov/llama2.mojo) 作者 @[tairov](https://github.com/tairov):此项目的纯 Mojo 移植
- OCaml
- [llama2.ml](https://github.com/jackpeck/llama2.ml) 作者 @[jackpeck](https://github.com/jackpeck):此项目的 OCaml 移植
- Hare
- [llama2.ha](https://sr.ht/~dvshkn/llama2.ha) 作者 @[dvshkn](https://git.sr.ht/~dvshkn):此项目的 Hare 移植
- [llama2.c - Llama 2 Everywhere](https://github.com/trholding/llama2.c) 作者 @[trholding](https://github.com/trholding):独立、可启动和可移植的二进制 Llama 2
- [llama2.c-zh - Bilingual Chinese and English](https://github.com/chenyangMl/llama2.c-zh) 作者 @[chenyangMl](https://github.com/chenyangMl):扩展 tokenizer 以支持中文和英文的训练及推理
- Haskell
- [llama2.hs](https://github.com/chris-ch/llama2.hs) 作者 @[chris-ch](https://github.com/chris-ch):此项目的 Haskell 移植
## 未分类待办事项
- 在 run.c 中添加对从 export 读取版本 1+ 文件的支持,稍后弃用 "version 0"
- run.cu (CUDA) 调查并合并
- 在 [test.c](test.c) 中添加更多测试
- 为 sample.py 添加 Engine 类,在 PyTorch 中进行高效推理,例如保持 KV cache
- 让添加新数据集变得不那么痛苦
- (LoRA) Llama 2 模型的微调和导出
## 许可证
MIT
标签:DLL 劫持, DNS解析, fp32, Inference, Karpathy, LangChain, Llama 2, LLM, PyTorch, TinyStories, Transformer, Unmanaged PE, 凭据扫描, 大语言模型, 客户端加密, 客户端加密, 嵌入式AI, 开源项目, 教育目的, 无依赖, 极简主义, 模型推理, 深度学习, 端侧推理, 纯C实现, 训练框架, 轻量级, 逆向工具