llama-index llms mistral-rs integration
Project description
LlamaIndex Llms Integration: mistral.rs
To use this integration, please install the Python mistralrs
package:
Installation of mistralrs
from PyPi
-
Install Rust: https://rustup.rs/
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source $HOME/.cargo/env
-
mistralrs
depends on theopenssl
library.
To install it on Ubuntu:
sudo apt install libssl-dev
sudo apt install pkg-config
- Install it!
-
CUDA
pip install mistralrs-cuda
-
Metal
pip install mistralrs-metal
-
Apple Accelerate
pip install mistralrs-accelerate
-
Intel MKL
pip install mistralrs-mkl
-
Without accelerators
pip install mistralrs
All installations will install the mistralrs
package. The suffix on the package installed by pip
only controls the feature activation.
Installation from source
Please follow the instructions here.
Usage
from llama_index.llms.mistral_rs import MistralRS
from mistralrs import Which
llm = MistralRS(
which=Which.GGUF(
tok_model_id="mistralai/Mistral-7B-Instruct-v0.1",
quantized_model_id="TheBloke/Mistral-7B-Instruct-v0.1-GGUF",
quantized_filename="mistral-7b-instruct-v0.1.Q4_K_M.gguf",
tokenizer_json=None,
repeat_last_n=64,
),
max_new_tokens=4096,
context_window=1024 * 5,
)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file llama_index_llms_mistral_rs-0.2.0.tar.gz
.
File metadata
- Download URL: llama_index_llms_mistral_rs-0.2.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ada543c14ca01ce990f967747b1fc0b4bc7a71b0829aa668b5421359835084ff |
|
MD5 | 57b13c66c4c8b89380658fbec1bd0542 |
|
BLAKE2b-256 | 1f255f47c3dd39d2280e8bd5b1feab2bf7811aa44d9b59b274ac410496ed5eb2 |
File details
Details for the file llama_index_llms_mistral_rs-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: llama_index_llms_mistral_rs-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.13 Darwin/23.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7355f18efa5d9fdaf4a8ffc2261bf73c74ab6d87229ae66debc6357cb62dc237 |
|
MD5 | 2ad0b2416a1a464cda6e4fd4f5e85adc |
|
BLAKE2b-256 | b2f11d291903923dcc319b61902111bca964f633ce0d1c94544d3fd91833bfe4 |