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

UQFF File Not Generated When Using Metal Features #810

Closed
solaoi opened this issue Sep 30, 2024 · 3 comments
Closed

UQFF File Not Generated When Using Metal Features #810

solaoi opened this issue Sep 30, 2024 · 3 comments
Labels
bug Something isn't working resolved

Comments

@solaoi
Copy link

solaoi commented Sep 30, 2024

Describe the bug

When running the command with Metal features enabled, the UQFF file is not being generated as expected. This issue occurs specifically when using the Metal backend, while the CPU version works without problems.

Steps to Reproduce

  • Run the following command:
cargo run --features metal -- --isq Q4K -i plain -m microsoft/Phi-3.5-mini-instruct --write-uqff phi3.5-mini-instruct-q4k.uqff 

Additional Information

When executing the above command, the following warning messages are displayed:

warning: unused import: `Tensor`
  --> mistralrs-core/src/pipeline/isq.rs:10:27
   |
10 | use candle_core::{Device, Tensor};
   |                           ^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

warning: unused imports: `IntoParallelRefIterator` and `IntoParallelRefMutIterator`
  --> mistralrs-core/src/pipeline/isq.rs:16:52
   |
16 |     IndexedParallelIterator, IntoParallelIterator, IntoParallelRefIterator,
   |                                                    ^^^^^^^^^^^^^^^^^^^^^^^
17 |     IntoParallelRefMutIterator, ParallelIterator,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

warning: unused variable: `write_artifacts`
   --> mistralrs-core/src/pipeline/isq.rs:142:9
    |
142 |         write_artifacts: Option<&PathBuf>,
    |         ^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_write_artifacts`
    |
    = note: `#[warn(unused_variables)]` on by default

warning: variable does not need to be mutable
   --> mistralrs-core/src/pipeline/isq.rs:145:18
    |
145 |             let (mut tensors, mapper) = match organization {
    |                  ----^^^^^^^
    |                  |
    |                  help: remove this `mut`
    |
    = note: `#[warn(unused_mut)]` on by default

warning: `mistralrs-core` (lib) generated 4 warnings (run `cargo fix --lib -p mistralrs-core` to apply 3 suggestions)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.23s
     Running `target/debug/mistralrs-server --isq Q4K -i plain -m microsoft/Phi-3.5-mini-instruct --write-uqff phi3.5-mini-instruct-q4k.uqff`
@EricLBuehler
Copy link
Owner

EricLBuehler commented Oct 3, 2024

@solaoi thanks for the issue! I think #816 should have fixed this, can you please git pull and retry?

(We tested creation and loading of UQFF files with Metal, so it should work :) )

@solaoi
Copy link
Author

solaoi commented Oct 3, 2024

@EricLBuehler
I pulled the master branch and confirmed that I can now create a file without any issues.
Thanks for the fix!

@solaoi solaoi closed this as completed Oct 3, 2024
@EricLBuehler
Copy link
Owner

@solaoi thanks for testing, glad it works. Please let me know if you have any other questions!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved
Projects
None yet
Development

No branches or pull requests

2 participants