summaryrefslogtreecommitdiff
path: root/candle-transformers
diff options
context:
space:
mode:
authorMikarific <mikerific2@gmail.com>2024-10-13 15:05:50 -0600
committerGitHub <noreply@github.com>2024-10-13 23:05:50 +0200
commit41ade774e8606325572215b93ef2152432997fda (patch)
tree5a060c4b4f649d6d9a2cce539568aee1cc9100db /candle-transformers
parent6eab6b57f57b5e935460cce9a000d5029d3ed75a (diff)
downloadcandle-41ade774e8606325572215b93ef2152432997fda.tar.gz
candle-41ade774e8606325572215b93ef2152432997fda.tar.bz2
candle-41ade774e8606325572215b93ef2152432997fda.zip
fix: Allow marian configs to deserialize from json. (#2556)
Diffstat (limited to 'candle-transformers')
-rw-r--r--candle-transformers/src/models/marian.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/candle-transformers/src/models/marian.rs b/candle-transformers/src/models/marian.rs
index 05804a1c..c4299da6 100644
--- a/candle-transformers/src/models/marian.rs
+++ b/candle-transformers/src/models/marian.rs
@@ -1,8 +1,9 @@
use super::with_tracing::{linear, Embedding, Linear};
use candle::{Result, Tensor};
use candle_nn::{layer_norm, LayerNorm, VarBuilder};
+use serde::Deserialize;
-#[derive(Debug, Clone)]
+#[derive(Debug, Clone, Deserialize)]
pub struct Config {
pub vocab_size: usize,
pub decoder_vocab_size: Option<usize>,