Skip to content

Commit 3356c61

Browse files
committed
Fusing both Gte Configs.
1 parent f578c1a commit 3356c61

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

backends/candle/src/lib.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,8 @@ enum Config {
5959
NomicBert(NomicConfig),
6060
#[allow(dead_code)]
6161
Mistral(MistralConfig),
62+
#[serde(alias = "new")]
6263
Gte(GTEConfig),
63-
#[serde(rename = "new")]
64-
GteAlibaba(GTEConfig),
6564
#[allow(dead_code)]
6665
Qwen2(Qwen2Config),
6766
#[serde(rename = "mpnet")]
@@ -224,7 +223,7 @@ impl CandleBackend {
224223
"Mistral is only supported on Cuda devices in fp16 with flash attention enabled"
225224
.to_string(),
226225
)),
227-
(Config::Gte(config) | Config::GteAlibaba(config), Device::Cpu | Device::Metal(_)) => {
226+
(Config::Gte(config) , Device::Cpu | Device::Metal(_)) => {
228227
tracing::info!("Starting GTE model on {:?}", device);
229228
Ok(Box::new(GTEModel::load(vb, &config, model_type).s()?))
230229
}
@@ -355,7 +354,7 @@ impl CandleBackend {
355354
))
356355
}
357356
#[cfg(feature = "cuda")]
358-
(Config::Gte(config) | Config::GteAlibaba(config), Device::Cuda(_)) => {
357+
(Config::Gte(config) , Device::Cuda(_)) => {
359358
if dtype != DType::F16
360359
|| !cfg!(any(feature = "flash-attn", feature = "flash-attn-v1"))
361360
{

0 commit comments

Comments
 (0)