mirror of
https://github.com/huggingface/candle.git
synced 2025-06-22 12:28:06 +00:00
Extract T5 module and add main function to use it (#829)
* Extract t5 out of musicgen * Add main for t5 module
This commit is contained in:
@ -18,6 +18,7 @@ intel-mkl-src = { workspace = true, optional = true }
|
||||
num-traits = { workspace = true }
|
||||
rayon = { workspace = true }
|
||||
safetensors = { workspace = true }
|
||||
serde = { workspace = true }
|
||||
|
||||
[dev-dependencies]
|
||||
anyhow = { workspace = true }
|
||||
|
@ -1,7 +1,10 @@
|
||||
use candle::Tensor;
|
||||
use serde::Deserialize;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Deserialize, Default)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum Activation {
|
||||
#[default]
|
||||
Gelu,
|
||||
Relu,
|
||||
Elu(f64),
|
||||
|
Reference in New Issue
Block a user