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

It should be "vb.contains_tensor("lm_head.weight")"? #2443

Closed
ilookee opened this issue Aug 23, 2024 · 2 comments
Closed

It should be "vb.contains_tensor("lm_head.weight")"? #2443

ilookee opened this issue Aug 23, 2024 · 2 comments

Comments

@ilookee
Copy link
Contributor

ilookee commented Aug 23, 2024

let lm_head = if vb.contains_tensor("lm_head") {

When I load Qwen2-7B, "vb.contains_tensor("lm_head")" return false, and "vb.contains_tensor("lm_head.weight")" return true.

@LaurentMazare
Copy link
Collaborator

Ah good point, do you want to make a PR with the change and test that it works well on your use case? If not I can take a stab at it.

ilookee pushed a commit to ilookee/candle that referenced this issue Aug 23, 2024
LaurentMazare pushed a commit that referenced this issue Aug 23, 2024
@LaurentMazare
Copy link
Collaborator

Closing this now as it should be fixed by the associated PR.

EricLBuehler added a commit to EricLBuehler/candle that referenced this issue Sep 11, 2024
* Bump the version to 0.6.1. (huggingface#2438)

* onnx: workaround pow with negative base (huggingface#2439)

* onnx: workaround pow with negative base

rather than fully defining pow in the cpu backend (as in huggingface#2318),
this implements a much smaller change which is sufficient to evaluate silero-vad
onnx models. Specifically, checking if pow is run with 2.0 exponent, and if so
evaluate as simply `x*x` instead of the cpu backend of `e^(2.0 * ln(x))`.

* PR: use Tensor::powf insead

powf correctly handles a negative base.

* onnx: support negative index in Gather (huggingface#2440)

index_select does not support negative indexing, but
this change adds just enough workarounds in onnx to
allow evaluating silero-vad models (which make use of
negative indices).

* silero-vad v5 example (huggingface#2321)

* silero-vad v5 example

This change adds an example of how to run silero-vad v5

* PR: rename 'vad' to 'silero-vad'

* Update README.md

---------

Co-authored-by: Laurent Mazare <[email protected]>

* Fix for parler-tts, do not add the last slice of padding tokens. (huggingface#2442)

* Fix for parler-tts, do not add the last slice of padding tokens.

* Support for the mini model.

* Add FastViT model. (huggingface#2444)

* fix: qwen2 lm_head loading huggingface#2443 (huggingface#2445)

Co-authored-by: Yi Xu <[email protected]>

* Update cudarc to 0.12. (huggingface#2451)

* Update cudarc to 0.12.

* Some cudnn tweaks.

* FastViT fixes. (huggingface#2452)

* correct optional SE layer dimensions.
 * head_dim instead of num_heads is 32.
 * update test example output.

* MobileCLIP models S1 and S2 (huggingface#2454)

* Allow loading images with given std and mean

* OpenCLIP text encoder component

* Two MobileCLIP models

* Clippy fixes.

---------

Co-authored-by: Laurent <[email protected]>

* Fix FLUX.1 weights (huggingface#2457)

* fix FLUX.1 weights

* added flux1-dev.safetensors

* Clippy fixes for 1.81.0. (huggingface#2461)

* Clippy fixes for 1.81.0.

* Another fix.

* Make Error::msg more in line with anyhow::Error::msg

* Add context trait

* Even more flexible

* Format

---------

Co-authored-by: Laurent Mazare <[email protected]>
Co-authored-by: shua <[email protected]>
Co-authored-by: Jani Monoses <[email protected]>
Co-authored-by: ilookee <[email protected]>
Co-authored-by: Yi Xu <[email protected]>
Co-authored-by: Eugene Hauptmann <[email protected]>
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

2 participants