diff options
Diffstat (limited to 'candle-transformers/src/models/with_tracing.rs')
-rw-r--r-- | candle-transformers/src/models/with_tracing.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/candle-transformers/src/models/with_tracing.rs b/candle-transformers/src/models/with_tracing.rs index 383ae71c..2ffec724 100644 --- a/candle-transformers/src/models/with_tracing.rs +++ b/candle-transformers/src/models/with_tracing.rs @@ -116,6 +116,12 @@ impl QMatMul { let span = tracing::span!(tracing::Level::TRACE, "qmatmul"); Ok(Self { inner, span }) } + + pub fn from_weights(ws: std::sync::Arc<candle::quantized::QTensor>) -> Result<Self> { + let inner = candle::quantized::QMatMul::from_arc(ws)?; + let span = tracing::span!(tracing::Level::TRACE, "qmatmul"); + Ok(Self { inner, span }) + } } impl Module for QMatMul { |