summaryrefslogtreecommitdiff
path: root/candle-transformers
diff options
context:
space:
mode:
authorSantiago Medina <santiagm08@gmail.com>2024-04-20 22:08:28 -0700
committerGitHub <noreply@github.com>2024-04-21 07:08:28 +0200
commitd22f1d4f4ee937fd4e59924e0ca5f15b81ff9d79 (patch)
tree0f7d60745bc47bb220d94cdce820624b4c2e2dab /candle-transformers
parent0067fe00a8477b8c817dcf54d4d4084b07b7fc5b (diff)
downloadcandle-d22f1d4f4ee937fd4e59924e0ca5f15b81ff9d79.tar.gz
candle-d22f1d4f4ee937fd4e59924e0ca5f15b81ff9d79.tar.bz2
candle-d22f1d4f4ee937fd4e59924e0ca5f15b81ff9d79.zip
Derive clone and debug traits for Moondream model (#2100)
* moondream implementation * add moondream example * change config default activation * Add assets and integrate phi mixformer with example * Make use of kv cache and fix seq_len bug; Clean up example code * Add README link to example * Remove pos_embed scaling; Remove assets; Add to README; Expand VisionConfig * Delete image * Use apply instead of forward * Use latest release special token; Fix token/s accuracy; Use GeluPytorchTanh in VisionConfig v2 * Derive debug and clone traits for Moondream model.
Diffstat (limited to 'candle-transformers')
-rw-r--r--candle-transformers/src/models/moondream.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/candle-transformers/src/models/moondream.rs b/candle-transformers/src/models/moondream.rs
index 7ad8c921..162f7820 100644
--- a/candle-transformers/src/models/moondream.rs
+++ b/candle-transformers/src/models/moondream.rs
@@ -302,6 +302,7 @@ impl Module for VisionEncoder {
}
}
+#[derive(Debug, Clone)]
pub struct Model {
pub text_model: PhiModel,
pub vision_encoder: VisionEncoder,