Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flux Model #23

Open
super-fun-surf opened this issue Dec 16, 2024 · 1 comment
Open

Flux Model #23

super-fun-surf opened this issue Dec 16, 2024 · 1 comment

Comments

@super-fun-surf
Copy link

Adding the macros to the Flux Model gives error that it is now expecting and Arc

mismatched types
expected struct `Arc<(dyn LinearLayerLike + 'static)>`
   found struct `candle_nn::Linear

do we need to modify the model code or are we missing something?

@super-fun-surf
Copy link
Author

I tried adding Arc::new to the fields but i still get this error

the trait bound `Arc<dyn LinearLayerLike>: Module` is not satisfied
the following other types implement trait `Module`:
  AttentionBlock
  BeitVisionTransformer
  BertLMPredictionHead
  BertOnlyMLMHead
  ChineseClipVisionEmbeddings
  ChineseClipVisionTransformer
  ClipVisionTransformer
  Conv1d
and 131 others
required for `Arc<dyn LinearLayerLike>` to implement `Module`

at a few spot like this on the qkv apply

  fn qkv(&self, xs: &Tensor) -> Result<(Tensor, Tensor, Tensor)> {
        let qkv = xs.apply(&self.qkv)?;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant