Skip to content

Commit

Permalink
Updated llama
Browse files Browse the repository at this point in the history
  • Loading branch information
jafioti committed Feb 27, 2024
1 parent ca71f0d commit b2d6a48
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 2 deletions.
14 changes: 14 additions & 0 deletions examples/llama/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
20 changes: 20 additions & 0 deletions examples/llama/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[package]
name = "llama"
version = "0.1.0"
edition = "2021"

[features]
metal = ["dep:luminal_metal", "dep:metal-rs"]
cuda = ["dep:luminal_cuda"]

[dependencies]
luminal = {path="../.."}
luminal_metal = {path="../../crates/luminal_metal", optional=true}
luminal_cuda = {path="../../crates/luminal_cuda", optional=true}
rust_tokenizers = "8.1.0"
clap = { version = "4.4.18", features = ["derive"] }
byteorder = "1.5.0"
memmap2 = "0.9.4"
metal-rs = { version = "0.27.0", package = "metal", features = ["mps"], optional=true }
colored = "2.1.0"
itertools = "0.12.1"
1 change: 0 additions & 1 deletion examples/llama/loader.rs → examples/llama/src/loader.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use half::f16;
use luminal::{op::Function, prelude::*};

/// Load the model in the same way dfdx-llama does
Expand Down
File renamed without changes.
1 change: 0 additions & 1 deletion examples/llama/model.rs → examples/llama/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ pub const INTERMEDIATE: usize = 11008;
pub const HEADS: usize = 32;
pub const LAYERS: usize = 32;

use half::f16;
use luminal::{
nn::{embedding::Embedding, norm::RMSNorm},
prelude::*,
Expand Down

0 comments on commit b2d6a48

Please sign in to comment.