mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 04:17:10 +02:00
Add cuda feature
This commit is contained in:
parent
262b20fdba
commit
84f49d76cd
3 changed files with 25 additions and 1 deletions
|
@ -70,7 +70,7 @@ impl std::fmt::Debug for Embedder {
|
|||
|
||||
impl Embedder {
|
||||
pub fn new(options: EmbedderOptions) -> std::result::Result<Self, NewEmbedderError> {
|
||||
let device = candle_core::Device::Cpu;
|
||||
let device = candle_core::Device::cuda_if_available(0).unwrap();
|
||||
let repo = match options.revision.clone() {
|
||||
Some(revision) => Repo::with_revision(options.model.clone(), RepoType::Model, revision),
|
||||
None => Repo::model(options.model.clone()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue