Open AbhishekBose opened 2 months ago
If you are using Quantized model then you can load varbuilder like:
let vb =candle_transformers::quantized_var_builder::VarBuilder::from_gguf(filename, &device)?; let model = QMistral::new(&config, vb)?;
And for safetensors: let vb = unsafe { VarBuilder::from_mmaped_safetensors(&filenames, dtype, &device)? }; let model = Mistral::new(&config, vb)?;
I am able to load quantised_mistral
For the model_id and revision I have chosen this
let filenames = hub_load_safetensors(&api_repo, safetensors_file_name)?; where filenames is of Vec
What should I choose for the Varbuilder?
When I choose the Varbuilder form the quantised_mistral file?
QuantizedMistralVarBuilder::from_gguf(&filenames, &device);
I am getting this error
And If I use
candle_nn::VarBuilder;
let vb = unsafe { VarBuilder::from_mmaped_safetensors(&filenames, dtype, &device)? }; QuantizedMistral::new(&config, vb)?I get
What am I doing wrong here?