rust-bert
rust-bert copied to clipboard
Rust native ready-to-use NLP pipelines and transformer-based models (BERT, DistilBERT, GPT2,...)
Love the crate. Curious, any way to get these larger models like Mistral 7X8B into it? Their pytoch_model.bin files are split into multiple files, and uncertain how to convert that....
I converted the model https://huggingface.co/sentence-transformers/msmarco-distilbert-cos-v5 with the current branch and the ./util/convert_model.py script In the the example/sentence_embeddings_local.rs it says that you should use --prefix distilbert and --suffix for Distil-based models....
# Problem - The example: `export LD_LIBRARY_PATH=${LIBTORCH}/lib:$LD_LIBRARY_PATH` IS INCORRECT # Solution - Proper example: `export LD_LIBRARY_PATH=${LIBTORCH}/lib` I wasted over an hour trying to get my code to compile before I...
Hi I'm trying to verify libtorch installation (followed steps mentioned in the README) and I executed the command mentioned in the README file ```cargo run --example sentence_embeddings``` but I'm facing...
RemoteResource resource provider doesn't preserve file name or extension ``` let cached_path = CACHE .cached_path_with_options(&self.url, &Options::default().subdir(&self.cache_subdir))?; Ok(cached_path) ``` but Tch-rs requires model path to have `safetensor` extension to load model...
Hi, I am trying to run example sentence embeddings but I was getting error ``` Fail to run custom command for torch-sys v0. 15.0 Error this tch version expect by...
Bumps [requests](https://github.com/psf/requests) from 2.31.0 to 2.32.0. Release notes Sourced from requests's releases. v2.32.0 2.32.0 (2024-05-20) 🐍 PYCON US 2024 EDITION 🐍 Security Fixed an issue where setting verify=False on the...
let model_resource = RemoteResource::from_pretrained(("distiluse-base-multilingual-cased","https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased/blob/main/rust_model.ot")); let config_resource = RemoteResource::from_pretrained(("distiluse-base-multilingual-cased","https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased/blob/main/config.json")); let vocab_resource = RemoteResource::from_pretrained(("distiluse-base-multilingual-cased","https://huggingface.co/sentence-transformers/distiluse-base-multilingual-cased/blob/main/vocab.txt")); let config = ZeroShotClassificationConfig::new(ModelType::DistilBert, ModelResource::Torch(Box::new(model_resource)), config_resource, vocab_resource, None, true, None, None ); let tokenizer_file_path = PathBuf::from("/root/rust-bert/model/tokenizer.json"); let special_token_map_path...
I'm attempting to translate from English to ChineseMandarin. The target languages in the rust_bert crate indicate ChineseMandarin is a supported language. Additionally the documentation on hugging fast also indicates it's...