summaryrefslogtreecommitdiff
path: root/candle-transformers
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2024-11-15 16:46:55 +0100
committerGitHub <noreply@github.com>2024-11-15 16:46:55 +0100
commit00d8a0c178f588b6454c02e66b709917628c2bae (patch)
tree218ad1e2c5125d9dd2cb09a7fd3ff3b7ecaa78d0 /candle-transformers
parentf689ce5d39c6f1475dfc71503288ea2905c8f685 (diff)
downloadcandle-00d8a0c178f588b6454c02e66b709917628c2bae.tar.gz
candle-00d8a0c178f588b6454c02e66b709917628c2bae.tar.bz2
candle-00d8a0c178f588b6454c02e66b709917628c2bae.zip
Remove some unused macros. (#2618)
* Remove some unused macros. * More unused fixes.
Diffstat (limited to 'candle-transformers')
-rw-r--r--candle-transformers/src/models/encodec.rs4
-rw-r--r--candle-transformers/src/models/starcoder2.rs1
2 files changed, 2 insertions, 3 deletions
diff --git a/candle-transformers/src/models/encodec.rs b/candle-transformers/src/models/encodec.rs
index a8d509ce..517b9b1d 100644
--- a/candle-transformers/src/models/encodec.rs
+++ b/candle-transformers/src/models/encodec.rs
@@ -4,9 +4,8 @@
//!
//! Based on implementation from [huggingface/transformers](https://github.com/huggingface/transformers/blob/main/src/transformers/models/encodec/modeling_encodec.py)
-#![allow(unused)]
use candle::{DType, IndexOp, Layout, Module, Result, Shape, Tensor, D};
-use candle_nn::{conv1d, Conv1d, Conv1dConfig, ConvTranspose1d, VarBuilder};
+use candle_nn::{conv1d, Conv1d, ConvTranspose1d, VarBuilder};
// Encodec Model
// https://github.com/huggingface/transformers/blob/main/src/transformers/models/encodec/modeling_encodec.py
@@ -226,6 +225,7 @@ impl candle::CustomOp2 for CodebookEncode {
}
// https://github.com/huggingface/transformers/blob/abaca9f9432a84cfaa95531de4c72334f38a42f2/src/transformers/models/encodec/modeling_encodec.py#L340
+#[allow(unused)]
#[derive(Clone, Debug)]
pub struct EuclideanCodebook {
inited: Tensor,
diff --git a/candle-transformers/src/models/starcoder2.rs b/candle-transformers/src/models/starcoder2.rs
index 833cb067..0df5990b 100644
--- a/candle-transformers/src/models/starcoder2.rs
+++ b/candle-transformers/src/models/starcoder2.rs
@@ -15,7 +15,6 @@
//! - [Model Card](https://huggingface.co/bigcode/starcoder)
//!
-#![allow(unused)]
use candle::{DType, Device, Module, Result, Tensor, D};
use candle_nn::{layer_norm, linear_b, LayerNorm, Linear, VarBuilder};
use std::sync::Arc;