From 41ade774e8606325572215b93ef2152432997fda Mon Sep 17 00:00:00 2001 From: Mikarific Date: Sun, 13 Oct 2024 15:05:50 -0600 Subject: fix: Allow marian configs to deserialize from json. (#2556) --- candle-transformers/src/models/marian.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'candle-transformers') 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, -- cgit v1.2.3