Skip to content

Commit

Permalink
ESM-C Part I (#66)
Browse files Browse the repository at this point in the history
* initial Rust conversion

* example to load the code

* add pretrained file and deps

* get all the high level imports sorted

* more files for downloading and pretraining

* more fns enough to load the data

* add constants and AddedToken

* work on loading ESMC300M

* update cargo and tokenizers

* surfacing VarBuilder params to the top 

* Move down form the top implementing the LOAD fn.

* update loading in Swiglu; attention, blocks, FFN, 

* turn off esm for tests
  • Loading branch information
zachcp authored Dec 5, 2024
1 parent a2e3637 commit 7b99766
Show file tree
Hide file tree
Showing 39 changed files with 3,774 additions and 23 deletions.
64 changes: 41 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ members = [
"ferritin-bevy",
"ferritin-cellscape",
"ferritin-core",
"ferritin-esm",
"ferritin-amplify",
"ferritin-ligandmpnn",
"ferritin-molviewspec",
Expand Down
33 changes: 33 additions & 0 deletions ferritin-esm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
[package]
name = "ferritin-esm"
version.workspace = true
edition.workspace = true
authors.workspace = true
license.workspace = true
description.workspace = true

[features]
metal = ["candle-core/metal", "candle-nn/metal", "candle-metal-kernels"]

[dependencies]
anyhow.workspace = true
candle-core = { git = "https://github.com/huggingface/candle.git", package = "candle-core", features = [
] }
candle-hf-hub = "0.3.3"
candle-nn = { git = "https://github.com/huggingface/candle.git", package = "candle-nn" }
ferritin-test-data = { path = "../ferritin-test-data" }
rand = "0.8.5"
safetensors = "0.4.5"
tokenizers = "0.21.0"

[target.'cfg(target_os = "macos")'.features]
metal = []

[target.'cfg(target_os = "macos")'.dependencies]
candle-metal-kernels = { git = "https://github.com/huggingface/candle.git", package = "candle-metal-kernels", optional = true }

[dev-dependencies]
candle-examples = { git = "https://github.com/huggingface/candle.git", package = "candle-examples" }
ferritin-test-data = { path = "../ferritin-test-data" }
assert_cmd = "2.0.16"
tempfile = "3.14.0"
Loading

0 comments on commit 7b99766

Please sign in to comment.