Tweak the VarMap set type. (#1758)

This commit is contained in:
Laurent Mazare
2024-02-25 20:50:08 +01:00
committed by GitHub
parent 2f22afd80e
commit 1a6043af51
4 changed files with 48 additions and 11 deletions

View File

@ -32,9 +32,9 @@ impl Config {
}
pub struct State {
hs: Vec<Tensor>,
prev_xs: Vec<[Tensor; D_CONV]>,
pos: usize,
pub hs: Vec<Tensor>,
pub prev_xs: Vec<[Tensor; D_CONV]>,
pub pos: usize,
}
impl State {

View File

@ -22,15 +22,15 @@ pub struct Config {
pub rescale_every: usize,
}
struct StatePerLayer {
extract_key_value: Tensor,
linear_attention: Tensor,
feed_forward: Tensor,
pub struct StatePerLayer {
pub extract_key_value: Tensor,
pub linear_attention: Tensor,
pub feed_forward: Tensor,
}
pub struct State {
per_layer: Vec<StatePerLayer>,
pos: usize,
pub per_layer: Vec<StatePerLayer>,
pub pos: usize,
}
impl State {