mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 19:58:35 +00:00
More model cloning. (#1126)
* More model cloning. * More cloning on quantized models.
This commit is contained in:
@ -2,7 +2,7 @@ use crate::models::with_tracing::QMatMul;
|
||||
use crate::quantized_var_builder::VarBuilder;
|
||||
use candle::{Module, Result, Tensor};
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Embedding {
|
||||
inner: candle_nn::Embedding,
|
||||
span: tracing::Span,
|
||||
@ -28,7 +28,7 @@ impl Module for Embedding {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Linear {
|
||||
weight: QMatMul,
|
||||
bias: Option<Tensor>,
|
||||
@ -69,7 +69,7 @@ pub fn linear_no_bias(in_dim: usize, out_dim: usize, vb: VarBuilder) -> Result<L
|
||||
Ok(Linear { weight, bias: None })
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct RmsNorm {
|
||||
inner: candle_nn::RmsNorm,
|
||||
span: tracing::Span,
|
||||
|
Reference in New Issue
Block a user